I get emails but I can't fill them with any information from the specific alarms
Martin Melin
mmelin at gmail.com
Tue Dec 29 16:09:46 CET 2009
If your nagios.cfg sets enable_environment_macros to 0, that would be
the problem.
Otherwise, possibly HOSTADDRESS does not have a value for this
service. Have you tried sending just $SERVICESTATE$ instead? (a
service notification will always have a value for the macro)
Regards
Martin Melin
On Tue, Dec 29, 2009 at 4:01 PM, Jorge Gil <georgyboy at gmail.com> wrote:
> 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
>
> ------------------------------------------------------------------------------
> 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
> _______________________________________________
> 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
>
------------------------------------------------------------------------------
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
_______________________________________________
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