prometheus存数据到influxdb数据库:
注:
1、influxdb要求1.4以上版本
2、prometheus用默认的存储方式在grafana上可方便计算空间使用率等的信息(涉及计算),切到influxdb后目前还不知道如何转换
rpm -i influxdb-1.6.3.x86_64.rpm
service influxdb start
chkconfig --level 35 influxdb on
influx
create database prometheus;
create user icinga2 with password 'xxxx';
grant all on prometheus to icinga;
show retention policies on prometheus;
alter retention policy "autogen" on "prometheus" duration 365d default;
quit
vi /space/prometheus/prometheus.yml
remote_write:
remote_read:
:wq
/space/prometheus/prometheus --config.file=/space/prometheus/prometheus.yml
转载于:https://blog.51cto.com/yangzhiming/2287172