Re: [Nagios-devel] Arguments to check commands

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] Arguments to check commands

Post by Guest »

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=3DApplication \"filter=3Dgenerated gt -2d AND severity NOT IN
('success', 'informational')\" MaxWarn=3D1 MaxCrit=3D10
}

On Wed, Feb 27, 2013 at 5:59 AM, Ton Voon wrote:
> Hi,
>
> It seems like Nagios 4 has changed the way that check_command arguments a=
re 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 e=
valuate a command. However, I'm worried about the migration of existing Nag=
ios configurations.
>
> For instance, this worked in Nagios 3:
>
> ----
> define service {
> ...
> check_command check_nrpe!-H $HOSTADDRESS$ -c CheckEventLog -a=
file=3DApplication \"filter=3Dgenerated gt -2d AND severity NOT IN ('succe=
ss', 'informational')\" MaxWarn=3D1 MaxCrit=3D10
> }
>
> 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=3DApplication "filter=3Dgenerated gt -2d AND severity NOT IN ('succes=
s', 'informational')" MaxWarn=3D1 MaxCrit=3D10
> }
> ----
>
> 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 b=
e 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
> [email protected]
> https://lists.sourceforge.net/lists/lis ... gios-devel





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked