Prometheus-Pushgateway自定义

下载

wget https://github.com/prometheus/pushgateway/releases/download/v1.6.2/pushgateway-1.6.2.linux-amd64.tar.gz
tarfx pushgateway-1.6.2.linux-amd64.tar.gz
mv pushgateway-1.6.2.linux-amd64 /data/monitor/pushgateway

进程管理器配置

root@monitor-1:/etc/supervisor/conf.d# cat pushgateway.conf 
[program:pushgateway]
name = pushgateway
command= /data/monitor/pushgateway/pushgateway
autostart = true
autorestart = true
priority = 2
startsecs = 1
startretries = 3
exitcodes = 0,2
stopsignal = QUIT
stopwaitsecs = 10
user = root
stdout_logfile = /data/monitor/%(program_name)s/stout.log
stdout_logfile_backups = 10
stderr_logfile = /data/monitor/%(program_name)s/stderr.log
stderr_logfile_backups = 10

Prometheus 配置

如何使用

在去访问 pushgateway:9091 监听地址,会看到你自定义的信息

---

Last updated