[Nagiosplug-help] check_http problem

Werner Flamme werner.flamme at ufz.de
Tue Aug 23 15:30:12 CEST 2011


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

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/

iEYEARECAAYFAk5Tq2QACgkQk33Krq8b42Nw2gCggAVqCEYRcn1KJ2p7nF6ohYYm
82IAn3cNGJDcC6uZfb7cs7zbcAblzRH7
=i/lz
-----END PGP SIGNATURE-----




More information about the Help mailing list