[Nagiosplug-help] check_http problem
Werner Flamme
werner.flamme at ufz.de
Tue Aug 23 17:54:00 CEST 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ah, so it's not doubled. Thank you!
Regards,
Werner
Alex Griffin [23.08.2011 16:19]:
> The -I in the command definition makes it possible to use the check_http
> command without specifying any additional parameters if the IP address
> is the same as the host address. If you do specify another -I option it
> overwrites the first one.
>
> Alex Griffin
> ---
> Tech Team
> agriffin at nagios.com
>
> On 8/23/2011 8:30 AM, Werner Flamme wrote:
> Alex,
>
> what does the -I in the command definition do? In the way you give the
> service definition, the resulting commandline was
>
> ..../check_http -I xxx.xxx.xxx.102 -I xxx.xxx.xxx.102 -H domainname.com
> -t 60 -S
>
> Or what did I see wrong?
>
> Regards,
> Werner
>
>
> Alex Griffin [22.08.2011 17:39]:
>>>> Your command definition does not have any $ARGN$ variables, so it is not
>>>> even seeing the custom addresses you specified. I recommend changing
>>>> your command definition to the following:
>>>>
>>>> define command {
>>>> command_name check_http
>>>> command_line $USER1$/check_http -I $HOSTADDRESS$ $ARG1$
>>>> }
>>>>
>>>> Then change your service definition to:
>>>>
>>>> define service {
>>>> use generic-service
>>>> host_name server-prod
>>>> service_description server-domainname.com
>>>> <http://server.domainname.com>
>>>> check_command check_http!-I xxx.xxx.xxx.102 -H
>>>> domainname.com -t 60 -S
>>>> }
>>>>
>>>> Alex Griffin
>>>> ---
>>>> Tech Team
>>>> agriffin at nagios.com
>>>>
>>>> On 08/21/2011 09:51 AM, Chris Datfung wrote:
>>>>> On Thu, Aug 18, 2011 at 5:45 PM, Alex Griffin<agriffin at nagios.com
>>>>> <mailto:agriffin at nagios.com>> wrote:
>>>>>
>>>>> Can you post your command definition?
>>>>>
>>>>>
>>>>> define command{
>>>>> command_name check_http
>>>>> command_line /usr/lib/nagios/plugins/check_http -H '$HOSTADDRESS$' -I
>>>>> '$HOSTADDRESS$'
>>>>> }
>>>>> Is there any easy way I can add debugging to that to see what's going
>>>>> wrong? Like I said, testing via the CLI works fine.
>>>>>
>>>>> In the mean time, when you test
>>>>>
>>>>> plugins from the command line, make sure you run them as the nagios
>>>>>
>>>>> user. In this case I doubt it would make a difference unless your
>>>>> machine is really locked down, but sometimes it makes a very big
>>>>> difference.
>>>>>
>>>>>
>>>>> Testing using the nagios user made no difference.
>>>>>
>>>>> Thanks,
>>>>> Chris
>>>>>
>>>>>
>>>>> > }
>>>>> >
>>>>> > define service {
>>>>> > use generic-service
>>>>> > host_name server-prod
>>>>> > service_description server-domainname.com
>>>>> <http://server-domainname.com> <http://server-domainname.com>
>>>>> > check_command check_http!-I xxx.xxx.xxx.102 -H domainname.com
>>>>> <http://domainname.com>
>>>>> > <http://domainname.com> -t 60 -S
>>>>> > }
>>>>> >
>>>>> > Why does this check work via the CLI and fail when Nagios runs it? How
>>>>> > can I add debugging that shows up in the logs for this specific check?
>>>>> >
>>>>> > Thanks,
>>>>> > Chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/
iEYEARECAAYFAk5TzRgACgkQk33Krq8b42POPQCdFRUKT/ixR3RXDcBgS0sJmepa
YQ8An3lFED5Vmeb6wSx2A431Z7lBKX0h
=g7se
-----END PGP SIGNATURE-----
More information about the Help
mailing list