Grafana+telegraf+InfluxDB,采用客户端->服务端存储->WEB界面显示的工作模式,使用UTP传输数据,并且支持自定义图表,有良好的扩展性,
重要的是Grafana页面展示比较美观,更关键的是InfluxDB提供了Python的API,InfluxDB提供了Python的API,InfluxDB提供了Python的API,重要事情说三遍。
测试环境介绍:
server端:192.168.142.10
安装程序:InfluxDB Grafana
Client端:192.168.142.11
安装程序:telegraf
1.安装平台
server端
二、grafana安装
(1)配置YUM源
cat <
[grafana]
name=grafana
baseurl=https://packagecloud.io/grafana/stable/el/6/$basearch
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://packagecloud.io/gpg.key https://grafanarel.s3.amazonaws.com/RPM-GPG-KEY-grafana
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
EOF
(2)安装和启动
# yum install -y grafana
# 也可以直接安装
# yum install https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.6.3-1.x86_64.rpm
# service grafana-server start
# systemctl daemon-reload
# systemctl start grafana-server
# systemctl status grafana-server
#开机自启动
# systemctl enable grafana-server.service
安装二进制文件 /usr/sbin/grafana-server
将init.d脚本复制到 /etc/init.d/grafana-server
安装默认文件(环境变量) /etc/sysconfig/grafana-server
将配置文件复制到 /etc/grafana/grafana.ini
安装systemd服务(如果systemd可用)名称 grafana-server.service
默认配置使用一个日志文件在 /var/log/grafana/grafana.log
默认配置指定一个sqlite3数据库 /var/lib/grafana/grafana.db
(3)相关信息
日志路径:
cat <
[influxdb]
name = InfluxDB Repository - RHEL \$releasever
baseurl = https://repos.influxdata.com/rhel/\$releasever/\$basearch/stable
enabled = 1
gpgcheck = 1
gpgkey = https://repos.influxdata.com/influxdb.key
EOF
配置telegraf,具体配置详情请看官方文档
https://docs.influxdata.com/telegraf/v1.5/administration/configuration/