[1389861271.115887] [2048.0] [pid=4089] WARNING: Could not find a macro matching 'CONTACTEMAIL"'!
[1389861271.115895] [2048.0] [pid=4089] WARNING: An error occurred processing macro 'CONTACTEMAIL"'!
define command {
command_name notify-host-by-email
command_line /usr/bin/printf "%b" "***** System Alert *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mailx -r nagios@one.com -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" "$CONTACTEMAIL"
}
$CONTACTEMAIL$ wouldn't expand to actual value
-
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: $CONTACTEMAIL$ wouldn't expand to actual value
Still getting it huh... Could you remove the reference to bin/mailx and instead pipe to a file so that we can see the resulting output from this check?
Code: Select all
define command {
command_name notify-host-by-log
command_line /usr/bin/printf "%b" "***** System Alert *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" >> /tmp/check_log
}
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.