“Pushgateway”的版本间的差异
跳到导航
跳到搜索
第1行: | 第1行: | ||
[[category:ops]] [[category:container]] [[category:prom]] | [[category:ops]] [[category:container]] [[category:prom]] | ||
== | == | ||
+ | ==inst== | ||
+ | <pre> | ||
+ | wget https://github.com/prometheus/pushgateway/releases/download/v0.10.0/pushgateway-0.10.0.linux-amd64.tar.gz | ||
+ | cd /usr/lib/systemd/system | ||
+ | [root@node01 system]# vim pushgateway.service | ||
+ | [root@node01 system]# cat pushgateway.service | ||
+ | [Unit] | ||
+ | Description=prometheus | ||
+ | After=network.target | ||
+ | |||
+ | [Service] | ||
+ | User=prometheus | ||
+ | Group=prometheus | ||
+ | WorkingDirectory=/usr/local/prometheus/pushgateway | ||
+ | ExecStart=/usr/local/prometheus/pushgateway/pushgateway \ | ||
+ | --web.enable-admin-api \ | ||
+ | --persistence.file="pushfile.txt" \ | ||
+ | --persistence.interval=10m | ||
+ | [Install] | ||
+ | WantedBy=multi-user.target | ||
+ | [root@node01 system]# systemctl enable pushgateway | ||
+ | Created symlink from /etc/systemd/system/multi-user.target.wants/pushgateway.service to /usr/lib/systemd/system/pushgateway.service. | ||
+ | [root@node01 system]# systemctl start pushgateway | ||
+ | [root@node01 system]# systemctl status pushgateway | ||
+ | </pre> | ||
如何展示到 grafa | 如何展示到 grafa |
2020年9月24日 (四) 07:19的版本
==
inst
wget https://github.com/prometheus/pushgateway/releases/download/v0.10.0/pushgateway-0.10.0.linux-amd64.tar.gz cd /usr/lib/systemd/system [root@node01 system]# vim pushgateway.service [root@node01 system]# cat pushgateway.service [Unit] Description=prometheus After=network.target [Service] User=prometheus Group=prometheus WorkingDirectory=/usr/local/prometheus/pushgateway ExecStart=/usr/local/prometheus/pushgateway/pushgateway \ --web.enable-admin-api \ --persistence.file="pushfile.txt" \ --persistence.interval=10m [Install] WantedBy=multi-user.target [root@node01 system]# systemctl enable pushgateway Created symlink from /etc/systemd/system/multi-user.target.wants/pushgateway.service to /usr/lib/systemd/system/pushgateway.service. [root@node01 system]# systemctl start pushgateway [root@node01 system]# systemctl status pushgateway
如何展示到 grafa
see also
Prometheus 使用 PushGateway 进行数据上报采集
prometheus学习系列十一: Prometheus pushgateway的使用
https://github.com/prometheus/pushgateway
Ephemeral Jobs Monitoring Using Prometheus PushGateway