On 26 May 2010, at 15:42, Darren Hill wrote:

Hi,

I have qpage working, and it accepts the $HOSTNAME$ variable, but no matter what I do to quote the variable, etc. it does not seem to pass the information. It just comes across as $

For example, this is right off the nagios mailing list as a command that works:

define command{
       command_name notify-by-darrens-sms-services
command_line /usr/local/nagios/libexec/notifications/echo -e "$SERVICEDESC$ on $HOSTNAME$ just went '$SERVICESTATE$'" | qpage -f nagios -p $CONTACTNAME$
}

My actual page says $ on darrenlt just went $

$HOSTNAME$ and $CONTACTNAME$ appear to be observed, but it doesn't want to recognize SERVICEDESC$ or $SERVICESTATE$

Any ideas?

What is the definition in the misccommands.cfg file?

The other approach is to have your own script and in there reference the variables via the environment (eg, HOSTNAME is available from $NAGIOS_HOSTNAME). I personally think this is much easier to debug than trying to do the substitutions in the command definitions.

Ton

_______________________________________________
Opsview-users mailing list
Opsview-users@lists.opsview.org
http://lists.opsview.org/lists/listinfo/opsview-users

Reply via email to