Individual alerts w/ services that have hostgroups attached

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
nwieland
Posts: 16
Joined: Wed Feb 23, 2011 2:31 pm

Individual alerts w/ services that have hostgroups attached

Post by nwieland »

I have a question about how individual notifications are best set up when using services that have hostgroups attached.

For example, I have a generic service checking disk usage on the /partition on linux servers, and added the linux_servers hostgroup (containing all my linux servers) to it. I define the server team as contacts, which is fine since we want to get alerted if any of the root partitions run out of space. Now, I might have an application admin that would like to get alerted too if the root partition gets full on a specific server only because his application runs there. Since the service isn't particular to a server but generic, I can't add that admin as additional contact to the service itself. I tried to create a service escalation, but that doesn't seem to work in the GUI at all (because the services selection list doesn't get populated with services not bound directly to a host). I tried to create a static .cfg and import it, but that didn't seem to work either. What is the best approach for achieving this?

We're using Nagios XI 2011R1 on RHEL5.5 32bit, manual install on a physical server.
rdedon
Posts: 578
Joined: Sat Nov 20, 2010 4:51 pm

Re: Individual alerts w/ services that have hostgroups attac

Post by rdedon »

Rene deDon
Technical Team
___
Nagios Enterprises, LLC
Web: http://www.nagios.com
nwieland
Posts: 16
Joined: Wed Feb 23, 2011 2:31 pm

Re: Individual alerts w/ services that have hostgroups attac

Post by nwieland »

Hi,

thanks, but the problem is not formatting or anything. When trying to create a service escalation in the GUI, the "services" field doesn't get populated if the services on a host are not directly tied to a host, but applied via a hostgroup definition of a service (see attachment).

When I create a static service escalation like this:

Code: Select all

define serviceescalation {
	host_name mylinuxhost
	service_description home_disk_usage
	first_notification 1
	last_notification 10
	notification_interval 5
	contact_groups viapos_contact_group
}
and import it, in addition to the serviceescalation nagios creates an orphaned, non-synchable service that just consists of its description (home_disk_usage) instead of picking the already existing service:

Code: Select all

define service {
	service_description		home_disk_usage
	use				xiwizard_nrpe_service
	hostgroup_name			linux-servers
	check_command			check_nrpe!check_disk!-a '-w 20% -c 10% -p /home'!!!!!!
	max_check_attempts		5
	check_interval			5
	retry_interval			1
	notification_interval		60
	contacts			mycontact
	_xiwizard			linux-server
	register			1
	}	
the problem seems to be related to these threads thread 1 thread 2, the suggestion there was to create a static escalation config but I can't seem to get this to work.
You do not have the required permissions to view the files attached to this post.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Individual alerts w/ services that have hostgroups attac

Post by mguthrie »

What we mean by a "static" definition is that it does not get imported into the CCM at all, it's maintained manually in the /usr/local/nagios/etc/static directory. My guess is that this is a limitation of the CCM database-relation logic.

Do you have any luck creating a config like this from the CCM instead of importing it? Or is that the problem you're running into with the services field not populating?
Locked