[Nagiosplug-help] Help for check_dhcp plugins on Infoblox

Marc Powell marc at ena.com
Wed Jun 3 16:01:23 CEST 2009


On Jun 3, 2009, at 3:39 AM, romains at numericable.fr wrote:

> Hello,
>
> I try to check my DHCP server with Nagios 3.0.3 thanks to the  
> check_dhcp plugins coming from the 1.4.13 plugin pack.
> My approach is, my Nagios server is located in a network  
> 192.168.90.X and my DHCP server 192.168.105.X. And I try to check  
> the correct work of DHCP server with the following command :
> ./check_dhcp -v -u -s 192.168.105.Y -r 192.168.90.B -m 01:AB:23:CD: 
> 45:EF

Are you testing this as root? If so, don't. Test as the nagios user.

> I've make a reservation in my infoblox with this MAC address. I try  
> to analyse the return code but I have nothing,
> echo $result ==> NOTHING

$result isn't a variable that gets populated. That's just something  
displayed in the verbose output for human consumption. It's the exit  
code that matters. Use 'echo $?' immediately after running the plugin.

> How I can verify, if the check works well, and In my web nagios  
> interface toward the check_dhcp I have : (null).
>
>
>
> My declarations in the differents config files :
> Commands.cfg :
> ------------------------
> #'check_dhcp' command definition avec réservation adresse MAC
> define command{
>     command_name     check_dhcp
>     command_line        sudo $USER1$/check_dhcp -u -s 192.168.105.X - 
> r 192.168.90.Y -m 01:AB:23:CD:45:EF
>     }

Here you're using sudo, which is a non-trivial difference compared to  
your apparent test above. A few comments --
	- specify the full path to sudo
	- test the above command as the nagios user; make sure it works  
without being prompted for a password.
	- make sure 'requiretty' is disabled in sudoers.

--
Marc






More information about the Help mailing list