Page 1 of 1

Notifications

Posted: Tue Jul 21, 2015 10:46 am
by haile711
Hey guys,
I have set up contacts, and contactgroups, and notifications/alerts. Even though Nagios Server is sending notification as below, and as when i do test email, i'm also getting email. But im not getting notifications for Host down/critical. Am I doing something wrong. Please see the below setting for contacts, contactgroups. Thanks for your time! All these setting are in /nagios/etc/static directory.

Code: Select all

define contact {
        contact_name                            Shrinath
        alias                                   Shrinath Chathoth
        contactgroups                           cloud_support
        host_notifications_enabled              1
        service_notifications_enabled           1
        host_notification_period                24x7
        service_notification_period             24x7
        host_notification_options               d,u,r,f,
        service_notification_options            w,u,c,f,s,
        host_notification_commands              xi_host_notification_handler
        service_notification_commands           xi_service_notification_handler
        email                                   [email protected]
        }

Code: Select all

define contactgroup {
        contactgroup_name                       cloud_support
        alias                                   ifs_ecom_cloud_support
        members                         Amit,Hai,Shrinath,Mithun,Raghu,Roshan,Ratan,Shail
        }

Code: Select all

define host {
        host_name                       xxxxx
        alias                           Legacy
        address                         xxxxx
        hostgroups                      mcominternal5008
        check_command                   check-host-alive!!!!!!!!
        max_check_attempts              5
        check_interval                  5
        retry_interval                  1
        check_period                    24x7
        contact_groups                  cloud_support
        notification_period             24x7
        first_notification_delay        0
        notification_options            d,u,r,f,
        notifications_enabled           1
        register                        1
        icon_image                      redhat.png
        statusmap_image                 redhat.png
        }

Re: Notifications

Posted: Tue Jul 21, 2015 11:05 am
by tgriep
If your contacts are just contact only accounts and do not have a user account, you need to use notify-host-by-email and notify-service-by-email notification handlers for your notification_commands.
See this document on page 3.
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Re: Notifications

Posted: Tue Jul 21, 2015 1:19 pm
by haile711
Ah! I see. There are sooo many details that I don't understand. Thanks so much tgriep!!

Re: Notifications

Posted: Tue Jul 21, 2015 2:47 pm
by tgriep
Did it work for you?

Re: Notifications

Posted: Wed Jul 22, 2015 7:18 am
by haile711
yes tgriep, I have changed the notification handler, and i'm getting notification now. Thanks!

Re: Notifications

Posted: Wed Jul 22, 2015 9:04 am
by tmcdonald
I'll be closing this thread now, but feel free to open another if you need anything in the future!