check_dhcp failing after 2.1 upgrade

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
cmerchant
Posts: 546
Joined: Wed Sep 24, 2014 11:19 am

Re: check_dhcp failing after 2.1 upgrade

Post by cmerchant »

Sorry if i'm repeating myself, could you tell us if a schedule a force immediate check works? Could you show us the view text config from:

Config --> Services --> select your service --> Click on Diskette Icon (view text config) and show us the output. Thanks.
XenoPhage
Posts: 56
Joined: Sun Jun 03, 2012 11:37 am

Re: check_dhcp failing after 2.1 upgrade

Post by XenoPhage »

cmerchant wrote:Sorry if i'm repeating myself, could you tell us if a schedule a force immediate check works?
No, that doesn't work either.
cmerchant wrote:Could you show us the view text config from:

Config --> Services --> select your service --> Click on Diskette Icon (view text config) and show us the output. Thanks.

Code: Select all

define service {
	service_description		DHCP Service Check
	use				service-server-standard
	hostgroup_name			dhcp-server-standard
	servicegroups			dhcp-server-standard
	check_command			check_dhcp!192.168.1.1!"c0:ff:ee:15:c0:01"!!!!!!
	register			1
	}
Yes, I have changed the IP and the MAC here. No, that's not the IP of the DHCP server, that is the IP I'm requesting. This does work via CLI, and it does work via the "Test Check Command" interface. It simply does not work for a normal check, forced or otherwise.

Here's the output from "Test Check Command" :

Code: Select all

COMMAND: /usr/local/nagios/libexec/check_dhcp -u -s 192.168.0.1 -r 192.168.1.1 -m "c0:ff:ee:15:c0:01" -t 5
OUTPUT: OK: Received 1 DHCPOFFER(s), 1 of 1 requested servers responded, requested address (192.168.1.1) was offered, max lease time = 86400 sec.
bdgoecke
Posts: 36
Joined: Wed Oct 22, 2014 3:41 pm

Re: check_dhcp failing after 2.1 upgrade

Post by bdgoecke »

We were able to duplicate your issue, and am looking into the cause. We will post a fix as soon as we can.

In the mean time if you can use 7 or less arguments that command should work correctly.

==>brian.
XenoPhage
Posts: 56
Joined: Sun Jun 03, 2012 11:37 am

Re: check_dhcp failing after 2.1 upgrade

Post by XenoPhage »

bdgoecke wrote:We were able to duplicate your issue, and am looking into the cause. We will post a fix as soon as we can.

In the mean time if you can use 7 or less arguments that command should work correctly.

==>brian.
Hrm.. ok. That doesn't seem to be working, though. I dropped the "-t 5" argument which should put me at exactly 7 arguments. Forcing a check doesn't work. Test Check Command doesn't work either.

Note : I upgraded to R2.3 this morning and that broke the Test Check Command again, though..
bdgoecke
Posts: 36
Joined: Wed Oct 22, 2014 3:41 pm

Re: check_dhcp failing after 2.1 upgrade

Post by bdgoecke »

Sorry. I was off by 1, that should be 6 or less arguments.

==>brian.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_dhcp failing after 2.1 upgrade

Post by scottwilkerson »

Ok, we have narrowed this down and have a fix.

Open /usr/local/nagiosxi/scripts/restart_nagios_with_export.sh
On line 44 replace

Code: Select all

sudo ./manage_services.sh restart nagios
with

Code: Select all

./manage_services.sh restart nagios
Also, unzip the attachment and place file in /usr/local/nagiosxi/cron
cmdsubsys.zip
Finally, apply configuration through the Web UI
You do not have the required permissions to view the files attached to this post.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
XenoPhage
Posts: 56
Joined: Sun Jun 03, 2012 11:37 am

Re: check_dhcp failing after 2.1 upgrade

Post by XenoPhage »

scottwilkerson wrote:Ok, we have narrowed this down and have a fix.
Ah, excellent. That worked. This fix will make it into R2.4?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: check_dhcp failing after 2.1 upgrade

Post by lmiltchev »

This fix will make it into R2.4?
Most probably - it's a small change.

I am glad your issue has been resolved! I am locking this topic.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked