prometheus04- service monitoring

1.node_exporter node

[root@zabbix-server ~]# cat /usr/lib/systemd/system/node_exporter.service 
[Unit]
Description=node_exporter
Documentation=https://prometheus.io/
After=network.target
[Service]
Type=simple
User=prometheus
ExecStart=/usr/local/node_exporter/node_exporter  --collector.systemd --collector.systemd.unit-whitelist=(docker|sshd|nginx).service
Restart=on-failure
[Install]
WantedBy=multi-user.target
[root@zabbix-server ~]#

2. Restart Configuration

systemctl  daemon-reload
systemctl  restart node_exporter

3. Query

node_systemd_unit_state

2.png

Guess you like

Origin blog.51cto.com/wsxxsl/2444307