InfluxDB 时序数据库安装配置及在 Grafana 中添加监控

InfluxDB 属于TICK 系列之一,对象显示很好,但开源只有单机版。当前安装 TICK 进行测试。各资料参考官网

Telegraf(Time-Series Data Collector): 数据收集

InfluxDB (Time-Series Data Storage):数据存储

Chronograf(Time-Series Data Visualization):WEB 界面管理及图像展示

Kapacitor (Time-Series Data Processing):警告处理

TICK 下载地址: https://portal.influxdata.com/downloads

企业版及开源对比:

体系结构:

选择 RedHat & CentOS 版本安装:

数据库安装
wget https://dl.influxdata.com/influxdb/releases/influxdb-1.6.4.x86_64.rpm
sudo yum -y localinstall influxdb-1.6.4.x86_64.rpm
systemctl start influxdb
# vim /etc/influxdb/influxdb.conf

数据收集:
wget https://dl.influxdata.com/telegraf/releases/telegraf-1.8.3-1.x86_64.rpm
sudo yum -y localinstall telegraf-1.8.3-1.x86_64.rpm
systemctl start telegraf
# vim /etc/telegraf/telegraf.conf

可视化页面管理工具:
wget https://dl.influxdata.com/chronograf/releases/chronograf-1.6.2.x86_64.rpm
sudo yum -y localinstall chronograf-1.6.2.x86_64.rpm
systemctl start chronograf

警告处理
wget https://dl.influxdata.com/kapacitor/releases/kapacitor-1.5.1.x86_64.rpm
sudo yum -y localinstall kapacitor-1.5.1.x86_64.rpm
systemctl start kapacitor
# vim /etc/kapacitor/kapacitor.conf

创建数据库 admin 账号、监控数据库及监控访问账号

# 连接实例
# influx
create user admin with password 'influxdb' with all privileges
create database telegraf
create user telegraf with password 'telegraf'
grant all privileges on telegraf to telegraf
show databases
show users

设置访问地址  /etc/influxdb/influxdb.conf

# 设置账号及远程访问 influxdb.conf
# vim /etc/influxdb/influxdb.conf

bind-address = "192.168.1.176:8088"

[http]
  enabled = true
  bind-address = ":8086"
  auth-enabled = true
  log-enabled = true
  write-tracing = false
  pprof-enabled = false
  https-enabled = false
  https-certificate = "/etc/ssl/influxdb.pem"

数据收集配置 /etc/telegraf/telegraf.conf

# 数据收集配置 telegraf.conf
# vim /etc/telegraf/telegraf.conf

[[outputs.influxdb]]
username = "telegraf"
password = "telegraf"
database = "telegraf"
urls = ["http://192.168.1.176:8086"]
timeout = "5s"
write_consistency = "any"

重启服务

# 重启服务
systemctl restart influxdb
systemctl restart telegraf
systemctl restart chronograf

 

InfluxDB 实例 管理页面 :http://192.168.1.176:8888

这是本机监控,还可以进行数据库管理、用户管理、预警管理、图像显示、表查询等。

 

当然,也可以添加到 Grafana 中监控,因为是时序数据库,配置更便捷。

 

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值