problem monitoring ldap service

Marc Powell marc at ena.com
Fri Oct 23 23:02:59 CEST 2009


On Oct 23, 2009, at 3:30 PM, Hanspeter Kunz wrote:

> On Fri, 2009-10-23 at 13:14 -0700, Morris, Patrick wrote:
>> Hanspeter Kunz wrote:
>>> Hi,
>>>
>>> I'm trying to monitor an ldap service:
>>>
>>> define service {
>>>        check_command                  check_ldap! 
>>> dc=ifi,dc=uzh,dc=ch!-3

>>> However, if I execute the following command (on the nagios server)
>>>
>>>  check_ldap -H host.ifi.uzh.ch -b dc=ifi,dc=uzh,dc=ch -3
>>>
>>> (which should do correspond exactly to the above config as far as I
>>> understand it)
>>>
>> It does not correspond exactly, necessarily (and, in fact, most  
>> likely
>> does not).  It depends how your check_ldap command is defined in your
>> Nagios configuration.
>
> check_ldap is defined as:
>
>  check_ldap /usr/lib/nagios/plugins/check_ldap -H '$HOSTADDRESS$' -b
> '$ARG1$'
>
> and I can't find any difference to the shell command above.

In your service check_command, you are specifying the following --
check_command = check_ldap
$ARG1$ = dc=ifi,dc=uzh,dc=ch
$ARG2$ = -3

Based on the check_ldap command definition you provide,

/usr/lib/nagios/plugins/check_ldap -H '$HOSTADDRESS$' -b '$ARG1$'

nagios is being told to run --

/usr/lib/nagios/plugins/check_ldap -H 'value of "address" parameter  
from host definition' -b 'dc=ifi,dc=uze,dc=ch'

This is different from your command line test (below) in significant  
ways that will cause it to fail.

check_ldap -H host.ifi.uzh.ch -b dc=ifi,dc=uzh,dc=ch -3

I'd suggest reading the documentation on Using Macros in Commands.

--
Marc


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list