Page 1 of 4

Unable to monitor windows DHCP server in nagiosXI.

Posted: Mon Jun 17, 2019 5:13 am
by vinish098
Hi,

We are trying to monitor the Windows DHCP server in NagiosXI. But we are getting an error called error: could bind the socket to interface eth0. check your privileges.

Pls, help us to solve this issue. Its windows DHCP server.

Re: Unable to monitor windows DHCP server in nagiosXI.

Posted: Mon Jun 17, 2019 9:54 am
by scottwilkerson
Can you show the command Nagios is trying to run (from the CCM -> Service)

also, from the CLI can you show the output of the following commands

Code: Select all

ls -l /usr/local/nagios/libexec/check_dhcp
ip add
You will likely have to specify the interface name with the -i flag, it defaults to eth0 but your interface may have a different name (see in the ip add command)

Re: Unable to monitor windows DHCP server in nagiosXI.

Posted: Mon Jun 17, 2019 11:02 am
by vinish098
Hi,

Thanks for the reply, As you said need to provide interface name with -I in the check_dhcp plugin. But how can we get this info in windows server? these things are possible only on Linux. Can you pls help me to in this problem for monitoring of windows DHCP server.

Re: Unable to monitor windows DHCP server in nagiosXI.

Posted: Mon Jun 17, 2019 11:04 am
by scottwilkerson
You need the interface name of your XI server, not the Windows server.

Re: Unable to monitor windows DHCP server in nagiosXI.

Posted: Tue Jun 18, 2019 5:09 am
by vinish098
Hi Scottwilkerson,

After running the command ./check_dhcp -i interface-name we are getting the output as. CRITICAL: No DHCPOFFERs were received.

Re: Unable to monitor windows DHCP server in nagiosXI.

Posted: Tue Jun 18, 2019 6:39 am
by scottwilkerson
Is your XI server on the same network segment to be able to receive an offer from the Windows server?

If so, then, this sounds like the DHCP server isn't functioning.

Re: Unable to monitor windows DHCP server in nagiosXI.

Posted: Fri Jun 28, 2019 8:54 am
by vinish098
Hi scott,

Thanks for your reply.

We are trying to run below commands in nagios server.

#./check_dhcp -v -u -s <dhcp IP address>
Error: Could not bind socket to interface eth0, check your priviliges.

#telnet <dhcp ip address> 67 or 68(default dhcp port numbers)
error: couldnot connect to ip address, connection refused.

DHCP Server is windows server. we want to any modifications. please let us know.

Errors is attached.

Thanks

Re: Unable to monitor windows DHCP server in nagiosXI.

Posted: Fri Jun 28, 2019 2:34 pm
by ssax
Please run these commands:

Code: Select all

firewall-cmd --permanent --add-service dhcp
firewall-cmd --permanent --add-port 68/udp
firewall-cmd --complete-reload
Then try it again.

Re: Unable to monitor windows DHCP server in nagiosXI.

Posted: Tue Jul 02, 2019 12:27 am
by vinish098
Hello ssax,

After executing given commands still we are facing Error: Could not bind socket to interface eth0. Check your privileges....

Critical: No DHCPOFFERS were received.

Re: Unable to monitor windows DHCP server in nagiosXI.

Posted: Tue Jul 02, 2019 7:17 am
by scottwilkerson
Can you run the following to verify what interface name your system is using

Code: Select all

ip address