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

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
MacUsers
Posts: 3
Joined: Wed Jul 30, 2014 7:38 am

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

Post 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!
Last edited by MacUsers on Wed Jul 30, 2014 3:57 pm, edited 1 time in total.
MacUsers
Posts: 3
Joined: Wed Jul 30, 2014 7:38 am

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

Post by MacUsers »

Just tested that if I send a custom notification from the Web GUI, it works just fine. But that's all .......
MacUsers
Posts: 3
Joined: Wed Jul 30, 2014 7:38 am

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

Post 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!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

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

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked