check_command in Nagios 2 no longer allows "Raw" Command Line??
Andreas Ericsson
ae at op5.se
Thu Feb 17 09:28:38 CET 2005
Jon Gefaell wrote:
> I'm working to try to port my existing nagios system(s) to nagios V.2.
>
> I'm well along and iteratively addressing problems a nagios -v
> nagios.cfg complains about.
>
> I've found a very painful difference, option 3.) "Raw" Command Line is
> no longer available!
>
> So, I've got a thousand (or so) http checks which all use this method.
> Different parameters are required for each check command. Using this
> option has allowed me to create simple definitions for these commands.
>
> Doing it the 'new'(?) way would require me to come up with a unique and
> descriptive label for each (of over 1,000) service, then chain those to
> the checkcommands.cfg with a unique stanza for each one!
>
> That's .... Well I don't want to contemplate it. Not only is the
> existing conversion tremenedously difficut, but adding services is
> daunting as well. Is there something I'm missing?
>
Probably. Are you aware of the fact that you can pass an arbitrary
amount of parameters to a single check_command simply by omitting the
separating !.
A "raw" command line would then look as such;
check_http_raw!--ssl --url=/some-url --port=8080
With a command definition of;
define command {
command_name check_http_raw
command_line check_http -H $HOSTADDRESS$ $ARG1$
}
To quickly change it, I would suggest using something along these lines;
sed -i 's/\(check_command[\t
]*\)"check_http\([^"]*\)"/\1check_http_raw\2/ services.cfg
Mind the linebreaks, and make sure you make a backup. I haven't tested
the above line.
> Thanks so much!
>
You're welcome.
> -JG
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
> _______________________________________________
> 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
>
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Lead Developer
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
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