Page 1 of 1

Nagios (v3.2.3) not sending any notification at all

Posted: Wed Jul 30, 2014 8:09 am
by MacUsers
hi there

Using Nagios v3.2.3 on Ubuntu 12.04 and don't seem to enable Notification at all. I use OpsGenie for email/SMS notifications, and this is what I have configured:

/etc/nagios3/conf.d/my_contacts.cfg:

Code: Select all

define contact {
    contact_name                    opsgenie
    alias                           OpsGenie Contact
    host_notifications_enabled      1
    service_notifications_enabled   1
    service_notification_period     24x7
    host_notification_period        24x7
    service_notification_options    w,u,c,r
    host_notification_options       d,r
    service_notification_commands   notify-service-by-opsgenie
    host_notification_commands      notify-host-by-opsgenie
}

define contactgroup {
    contactgroup_name          guineapig
    alias                      The testers
    members                    opsgenie
}

## -- opsgenie command defination --------------- ##
define command {
    command_name    notify-service-by-opsgenie
    command_line    /usr/local/bin/nagios2opsgenie service .... ....

define command {
    command_name    notify-host-by-opsgenie
    command_line    /usr/local/bin/nagios2opsgenie host .... ....   
}
/etc/nagios3/conf.d/my_services.cfg

Code: Select all

define service {
        name                        p2-service              
        use                         generic-service
        notification_options        w,u,c,r,f,s
        notifications_enabled       1
}
efine service {
        hostgroup_name                  docportal
        service_description             [STS] docStore
        check_command                   check_docstore_status
        use                             p2-service
        contact_groups                  guineapig
        notification_interval           0 ; set > 0 if you want to be renotified
}
Notification setup in my /etc/nagios3/nagios.conf:

Code: Select all

root@p2-nagioss:/etc/nagios3/conf.d# grep -i notification /etc/nagios3/nagios.cfg | egrep -v '^(#|$)'
log_notifications=1
notification_timeout=30
enable_notifications=1
No errors in the log or during the start up but notification message (i.e. [1215020779] SERVICE NOTIFICATION ...) in the log at all. In the end, I'm not getting any email alert(s) at all. Can anyone spot any thing here that I'm missing? any kind of help very much appreciated. Best!

Re: Nagios (v3.2.3) not sending any notification at all

Posted: Wed Jul 30, 2014 9:57 am
by MacUsers
Just tested that if I send a custom notification from the Web GUI, it works just fine. But that's all .......

Re: Nagios (v3.2.3) not sending any notification at all

Posted: Wed Jul 30, 2014 4:03 pm
by MacUsers
Am I alone in this boat? Tried almost all the online doc I could find, without any joy. Notifications are still not being logged, hence no mail either (except for the custom notifications). Can anyone please tell me what am I missing? Best!

Re: Nagios (v3.2.3) not sending any notification at all

Posted: Thu Jul 31, 2014 2:48 pm
by lmiltchev
I am not familiar with OpsGenie? Does it use sendmail (locally) or it's all done on the cloud?
Is there anything in the maillog?

Code: Select all

tail /var/log/maillog
...in the mail queue?

Code: Select all

mailq