Monitoring Linux daemon status in Zabbix
A series of articles on Zabbix monitoring
- Monitoring a specific Linux machine service in Zabbix
- Monitoring a specific Windows service of a machine in Zabbix
- Monitoring a specific Windows process on a machine in Zabbix
- Monitoring Linux daemon status in Zabbix
- Zabbix – monitoring service status in Centos 7 via UserParameter
Enable the “Remote commands” option in Zabbix and restart Zabbix Agent
[[email protected]]# nano /etc/zabbix/zabbix_agentd.conf
EnableRemoteCommands=1
[[email protected]]# service zabbix-agent restart
We create a new data element, for this, go to the web interface:
Settings – Network nodes – select the desired node – Data items
and create a new item
Имя: srv-01:service:Apache:StatusCheck
Ключ: system.run["service httpd status | grep -v grep | grep 'httpd (pid *.*) is running...' | wc -l"]
Тип Информации: Числовой (целое положительное)
Интервал обновления: 60 сек
Next, we create a trigger
Имя: srv-01_Apache
Важность: Высокая
Выражение: {srv-01:system.run["service httpd status | grep -v grep | grep 'httpd (pid *.*) is running...' | wc -l"].last(0)}=0
Описание: Если нет процесса httpd, высылается уведомление
Apache status monitoring has been used as an example in this article.
This monitoring method is suitable when you need to monitor self-written services that cannot be monitored using standard Zabbix tools