I get emails but I can't fill them with any information from the specific alarms

Jorge Gil georgyboy at gmail.com
Tue Dec 29 16:01:13 CET 2009


Hi all:

First of all, thank you very much for your support to other users, I have
gone thru hundreds of your emails, but still I couldnt find the solution to
my case...

I have set up email notifications in nagios, and I do get emails, but I cant
make Nagios send me any information like $hostname$ in the body of the
email. When I tried the typical configuration for nagios, like:


# 'notify-service-by-email' command definition

define command{

command_name notify-service-by-email

command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type:
$NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress:
$HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time:
$LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /usr/bin/mail -s
"** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is
$SERVICESTATE$ **" $CONTACTEMAIL$

}



i wasnt getting emails.

Now a simplified version of the command:



# 'notify-service-by-email' command definition

define command{

command_name notify-service-by-email

command_line printf "%b" "$HOSTADDRESS$" | /usr/bin/mail -s Subject_of_email
my_email_address

}

does send me emails, but it doesnt translate the hostaddress, i get just a
dollar sign in the body of the email.

I have tried to put hostaddress in small letters, with and without quotation
marks, redone all the possible files that call the alert... and I am lost.

What can be wrong, please? How can I make Nagios translate those variables
into the actual information they contain? (for the service checks, they
actually work, I see the state change in the Nagios webserver, individually
for all the hosts that I set up)

Thanks a lot,

Jorge
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20091229/dfa6172b/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list