Arguments to check commands

Ton Voon ton.voon at opsview.com
Wed Feb 27 14:59:35 CET 2013


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




More information about the Developers mailing list