Page 1 of 1

notifications not being sent Nagios core 4.1.1

Posted: Sun Mar 13, 2016 6:58 am
by bvt1977
Hi All

iam configuring for the first time Nagios monitoring system on my raspberry Pi, evrything is working fine.
Only notifications wil not being sent out. I have tried a lot but nothing works....
can someone help me out with this ?
iam monitoring a ip cam in my own network when i bring the interface down i see in Nagios that it's offline but no notifications will be send out.
Notification is enabled see my configurations below.



define host{
use linux-server ; Name of host template to use
; This host definition will inherit all variables that are defined
; in (or inherited by) the linux-server host template definition.
host_name ip-camera voor
alias ip-camera voor
address 192.168.0.64
notifications_enabled 1
first_notification_delay 0
notification_interval 0
notifications_enabled 1
contacts Ben
contact_groups admins
flap_detection_enabled 1
}




define service{
use generic-service ; Name of service template to use
host_name ip-camera voor
service_description PING
check_command check_ping!100.0,20%!500.0,60%
first_notification_delay 0
notification_interval 0
notification_options w,u,c,r
notifications_enabled 1
contacts Ben
contact_groups admins
flap_detection_enabled 1
}




It works wen i use the custom notiyfication option from the gui ,so in terms of configurations evryting in contact en mail setup is ok.


see my debug below.

[1457815517.372327] [032.2] [pid=15755] This is a forced host notification, so we'll send it out for this contact.
[1457815517.372368] [032.2] [pid=15755] Adding contact 'Ben' to notification list.
[1457815517.372447] [032.2] [pid=15755] ** Notifying contact 'Ben'
[1457815517.372523] [032.2] [pid=15755] Raw notification command: /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
[1457815517.372881] [032.2] [pid=15755] Processed notification command: /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: CUSTOM\nHost: ip-camera voor\nState: DOWN\nAddress: 192.168.0.64\nInfo: CRITICAL - Host Unreachable (192.168.0.64)\n\nDate/Time: Sat Mar 12 21:45:17 CET 2016\n" | mail -s "** CUSTOM Host Alert: ip-camera voor is DOWN **" my mail adress
[1457815517.373472] [032.0] [pid=15755] 1 contacts were notified


I hope somebody can help me out with this.

Re: notifications not being sent Nagios core 4.1.1

Posted: Mon Mar 14, 2016 10:38 am
by rkennedy
Can you bring down the interface on the camera, trigger the notification, and then run tail -n 200 /var/log/maillog? Please post back the result.

One other thing, can you post / PM your objects.cache file? It's located at /usr/local/nagios/var/objects.cache