Service notifications and host groups

Dean Bishop dbishop at ehvert.com
Fri Jun 27 19:14:43 CEST 2003


Dan,

	Nope, you need to break your service definition into two service
definitions, each with its own contact_group directive, to accomplish this.

	Templating may help in easing your pain.

define service{
        use                             disk-unix-service       
	  service_description	          disk-unix-service_template
	  < lots of stuff deleted>
	  register				    0
        }

define service{
	  use
disk-unix-service_template
        service_description		    disk-unix-service-group1
	  host_name                       host1
        contact_groups                  group1
	  }

define service{
	  use
disk-unix-service_template
        service_description		    disk-unix-service-group1
        host_name                       host2
        contact_groups                  group2
	  }

Regards,
dean

-----Original Message-----
From: Dan Tulovsky [mailto:Dan.Tulovsky at sbiandcompany.com] 
Sent: June 27, 2003 12:17 PM
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] Service notifications and host groups

Hello.

I was wondering if someone could clarify notifications for me.
According to the documentation, host notifications (when a server goes
down or comes back up) are sent to contact_groups defined in the
hostgroups file.

# 'all' host group definition
define hostgroup{
       hostgroup_name  All
       alias           All Systems
       contact_groups  group1
       members         *
       }

So according to this definition, when any server goes down, the group
group1 gets notified.

Now, when a service on any of these servers goes down, the contact_group
for the hostgroup is not used, rather the contact_group for the service
definition gets notified.

Can I somehow set it up so that when a service on a host goes down, the
contact_group associated with that host gets notified?

For instance, I have a service definition:

define service{
        use                             disk-unix-service       
        host_name                       host1, host2
	  < lots of stuff deleted>
        }

When the service on host1 goes down, I want the contact_group group1 to
be notified.  I can do this by putting

        contact_groups                  group1

Into the service definition.  But, I when this service breaks on host2,
I don't want group1 to be notified.  I want group2 to be notified.  So
really I just want the services on each server to be tied to the host
notifications instead of the service notifications.

Thank you much.
Dan




-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list