Check systemd service status if running or dead

I am currently looking for a way to check if a service is running on a host.

Nagios has a script that checks with SNMP if a service is running or is dead. Process Checks

Is that possible to integrate something similar? People offered already a way to check if a service is running via ssh and a shell script but nagios showed that it should be possible via SNMP.

Yes you can use SNMP extend to do this

Here is a way of doing it:

On the client I use these:

1 Like

Do you need the snmp_extend.py on the LibreNMS Server and the monitoring script on the client or is the snmp_extend enough?

Do you need the snmp_extend.py on the LibreNMS Server and the monitoring script on the client or is the snmp_extend enough?

yes, snmp_extend.py on the LibreNMS Server …

… and script to check service on client and client configuration correct in client’s snmpd config file (simple snmp extend line to call the service monitoring script)

The “snmp agent” exports a process list that will show in the web ui. Although it may be hard alert on.