首页 > 数据库技术 > 详细

telegraf+influxdb+grafana开源监控架构

时间:2018-01-26 15:43:07      阅读:342      评论:0      收藏:0      [点我收藏+]
telegraf+influxdb+grafana开源监控架构:

telegraf监控项很全,不需要额外安装插件,很强大

telegraf:

wget https://dl.influxdata.com/telegraf/releases/telegraf-1.5.1-1.x86_64.rpm

rpm -i telegraf-1.5.1-1.x86_64.rpm

service telegraf restart

默认会指向127.0.0.1的influxdb 8086端口(/etc/telegraf/telegraf.conf文件,默认数据库名为telegraf,不需要写数据库用户名密码)

被监控端也是安装该软件,将influxdb服务器改为监控服务器即可

另外监控项在客户端控制,inputs部分,默认已开监控有cpu、disk、diskio、mem、system、swap等,监控项很全

Influxdb安装步骤:

rpm -i influxdb-1.3.6.x86_64.rpm (端口8086)

配置文件路径:/etc/influxdb/influxdb.conf
数据存放路径:/var/lib/influxdb/data
日志路径:/var/log/influxdb/

service influxdb start

chkconfig influxdb --level 35 on

influx

create database telegraf;
create user telegraf with password ‘xxxx‘;
grant all on telegraf to telegraf;
quit

influxdb默认保留数据为168小时(即7天),调整为1年命令:

show retention policies on telegraf; (查看保留策略)
alter retention policy "autogen" on "telegraf" duration 365d default; (对已有策略进行修改)

Granfana安装步骤:

rpm -i grafana-4.5.2-1.x86_64.rpm (端口3000)

service grafana-server start

chkconfig grafana-server --level 35 on

访问http://ip:3000 默认用户名、密码均为admin

Data Sources:Name:telegraf(可改) Type:InfluxDB Url:http://ip:8086 Access:proxy Database:telegraf User:telegraf Password:xxxxx

telegraf+influxdb+grafana开源监控架构

原文:http://blog.51cto.com/yangzhiming/2065475

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!