[Nagiosplug-help] check_http problem

Alex Griffin agriffin at nagios.com
Mon Aug 22 17:39:03 CEST 2011


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
>  >
>  >
>  >
>  >
> ------------------------------------------------------------------------------
>  > 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
> <mailto: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
>
> ------------------------------------------------------------------------------
> 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
> <mailto: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
>
>
>
> ------------------------------------------------------------------------------
> 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