DHCP Monitoring
-
CJIndustries
- Posts: 46
- Joined: Wed Aug 24, 2016 6:39 am
DHCP Monitoring
Hello,
I've been trying to get nagios to monitor my windows 2008 dhcp service with so success. Both servers are on the same network and there are no firewall issue between them. I even setup a new nic on the vm and had it dhcp it's address with success. Every time I try to setup the dhcp monitoring service, I get "No DHCPOFFERs were received".
I've searched the forums and tried everything I could think of. Any help would be awesome. Thanks in advanced.
Mike
I've been trying to get nagios to monitor my windows 2008 dhcp service with so success. Both servers are on the same network and there are no firewall issue between them. I even setup a new nic on the vm and had it dhcp it's address with success. Every time I try to setup the dhcp monitoring service, I get "No DHCPOFFERs were received".
I've searched the forums and tried everything I could think of. Any help would be awesome. Thanks in advanced.
Mike
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: DHCP Monitoring
Can you show the full Run Check Command output for this service?
Previous Nagios employee
-
CJIndustries
- Posts: 46
- Joined: Wed Aug 24, 2016 6:39 am
Re: DHCP Monitoring
I'm sorry, I don't understand what "full Run Check Command output" means. If there is a specific command you would like me to run, let me know. The most I get out of the notifications and manually running the command on the server is "No DHCPOFFERs were received".
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: DHCP Monitoring
Are you using the DHCP Wizard to set things up? If not, what plugin are you using? Please give us a link to the plugin on exchange.na0gios.com or otherwise, not just the name.
To see specifically the Run Check Command, you'll need to go to the service in the CCM (Core Config Manager) under Configure, and then go to the service.
To see specifically the Run Check Command, you'll need to go to the service in the CCM (Core Config Manager) under Configure, and then go to the service.
-
CJIndustries
- Posts: 46
- Joined: Wed Aug 24, 2016 6:39 am
Re: DHCP Monitoring
I just used the wizard to add the service and linked it to the dhcp(domain) controller. The command is "check_dhcp" and the command is "$USER1$/check_dhcp $ARG1$".
Re: DHCP Monitoring
Can you run the following commands from the command line on the Nagios XI server, and show the output?
Note: if your interface's name is not "eth0" you will need to pass it in your command:
Example:
Code: Select all
iptables -nL | grep '161\|162'
nmap -sU <windows server's ip address> -p 161-162
/usr/local/nagios/libexec/check_dhcp <windows server's ip address> -v
Code: Select all
/usr/local/nagios/libexec/check_dhcp -i <interface> <windows server's ip address> -vCode: Select all
[root@main-nagios-xi libexec]# /usr/local/nagios/libexec/check_dhcp -i ens32 x.x.x.x -v
OK: Received 1 DHCPOFFER(s), max lease time = 28800 sec.Be sure to check out our Knowledgebase for helpful articles and solutions!
-
CJIndustries
- Posts: 46
- Joined: Wed Aug 24, 2016 6:39 am
Re: DHCP Monitoring
[root@NAGIOS ~]# iptables -nL | grep '161\|162'
[root@NAGIOS ~]# nmap -sU 10.1.1.100 -p 161-162
Starting Nmap 6.47 ( http://nmap.org ) at 2017-03-01 07:22 EST
Nmap scan report for 10.1.1.100
Host is up (0.00043s latency).
PORT STATE SERVICE
161/udp open|filtered snmp
162/udp open|filtered snmptrap
MAC Address: 34:E6:D7:1B:B2:B1 (Unknown)
Nmap done: 1 IP address (1 host up) scanned in 1.26 seconds
[root@NAGIOS ~]# /usr/local/nagios/libexec/check_dhcp 10.1.1.100 -v
DHCP socket: 3
Hardware address: 00:50:56:88:4c:5c
DHCPDISCOVER to 255.255.255.255 port 67
DHCPDISCOVER XID: 196385898 (0xBB45882)
DHCDISCOVER ciaddr: 0.0.0.0
DHCDISCOVER yiaddr: 0.0.0.0
DHCDISCOVER siaddr: 0.0.0.0
DHCDISCOVER giaddr: 0.0.0.0
send_dhcp_packet result: 548
No (more) data received (nfound: 0)
Result=ERROR
Total responses seen on the wire: 0
Valid responses for this machine: 0
CRITICAL: No DHCPOFFERs were received.
[root@NAGIOS ~]#
[root@NAGIOS ~]# nmap -sU 10.1.1.100 -p 161-162
Starting Nmap 6.47 ( http://nmap.org ) at 2017-03-01 07:22 EST
Nmap scan report for 10.1.1.100
Host is up (0.00043s latency).
PORT STATE SERVICE
161/udp open|filtered snmp
162/udp open|filtered snmptrap
MAC Address: 34:E6:D7:1B:B2:B1 (Unknown)
Nmap done: 1 IP address (1 host up) scanned in 1.26 seconds
[root@NAGIOS ~]# /usr/local/nagios/libexec/check_dhcp 10.1.1.100 -v
DHCP socket: 3
Hardware address: 00:50:56:88:4c:5c
DHCPDISCOVER to 255.255.255.255 port 67
DHCPDISCOVER XID: 196385898 (0xBB45882)
DHCDISCOVER ciaddr: 0.0.0.0
DHCDISCOVER yiaddr: 0.0.0.0
DHCDISCOVER siaddr: 0.0.0.0
DHCDISCOVER giaddr: 0.0.0.0
send_dhcp_packet result: 548
No (more) data received (nfound: 0)
Result=ERROR
Total responses seen on the wire: 0
Valid responses for this machine: 0
CRITICAL: No DHCPOFFERs were received.
[root@NAGIOS ~]#
Re: DHCP Monitoring
I asked you to run a command with wrong ports - my bad. I am sorry about it! Can you run the correct command and show the output?
Do you get even more verbose output if you use more than one "v"?
What is the plugin's version?
Are your Nagios XI and the DHCP server on the same subnet?
Code: Select all
nmap -sU <windows server's ip address> -p 67-68Code: Select all
/usr/local/nagios/libexec/check_dhcp 10.1.1.100 -vvvCode: Select all
/usr/local/nagios/libexec/check_dhcp -VBe sure to check out our Knowledgebase for helpful articles and solutions!
-
CJIndustries
- Posts: 46
- Joined: Wed Aug 24, 2016 6:39 am
Re: DHCP Monitoring
[root@NAGIOS ~]# iptables -nL | grep '67\|68'
[root@NAGIOS ~]# nmap -sU 10.1.1.100 -p 67-68
Starting Nmap 6.47 ( http://nmap.org ) at 2017-03-01 13:24 EST
Nmap scan report for 10.1.1.100
Host is up (0.00042s latency).
PORT STATE SERVICE
67/udp open|filtered dhcps
68/udp open|filtered dhcpc
MAC Address: 34:E6:D7:1B:B2:B1 (Unknown)
Nmap done: 1 IP address (1 host up) scanned in 1.27 seconds
[root@NAGIOS ~]# /usr/local/nagios/libexec/check_dhcp 10.1.1.100 -vvv
DHCP socket: 3
Hardware address: 00:50:56:89:4a:5a
DHCPDISCOVER to 255.255.255.255 port 67
DHCPDISCOVER XID: 37105692 (0x2353404)
DHCDISCOVER ciaddr: 0.0.0.0
DHCDISCOVER yiaddr: 0.0.0.0
DHCDISCOVER siaddr: 0.0.0.0
DHCDISCOVER giaddr: 0.0.0.0
send_dhcp_packet result: 548
No (more) data received (nfound: 0)
Result=ERROR
Total responses seen on the wire: 0
Valid responses for this machine: 0
CRITICAL: No DHCPOFFERs were received.
[root@NAGIOS ~]# /usr/local/nagios/libexec/check_dhcp -V
check_dhcp v2.0.3 (nagios-plugins 2.0.3)
[root@NAGIOS ~]#
[root@NAGIOS ~]# nmap -sU 10.1.1.100 -p 67-68
Starting Nmap 6.47 ( http://nmap.org ) at 2017-03-01 13:24 EST
Nmap scan report for 10.1.1.100
Host is up (0.00042s latency).
PORT STATE SERVICE
67/udp open|filtered dhcps
68/udp open|filtered dhcpc
MAC Address: 34:E6:D7:1B:B2:B1 (Unknown)
Nmap done: 1 IP address (1 host up) scanned in 1.27 seconds
[root@NAGIOS ~]# /usr/local/nagios/libexec/check_dhcp 10.1.1.100 -vvv
DHCP socket: 3
Hardware address: 00:50:56:89:4a:5a
DHCPDISCOVER to 255.255.255.255 port 67
DHCPDISCOVER XID: 37105692 (0x2353404)
DHCDISCOVER ciaddr: 0.0.0.0
DHCDISCOVER yiaddr: 0.0.0.0
DHCDISCOVER siaddr: 0.0.0.0
DHCDISCOVER giaddr: 0.0.0.0
send_dhcp_packet result: 548
No (more) data received (nfound: 0)
Result=ERROR
Total responses seen on the wire: 0
Valid responses for this machine: 0
CRITICAL: No DHCPOFFERs were received.
[root@NAGIOS ~]# /usr/local/nagios/libexec/check_dhcp -V
check_dhcp v2.0.3 (nagios-plugins 2.0.3)
[root@NAGIOS ~]#
Re: DHCP Monitoring
One thing to try is if you left both Ethernet interfaces enabled on the XI server, you would probably have to specify the the interface by using the -i option in your command.
Another thing to try is to specify the DHCP servers IP address in the command so the plugin checks the correct server. Try running the following example and see if that works for you.
Change the eth0 in the above to the correct name of the ethernet adaptor on your system.
You can run the following command to get the names of them.
Another thing to try is to specify the DHCP servers IP address in the command so the plugin checks the correct server. Try running the following example and see if that works for you.
Code: Select all
/usr/local/nagios/libexec/check_dhcp -i eth0 -s 10.1.1.100You can run the following command to get the names of them.
Code: Select all
ip addrBe sure to check out our Knowledgebase for helpful articles and solutions!