Hi Nagios Support,
I would like to consult if there is a way to monitor a DHCP server on different subnet.
We tried monitoring our DHCP server and we reserved a DHCP address to our Nagios server but the result was always 'CRITICAL: No DHCPOFFERs were received.'.
Please take note that the DHCP was on different network with our Nagios server and the Nagios server IP address or network was not included on any of the DHCP scopes on the server.
Here are the procedure that we conducted to monitor our DHCP server.
1. Add the Nagios server on any other scope on the DHCP server.
2. Run the "/usr/local/nagios/libexec/check_dhcp -s <DHCP_SERVER_IP_ADDRESS> -r <IP_ADDRESS_ASSIGNED_TO_NAGIOS> -m <NAGIOS_SERVER_MAC_ADDRESS> -t 7 -u" command.
3. Received a 'CRITICAL: No DHCPOFFERs were received.' result.
One more thing. If monitoring of DHCP server requires a plug-in on the DHCP server, what plug-ins are required and the procedure on setting up DHCP server monitoring?
Your response would be mostly appreciated.
Thank you and have a nice day.
DHCP Monitoring on Different Subnet or Network
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: DHCP Monitoring on Different Subnet or Network
Can you monitor the DHCP server's logs to see if the Nagios DHCP request ever comes in? Also, how are you handling traversing "subnets" (I assume you really mean VLANs since until you get an IP there is no concept of a subnet?) with your DHCP request? Are you using something like Cisco helper IPs?
To eliminate the network confusion, the easiest workaround would be to put a host with network connectivity on the same VLAN as the DHCP server and execute the check using NRPE. That is a simple process, the only prerequisite being that server existing on the remote VLAN.
To eliminate the network confusion, the easiest workaround would be to put a host with network connectivity on the same VLAN as the DHCP server and execute the check using NRPE. That is a simple process, the only prerequisite being that server existing on the remote VLAN.
Re: DHCP Monitoring on Different Subnet or Network
As @jdalrymple wrote, "subnets" don't exist yet until after an IP address has been assigned, so you're talking aobut [potentially virtual] physical network segments. You need to be able to get your DHCP server and your Nagios server on the same [potentially virtual] wire so that they can see each other. The only way to do this is through switch/router magic if your network fabric can be programmed to do that, or by doing what was suggested:
Have a box on the DHCP server network that the Nagios server can access, and run NRPE or a passive check on the box that reports DHCP server status back to Nagios. SSH access would also work, as would any number of agents, but that's the basic idea.
Have a box on the DHCP server network that the Nagios server can access, and run NRPE or a passive check on the box that reports DHCP server status back to Nagios. SSH access would also work, as would any number of agents, but that's the basic idea.
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Re: DHCP Monitoring on Different Subnet or Network
glenl, did jdalrymple and eloyd answer your question?
Be sure to check out our Knowledgebase for helpful articles and solutions!
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: DHCP Monitoring on Different Subnet or Network
Also, keep the local firewall in mind, here is a post that explains it:
https://support.nagios.com/forum/viewto ... cp#p109694
Even though this post is about checking a DHCP scope that the XI server is in, the same applies if the plugin is executed at a remote box.
https://support.nagios.com/forum/viewto ... cp#p109694
Even though this post is about checking a DHCP scope that the XI server is in, the same applies if the plugin is executed at a remote box.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
larrydhelms
Re: DHCP Monitoring on Different Subnet or Network
You might want to look at this: https://exchange.nagios.org/directory/P ... ed/details
It works for us... but requires a couple of PERL modules be installed, as well as being executed BY ROOT. We call it, via NRPE, and added configuration settings in both the nape.cfg / common.cfg - depending on which you prefer, as well as an entry in the sudoers file.
It works for us... but requires a couple of PERL modules be installed, as well as being executed BY ROOT. We call it, via NRPE, and added configuration settings in both the nape.cfg / common.cfg - depending on which you prefer, as well as an entry in the sudoers file.
Re: DHCP Monitoring on Different Subnet or Network
@larrydhelms & Box293
Thanks for the help!
@glenl
Any updates?
Thanks for the help!
@glenl
Any updates?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: DHCP Monitoring on Different Subnet or Network
Hi Everyone,
Sorry for the late reponse and I greatly appreciate the feedbacks.
Well, I was trying to monitor the DHCP server in another country so it was on another VLAN, but the machine was accessible on our country.
I assumed that the DHCP in our remote site would not acknowlegde our DHCP request when we tried to request from our office where our Nagios server resides.
So the only option was to use a NRPE on the remote side where the DHCP server acknowlegde DHCP requests?
I'll look upon that option.
I'm not quite familiar with NRPE monitoring so could you enumerate the procedure to deploy a DHCP monitoring through NRPE?
I would really appreciate your feedback with regards to this.
Thank you.
Sorry for the late reponse and I greatly appreciate the feedbacks.
Well, I was trying to monitor the DHCP server in another country so it was on another VLAN, but the machine was accessible on our country.
I assumed that the DHCP in our remote site would not acknowlegde our DHCP request when we tried to request from our office where our Nagios server resides.
So the only option was to use a NRPE on the remote side where the DHCP server acknowlegde DHCP requests?
I'll look upon that option.
I'm not quite familiar with NRPE monitoring so could you enumerate the procedure to deploy a DHCP monitoring through NRPE?
I would really appreciate your feedback with regards to this.
Thank you.
Re: DHCP Monitoring on Different Subnet or Network
Since your DHCP server is in a remote location, your only choice is to setup a remote NRPE system on that network to check the DHCP server at that location.
Here is a guide for NRPE that has a link for installing NRPE on a linux system.
https://assets.nagios.com/downloads/nag ... g_NRPE.pdf
Take a look at it and post back any questions.
Here is a guide for NRPE that has a link for installing NRPE on a linux system.
https://assets.nagios.com/downloads/nag ... g_NRPE.pdf
Take a look at it and post back any questions.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: DHCP Monitoring on Different Subnet or Network
Hi tgriep,
Thank for the guide.
I've tested deploying a Linux server with NRPE then tried configuring a check_dhcp monitoring on that NRPE agent then tried to connect it to our Nagios server. It was successful and was abled to monitor our DHCP server.
You can now close this thread.
Thank you everyone for assistance.
Thank for the guide.
I've tested deploying a Linux server with NRPE then tried configuring a check_dhcp monitoring on that NRPE agent then tried to connect it to our Nagios server. It was successful and was abled to monitor our DHCP server.
You can now close this thread.
Thank you everyone for assistance.