Question

I am trying to configure my nagios email alerts so that it sends notification emails to a user only for a specific service.

I want to create a user that only gets notification emails when this service is at critical

Était-ce utile?

La solution

If I understand your question you just want to tag an individual contact to a service. If this is so you can just do this, in stead of adding a group:

define service{
   ...
   contacts freda,maryb
   ...
}

More in depth in the doc: Nagios Service Definitions (3.0)

Autres conseils

As by http://nagios.sourceforge.net/docs/3_0/objectdefinitions.html#contact

For your Contact use this scheme Change the starembraced parts to your desire. You need one servicecontact for each Administrator and set it as contact in the specific service you want to get the email for. (remember : you can specify more than one contact by seperating comma)

Template for no notifications:

define contact{
        name                            no-notifications
        host_notification_period        24x7
        service_notification_period     24x7
        host_notification_commands      notifications-disabled
        service_notification_commands   notifications-disabled
        host_notification_options       n
        service_notification_options    n
        host_notifications_enabled      0
        service_notifications_enabled   0
        register                        0
}

Template for critical services:

define contact{
        name                            service-only
        host_notification_period        **TIMEPERIOD**
        service_notification_period     **TIMEPERIOD**
        host_notification_commands      notifications-disabled
        service_notification_commands   notify-service-by-email
        host_notification_options       n
        service_notification_options    c
        host_notifications_enabled      0
        service_notifications_enabled   1
        register                        0
}

Your blocking contact:

define contact{
        contact_name                    nohost
        use                             no-notifications
}

Your servicecontact :

define contact{
        contact_name                    **Admin Name**
        use                             service-only
}

Your hostconfiguration:

define host{
        use                     host-template-linux
        host_name               Bezeqint2 
        hostgroups              **if you have any**
        address                 **the IP**
        contacts                nohost
}

Your serviceconfiguration

define service {
 use generic-service ; defined in templates 
 host_name Bezeqint2 
 service_description VI   
 check_command check_http3! -H usabrm.dainfo.com -u /Anti-Aging/Template1/Pages/LoginPageBRM.aspx -s "txtUserName" 
 contacts **Admin Name**
}
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top