Nagios Core
Posted: Fri Aug 10, 2018 11:24 am
I'm upgrading Nagios for a client from Version 1.2 up to Nagios Core 4.3.4 . I have everything working but the notifications properly. I'm not getting any INFO or the Date/Time in my notifications.
Here's what an old notification from the old system looks like:
Here’s what I’m getting from the new system (different host):
As you can see I'm not getting anything for Info and Date/Time.
Here is my notification command config:
I think I'm missing something very simple but I can't find it. Anything thoughts?
Here's what an old notification from the old system looks like:
Code: Select all
** Nagios Riverton **
Notification Type: PROBLEM
Host: Site
Name: Site2
State: DOWN
Address: x.x.x.x
Info: PING CRITICAL - Packet loss = 100%
Date/Time: Fri Aug 10 06:29:08 MDT 2018
Here’s what I’m getting from the new system (different host):
Code: Select all
** Nagios Riverton **
Notification Type: PROBLEM
Host: Site2
Name: Site3
State: DOWN
Address: y.y.y.y
Info: $
Date/Time: $
Here is my notification command config:
Code: Select all
# 'notify-host-by-email' command definition
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: $LO
NGHOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
}
# 'notify-service-by-email' command definition
define command{
command_name notify-service-by-email
cmmand_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nSt
ate: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$LONGSERVICEOUTPUT$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$
is $SERVICESTATE$ **" $CONTACTEMAIL$
}