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
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
Code: Select all
chmod u+s /usr/local/nagios/libexec/check_dhcp
Code: Select all
su - nagios
/usr/local/nagios/libexec/check_dhcp -v -u -i ens192 -s 172.27.27.104
It seems to me that this is a misconfiguration issue./usr/local/nagios/libexec/check_dhcp -h
check_dhcp v2.2.1 (nagios-plugins 2.2.1)
Copyright (c) 2001-2004 Ethan Galstad (nagios@nagios.org)
Copyright (c) 2001-2007 Nagios Plugin Development Team
<devel@nagios-plugins.org>
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 help@nagios-plugins.org if you have questions regarding use
of this software. To submit patches or suggest improvements, send email to
devel@nagios-plugins.org
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)”)...And one more thing want to know you that dhcp server port number is “49153(TCP)” instead of default ports is 67&68.