[Nagiosplug-help] dhcp plugins

Werner Flamme werner.flamme at ufz.de
Wed Jan 25 10:12:54 CET 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Audish, Joe - Paramount [24.01.2012 18:09]:

> Hello Everyone,
> 
> I am having the same issue here is my command definition
> 
> define service{ use                             critical-service 
> host_name                       msdhcp01 service_description
> Check DHCP services contact_groups
> xxxxxx,xxxxxxx-xx check_command
> check_dhcp!xxxxxx.xxxxxx.xx.xxxx.com -i bond0
> 
> }
> 
> define command{ command_name    check_dhcp command_line
> $USER1$/check_dhcp -s $HOSTADDRESS$ }
> 
> 
> 
> Joe Audish

Hi Joe,

you do not use the parameters of the the check_command line from the
service definition inside the command_line of the check. Just
copy&paste error?

Does the check work when it is executed manually on the shell command
line on the nagios host? Does it work when it is executed as user
"nagios"?

Check commands (for example) are
'/usr/lib/nagios/plugins/check_dhcp -s a.b.c.d' (a.b.c.d is the
IPADDRESS of msdhcp01)
su - nagios -c "/usr/lib/nagios/plugins/check_dhcp -s a.b.c.d"

Following the given definitions, you do not use the parameters
"xxxxxx.xxxxxx.xx.xxxx.com -i bond0". Maybe you want to use another
command_line, like "$USER1$/check_dhcp -s $ARG1$"?

And - at least my version - has as argument:
- ---snip---
 -s, --serverip=IPADDRESS
    IP address of DHCP server that we must hear from
- ---pins---

So, instead of using the hostname in your check_command line, you
should use the host's IP address-

Werner
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk8fx5YACgkQk33Krq8b42OF9wCdGRkK/RfKyYQgsq0td5UwTqaK
AFkAn3ZXmwoNQpiq7CxaTen9NiP0R70f
=Z8/0
-----END PGP SIGNATURE-----




More information about the Help mailing list