当前位置:Gxlcms > 数据库问题 > telegraf+influxdb+grafana开源监控架构

telegraf+influxdb+grafana开源监控架构

时间:2021-07-01 10:21:17 帮助过:23人阅读

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开源监控架构

标签:base   url   访问   查看   name   proxy   额外   def   lease   

人气教程排行