Page 3 of 4

Re: Unable to monitor windows DHCP server in nagiosXI.

Posted: Wed Jul 03, 2019 4:45 pm
by ssax
What does this output?

Code: Select all

su - nagios
/usr/local/nagios/libexec/check_dhcp -v -u -i ens192 -s 172.27.27.104
/usr/local/nagios/libexec/check_dhcp -v -i ens192

Re: Unable to monitor windows DHCP server in nagiosXI.

Posted: Wed Jul 03, 2019 4:46 pm
by tgriep
Try setting the superuser bit on the plugin. Run this as root

Code: Select all

chmod u+s  /usr/local/nagios/libexec/check_dhcp
Test it again.

Re: Unable to monitor windows DHCP server in nagiosXI.

Posted: Wed Jul 03, 2019 4:46 pm
by lmiltchev
Open the UDP ports 67 and 68 on both machines - Nagios XI server and your Windows server. Make sure you don't have any other firewalls/devices in between that may be blocking these ports.

Can you show us the actual config of the "failing" service?

Re: Unable to monitor windows DHCP server in nagiosXI.

Posted: Wed Jul 03, 2019 4:51 pm
by cdienger
Edit the service in the XI web UI - if you're getting an error message that you don't have privileges for eth0 then the configuration is wrong and you should change the service to use ens192 instead.

Re: Unable to monitor windows DHCP server in nagiosXI.

Posted: Thu Jul 04, 2019 1:34 pm
by vinish098
Hello team,

I have disabled firewall on both servers and ports also allowed i checked it. From your end also check i am going to attach all related to DHCP Server running commands and errors.

Please do needful this requirement is for Nagios Enterprise Edition customer. Still problem couldn't resolved.

I am going to attach all now. Please let me know if anything required. We have to close this issue ASAP.

Re: Unable to monitor windows DHCP server in nagiosXI.

Posted: Thu Jul 04, 2019 1:37 pm
by vinish098
There is limit of three attachments in previous reply. Please check continued attachments as previous reply.

Re: Unable to monitor windows DHCP server in nagiosXI.

Posted: Tue Jul 09, 2019 1:54 pm
by cdienger
Please provide the output of:

Code: Select all

su - nagios
/usr/local/nagios/libexec/check_dhcp -v -u -i ens192 -s 172.27.27.104
For quicker responses, customers with support licenses can post to the customer support forums at https://support.nagios.com/forum/viewforum.php?f=3 or create a ticket at https://support.nagios.com/tickets/.

Re: Unable to monitor windows DHCP server in nagiosXI.

Posted: Thu Jul 11, 2019 1:50 pm
by vinish098
Hello cdienger,

Thanks for your reply.

Still we are facing after running above commands. Error like NoDHCP Offers were received.

And one more thing want to know you that dhcp server port number is “49153(TCP)” instead of default ports is 67&68.

I tried command like #./check_dhcp -u -s <dhcp server ip> -i ens192 -p 49153.
No output

Please do needful.

Re: Unable to monitor windows DHCP server in nagiosXI.

Posted: Thu Jul 11, 2019 3:57 pm
by lmiltchev
There is no option in the check_dhcp plugin to pass a custom port... I don't see a "-p" option in the usage.
/usr/local/nagios/libexec/check_dhcp -h
check_dhcp v2.2.1 (nagios-plugins 2.2.1)
Copyright (c) 2001-2004 Ethan Galstad ([email protected])
Copyright (c) 2001-2007 Nagios Plugin Development Team
<[email protected]>

This plugin tests the availability of DHCP servers on a network.


Usage:
check_dhcp [-v] [-u] [-s serverip] [-r requestedip] [-t timeout]
[-i interface] [-m mac]

Options:
-h, --help
Print detailed help screen
-V, --version
Print version information
--extra-opts=[section][@file]
Read options from an ini file. See
https://www.nagios-plugins.org/doc/extra-opts.html
for usage and examples.
-v, --verbose
Show details for command-line debugging (Nagios may truncate output)
-s, --serverip=IPADDRESS
IP address of DHCP server that we must hear from
-r, --requestedip=IPADDRESS
IP address that should be offered by at least one DHCP server
-t, --timeout=INTEGER
Seconds to wait for DHCPOFFER before timeout occurs
-i, --interface=STRING
Interface to to use for listening (i.e. eth0)
-m, --mac=STRING
MAC address to use in the DHCP request
-u, --unicast
Unicast testing: mimic a DHCP relay, requires -s

Send email to [email protected] if you have questions regarding use
of this software. To submit patches or suggest improvements, send email to
[email protected]
It seems to me that this is a misconfiguration issue.
And one more thing want to know you that dhcp server port number is “49153(TCP)” instead of default ports is 67&68.
I am not even sure how this is going to work. In a "default" setup, UDP port number 67 is the destination port of a server, and UDP port number 68 is used by the client. You are showing only one port (“49153(TCP)”)...

In any case, troubleshooting a DHCP server with "non-default ports" is out of scope of nagios support.

Re: Unable to monitor windows DHCP server in nagiosXI.

Posted: Tue Jul 16, 2019 12:24 pm
by vinish098
Hello team,

I mentioned some values in Nagios Command. Please check below snapshots and let me know how this plugin working and what is the output i received.

I didn't understand the output i received after configuring. FYI Please check the output of below screenshot.

And one more thing Customer required to monitor dhcp scopes. If specific scope reached given end IP Address need to get alert in Nagios.

Please help me to monitor dhcp scopes. I got one nagios plugin please help me how to work on this. please check below attached file.