Nagios Plugin DHCP Check

Just to try to clarify ds-04’s point…

When you build a service in the Web UI, regardless of what host you assign that service to in the Device drop down, the actual Nagios plugin command is still run on the LibreNMS poller. Not on the device you selected. All the Device field does it determine which device the graphs will be displayed on in the Web UI.

So you are actually running the command…

check_dhcp -H dhcp-server-1 -s dhcp-server-1 -i ens18 -u

…on your LibreNMS poller (-H is inserted from the Remote Host field). Which isn’t really valid.

ds-04’s suggestion would let you run your check_dhcp script locally on the DHCP server via SNMP extend in snmpd and LibreNMS would collect its output as a service with check_snmp_extend.

If you happen to be running the check_mk agent on your DHCP server, check_mrpe could be another option.