Unable to monitor windows DHCP server in nagiosXI.

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
vinish098
Posts: 136
Joined: Fri Oct 21, 2016 6:30 am

Unable to monitor windows DHCP server in nagiosXI.

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Unable to monitor windows DHCP server in nagiosXI.

Post 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)
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
vinish098
Posts: 136
Joined: Fri Oct 21, 2016 6:30 am

Re: Unable to monitor windows DHCP server in nagiosXI.

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Unable to monitor windows DHCP server in nagiosXI.

Post by scottwilkerson »

You need the interface name of your XI server, not the Windows server.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
vinish098
Posts: 136
Joined: Fri Oct 21, 2016 6:30 am

Re: Unable to monitor windows DHCP server in nagiosXI.

Post by vinish098 »

Hi Scottwilkerson,

After running the command ./check_dhcp -i interface-name we are getting the output as. CRITICAL: No DHCPOFFERs were received.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Unable to monitor windows DHCP server in nagiosXI.

Post 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.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
vinish098
Posts: 136
Joined: Fri Oct 21, 2016 6:30 am

Re: Unable to monitor windows DHCP server in nagiosXI.

Post 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
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Unable to monitor windows DHCP server in nagiosXI.

Post 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.
vinish098
Posts: 136
Joined: Fri Oct 21, 2016 6:30 am

Re: Unable to monitor windows DHCP server in nagiosXI.

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Unable to monitor windows DHCP server in nagiosXI.

Post by scottwilkerson »

Can you run the following to verify what interface name your system is using

Code: Select all

ip address
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked