unknown user: "$"

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
patrick2011
Posts: 6
Joined: Tue Jan 10, 2012 4:43 am

unknown user: "$"

Post by patrick2011 »

Hi,

When a host is up again I get a message that some service are up but also
(expanded from <$>): unknown user: "$"

How can I fix this?

Reg. Patrick.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: unknown user: "$"

Post by mguthrie »

Can you post the contact definition, and also your notification command for this service?
patrick2011
Posts: 6
Joined: Tue Jan 10, 2012 4:43 am

Re: unknown user: "$"

Post by patrick2011 »

Hi,

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
}
Locked