unknown user: $
Posted: Tue May 29, 2012 7:10 am
Hi,
Can someone please help with this problem.
When a server is up (while it has not been down !) I get a email:
Undelivered Mail Returned to Sender
<[email protected]> (expanded from <$>): unknown user: "$"
This is contacts.cfg
define contact {
contact_name nagiosadmin
alias Nagios Admin
host_notification_period workhours
host_notification_options d,u,r,f,s
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
email nagios@localhost
use generic-contact
register 1
}
and the command:
define command {
command_name notify-host-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
register 1
}
Can someone please help with this problem.
When a server is up (while it has not been down !) I get a email:
Undelivered Mail Returned to Sender
<[email protected]> (expanded from <$>): unknown user: "$"
This is contacts.cfg
define contact {
contact_name nagiosadmin
alias Nagios Admin
host_notification_period workhours
host_notification_options d,u,r,f,s
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
email nagios@localhost
use generic-contact
register 1
}
and the command:
define command {
command_name notify-host-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
register 1
}