grafana
1. 下载及安装
下载地址:https://grafana.com/grafana/download
CentOS下载及安装:
wget https://dl.grafana.com/oss/release/grafana-7.1.3-1.x86_64.rpm
sudo yum install grafana-7.1.3-1.x86_64.rpm
其他Linux发行版的下载见下载地址页面
2. 启动grafana服务
systemctl start grafana-server
停止、重启、查看状态命令
# 启动
systemctl start grafana
# 停止
systemctl stop grafana
# 重启
systemctl restart grafana
# 查看服务状态
systemctl status grafana
3. 访问grafana
服务器ip + 端口:3000
默认用户名和密码:admin/admin
修改:admin/1234qwer
界面:
Telegraf
1. 下载及安装
下载地址:https://portal.influxdata.com/downloads/
CentOS下载及安装:
wget https://dl.influxdata.com/telegraf/releases/telegraf-1.15.2-1.x86_64.rpm
sudo yum localinstall telegraf-1.15.2-1.x86_64.rpm
其他Linux发现版的下载见下载地址页面
2. 启动
systemctl start telegraf
停止、重启、查看状态命令:
# 启动
systemctl start influxdb
# 停止
systemctl stop influxdb
# 重启
systemctl restart influxdb
# 查看服务状态
systemctl status influxdb
3. 配置
Telegraf的配置文件在:/etc/telegraf/telegraf.conf
配置influxdb数据输出到influxdb
InfluxDB
1. 下载及安装
下载地址:https://portal.influxdata.com/downloads/
CentOS下载及安装:
wget https://dl.influxdata.com/influxdb/releases/influxdb-1.8.1.x86_64.rpm
sudo yum localinstall influxdb-1.8.1.x86_64.rpm
其他Linux发行版的下载见下载地址页面
2. 启动
systemctl start influxdb
测试启动成功
curl -G http://localhost:8086/query --data-urlencode "q=show databases"
# 返回如下结果即为成功
{"results":[{"statement_id":0,"series":[{"name":"databases","columns":["name"],"values":[["telegraf"],["_internal"]]}]}]}
停止、重启、状态查看命令
# 启动
systemctl start influxdb
# 停止
systemctl stop influxdb
# 重启
systemctl restart influxdb
# 查看服务状态
systemctl status influxdb
3. 创建数据库和用户
# 创建数据库create database telegraf# 创建用户create user "telegraf" with password "1234qwer"
创建成功之后需要重启fluxdb
systemctl restart influxdb