User Tools

Site Tools


wiki:check_systemd_service_running_via_zabbix

Check if systemd service is running via Zabbix

Zabbix version 4.0.39

Firstly the zabbix agent running on the server must be allowed to execute remote commands, so update your zabbix_agentd.conf by setting

EnableRemoteCommands=1

Restart zabbix agent.

Then you can create an item of type “Zabbix agent”, type of information “Text” and with following expression:

system.run["systemctl is-active myservice.service"]

Now create a trigger from this Item. Add the following Expression and change the hostname to yours

{host1.example.org:system.run["systemctl is-active gobgpd.service"].iregexp(inactive)}=1

If using a template trigger, replace the host with template name:

{Role bgp host:system.run["systemctl is-active myservice.service"].iregexp(inactive)}=1

Tested on

See also

References

wiki/check_systemd_service_running_via_zabbix.txt · Last modified: by antisa

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki