Problem with notifications
Vinod Moraes
vinod.moraes at gmail.com
Tue Mar 15 13:57:43 CET 2005
Hi
I had similar problem.
There is a problem with your notify-by-email command definition
Please try the one below it should work fine.
# 'notify-by-email' command definition
define command{
command_name notify-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotificatio
n Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress
: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditiona
l Info:\n\n$SERVICEOUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTA
LIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
}
# 'notify-by-epager' command definition
define command{
command_name notify-by-epager
command_line /usr/bin/printf "%b" "Service: $SERVICEDESC$\nHost: $HOS
TNAME$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\nInfo: $SERVICEOUTPUT$\nDa
te: $LONGDATETIME$" | /bin/mail -s "$NOTIFICATIONTYPE$: $HOSTALIAS$/$SERVICEDESC
$ is $SERVICESTATE$" $CONTACTPAGER$
}
# 'host-notify-by-email' command definition
define command{
command_name host-notify-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotificatio
n Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOST
ADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "Hos
t $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
}
# 'host-notify-by-epager' command definition
define command{
command_name host-notify-by-epager
command_line /usr/bin/printf "%b" "Host '$HOSTALIAS$' is $HOSTSTATE$\
nInfo: $HOSTOUTPUT$\nTime: $LONGDATETIME$" | /bin/mail -s "$NOTIFICATIONTYPE$ al
ert - Host $HOSTNAME$ is $HOSTSTATE$" $CONTACTPAGER$
}
Regards
Vinod Moraes
On Tue, 15 Mar 2005 13:43:02 +0100, nagiosadmin <nagiosadmin at snef.fr> wrote:
>
> Hi,
>
> I have a little problem in my email notifications messages. Here is an
> example of my email notifications :
>
>
> ***** Nagios *****
>
> Notification Type: RECOVERY
>
> Service: Check SMTP
>
> Host: Relay Mail
>
> Address: 192.168.126.5
>
> State: OK
>
> Date/Time: $
>
> Additional Info:
>
> $
>
>
>
> I don't have informations about time and additional info, someone know why ?
>
>
>
>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
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