Page 1 of 1
check dhcp on Router
Posted: Mon Dec 18, 2017 11:56 am
We have a customer with a complete mac/linux environment and the dhcp server is running on both Routers (different pools) onsite.
Is there a check we can use to check the dhcp (status (running...), scope, leases etc.?)
Thanks
Martin
Re: check dhcp on Router
Posted: Mon Dec 18, 2017 1:26 pm
by bolson
There are several on the Nagios Exchange. I'm sure one of these will meet your needs. There is also a wizard in Nagios XI for monitoring a dhcp server.
https://exchange.nagios.org/index.php?o ... hword=dhcp
Re: check dhcp on Router
Posted: Mon Dec 18, 2017 7:03 pm
Thanks Brian, I checked the command in the cli and it gives me a critical error back:
CRITICAL: No DHCPOFFERs were received.
I checked against one of the routers (edgerouter v1.9.7+hotfix.4 from ubiquity) doing the dhcp on the network
check_dhcp --serverip=ipaddress
Maybe that does not work with those devices?
Thanks a lot
Best
Martin
Re: check dhcp on Router
Posted: Tue Dec 19, 2017 11:17 am
by bolson
Try this:
Code: Select all
check_dhcp -s <ip_of_dhcp_server> -u
Let me know if this works. Thank you!
Re: check dhcp on Router
Posted: Tue Dec 19, 2017 11:25 am
by bolson
The trick here is that depending on the configuration of your dhcp server, dhcpd is expecting requests to be "broadcast" or "unicast". The default for the check_dhcp plugin is broadcast so if your dhcp server is expecting a unicast request, you need to include the -u flag.