[Nagiosplug-help] check_http problem

Alex Griffin agriffin at nagios.com
Tue Aug 23 16:19:32 CEST 2011


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:
> -----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-----
>
> ------------------------------------------------------------------------------
> Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
> user administration capabilities and model configuration. Take
> the hassle out of deploying and managing Subversion and the
> tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
> _______________________________________________
> Nagiosplug-help mailing list
> Nagiosplug-help at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> ::: Please include plugins version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null




More information about the Help mailing list