Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.1k views
in Technique[技术] by (71.8m points)

问一个grafana的问题

grafana就是从某个数据源查询数据,比如说mysql数据源,这样写

SELECT
    date( `created_at` ) AS time,
    sum( `min` ) AS MIN,
    sum( `max` ) AS MAX 
FROM
    reward_log 
GROUP BY
    time

这样横轴是time,纵轴显示MIN和MAX的数据

现在我想监控2台服务器cpu的使用率,有什么好的采样软件把数据采集好给我存起来呢,我自己取就好了


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

配合collectd就行了,而且现在也有现成的dashboard了: https://grafana.com/grafana/d...

collectd也有对应的mysql插件,我以前用的是collectd写到elasticsearch再用grafana展示

以前给ELKStack中文指南一书贡献的章节Grafana,你可以参考,其中展示系统监控dashboard部分用的就是collectd收集上来的数据,你可以自行类比


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...