Page 1 of 1

Monitor systemd with SNMP

Posted: Mon Feb 01, 2021 5:01 pm
by jenglish
Is there a way to monitor until files with SNMP that I am unware of? There isn't much information out there and assume someone here may have a better lead or answer. :-)

Code: Select all

$ systemctl is-active wazuh-manager
active

$ /usr/bin/snmpwalk -v2c -c <string> <hostname> 1.3.6.1.2.1.25.4.2.1.2 | grep -i waz
HOST-RESOURCES-MIB::hrSWRunName.314633 = STRING: "wazuh-db"
HOST-RESOURCES-MIB::hrSWRunName.314806 = STRING: "wazuh-modulesd"

Re: Monitor systemd with SNMP

Posted: Tue Feb 02, 2021 4:14 pm
by cdienger
If you're looking for a plugin I would give this one a try: https://exchange.nagios.org/directory/P ... ce/details

Re: Monitor systemd with SNMP

Posted: Wed Feb 03, 2021 9:50 am
by jenglish
That plugin uses the same functionality as the snmpwalk command example in my first post. It seems that monitoring systemd service files is not possible with snmp.

Re: Monitor systemd with SNMP

Posted: Thu Feb 04, 2021 12:40 pm
by cdienger
Yes, I wasn't sure if you were just looking for a plugin to avoid having to write one from scratch, but this is the only way I'm aware of monitoring a service via snmp.