Arguments to check commands
William Leibzon
william at leibzon.org
Wed Feb 27 16:04:14 CET 2013
Don't use macros as arguments to commands at service definition. I
don't think this was ever documented in nagios 3 as beinf ok either
even if it worked. So try to see if this works:
define command {
command_name check_nrpe
command_line /usr/local/nagios/libexec/check_nrpe -H
$HOSTADDRESS$ $ARG1$
}
define service {
...
check_command check_nrpe!-c CheckEventLog -a
file=Application \"filter=generated gt -2d AND severity NOT IN
('success', 'informational')\" MaxWarn=1 MaxCrit=10
}
On Wed, Feb 27, 2013 at 5:59 AM, Ton Voon <ton.voon at opsview.com> wrote:
> Hi,
>
> It seems like Nagios 4 has changed the way that check_command arguments are parsed. Overall, this looks like a good thing as I think it looks easier to understand as it seems to be much more similar to how the shell would evaluate a command. However, I'm worried about the migration of existing Nagios configurations.
>
> For instance, this worked in Nagios 3:
>
> ----
> define service {
> ...
> check_command check_nrpe!-H $HOSTADDRESS$ -c CheckEventLog -a file=Application \"filter=generated gt -2d AND severity NOT IN ('success', 'informational')\" MaxWarn=1 MaxCrit=10
> }
>
> define command {
> command_name check_nrpe
> command_line /usr/local/nagios/libexec/check_nrpe $ARG1$
> }
> ----
>
> In Nagios 4, this fails. To get the same result, you need to configure it as:
> ----
> define service {
> ...
> check_command check_nrpe!-H $HOSTADDRESS$ -c CheckEventLog -a file=Application "filter=generated gt -2d AND severity NOT IN ('success', 'informational')" MaxWarn=1 MaxCrit=10
> }
> ----
>
> I can't quite understand the Nagios 3 rules versus the Nagios 4 rules or what the conversion process should be. Is there anything that is going to be provided for Nagios 4 to ease migrating existing configurations?
>
> Ton
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> _______________________________________________
> Nagios-devel mailing list
> Nagios-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-devel
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
More information about the Developers
mailing list