Nagios 3.4 Macros not substituting on RHEL 6
Posted: Wed Mar 06, 2013 5:31 pm
I just installed Nagios 3.4 on RHEL 6.
After configuration, email notifications are failing.
All macros are being passed un-interpreted:
Subject: $HOSTNAME$ is $HOSTSTATE$
***** Nagios *****\n\n\nHost shnagiosp00$ [$] is $\n\nDate/Time: $\n
here are my command defininitions:
# 'host-notify-by-email' command definition
define command{
command_name host-notify-by-email
command_line /bin/echo "***** Nagios *****\n\n$HOSTALIAS\nHost $HOSTNAME$ [$HOSTADDRESS$] is $HOSTSTATE$\n\nDate/Time: $SHORTDATETIME$\n" | /bi
n/mailx -r "[email protected]" -s '$HOSTNAME$ is $HOSTSTATE$' $CONTACTEMAIL$
}
# 'host-notify-by-pager' command definition
define command{
command_name host-notify-by-pager
command_line /bin/echo "***** Nagios *****\n\n$HOSTALIAS\nHost $HOSTNAME$ [$HOSTADDRESS$] is $HOSTSTATE$\n\nDate/Time: $SHORTDATETIME$\n" | /bi
n/mailx -r "[email protected]" -s '$HOSTNAME$ is $HOSTSTATE$' $CONTACTPAGER$
}
# 'host-notify-by-both' command definition
define command{
command_name host-notify-by-both
command_line /bin/echo "***** Nagios *****\n\n$HOSTALIAS\nHost $HOSTNAME$ [$HOSTADDRESS$] is $HOSTSTATE$\n\nDate/Time: $SHORTDATETIME$\n" | /bi
n/mailx -r "[email protected]" -s '$HOSTNAME$ is $HOSTSTATE$' $CONTACTEMAIL$ $CONTACTPAGER$
}
And I have tried setting illegal_macro_output_chars both ways.
Has anyone seen this, and know how to correct?
After configuration, email notifications are failing.
All macros are being passed un-interpreted:
Subject: $HOSTNAME$ is $HOSTSTATE$
***** Nagios *****\n\n\nHost shnagiosp00$ [$] is $\n\nDate/Time: $\n
here are my command defininitions:
# 'host-notify-by-email' command definition
define command{
command_name host-notify-by-email
command_line /bin/echo "***** Nagios *****\n\n$HOSTALIAS\nHost $HOSTNAME$ [$HOSTADDRESS$] is $HOSTSTATE$\n\nDate/Time: $SHORTDATETIME$\n" | /bi
n/mailx -r "[email protected]" -s '$HOSTNAME$ is $HOSTSTATE$' $CONTACTEMAIL$
}
# 'host-notify-by-pager' command definition
define command{
command_name host-notify-by-pager
command_line /bin/echo "***** Nagios *****\n\n$HOSTALIAS\nHost $HOSTNAME$ [$HOSTADDRESS$] is $HOSTSTATE$\n\nDate/Time: $SHORTDATETIME$\n" | /bi
n/mailx -r "[email protected]" -s '$HOSTNAME$ is $HOSTSTATE$' $CONTACTPAGER$
}
# 'host-notify-by-both' command definition
define command{
command_name host-notify-by-both
command_line /bin/echo "***** Nagios *****\n\n$HOSTALIAS\nHost $HOSTNAME$ [$HOSTADDRESS$] is $HOSTSTATE$\n\nDate/Time: $SHORTDATETIME$\n" | /bi
n/mailx -r "[email protected]" -s '$HOSTNAME$ is $HOSTSTATE$' $CONTACTEMAIL$ $CONTACTPAGER$
}
And I have tried setting illegal_macro_output_chars both ways.
Has anyone seen this, and know how to correct?