Univention Bugzilla – Bug 49106
Monitoring check for dhcpd
Last modified: 2022-06-27 17:48:19 CEST
We should have a monitoring check for the DHCP server. It should either check for running processes or even better use check_dhcp, but that might require a dummy client to receive an IP address for the check.
The Nagios "check_dhcp" command from "/usr/share/monitoring-plugins/templates-basic/dhcp.cfg" only works, when the DHCP server is different from the Nagios server (as dhcpd sends the DHCPOFFER out over the interface using RAW sockets). DHCP must be configured to hand out a lease to the Nagios server. The following works *IF* the DHCP host != Nagios host: udm dhcp/host create --set host=nagios --set hwaddress='ethernet 00:11:22:33:44:55' --set fixedaddress=10.200.17.254 --superordinate "cn=$(ucr get domainname),cn=dhcp,$(ucr get ldap/base)" udm nagios/service create --position "cn=nagios,$(ucr get ldap/base)" --set checkCommand=check_dhcp --set checkPeriod=24x7 --set name=dhcp --set checkArgs=-m=00:11:22:33:44:55 --set notificationPeriod=24x7 udm computers/... modify --dn ... --append nagiosServices="cn=dhcp,cn=nagios,$(ucr get ldap/base)" "check_dhcp" requires 'cap_net_raw', see /usr/share/doc/monitoring-plugins/README.Debian.gz: # /var/lib/dpkg/info/monitoring-plugins-basic.postinst configure