Add sevices to servicegroup

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
MichaelW
Posts: 5
Joined: Wed Aug 15, 2012 1:39 pm

Add sevices to servicegroup

Post by MichaelW »

Hi all,

I know how to create a service group and to add services to it manually. What I want to do is to do it more automatically.

I have created a service template called fileage-sevice. After that I have created several services that use this template to monitor the age of certain logfiles.
Now I would like to create a service group that includes all services that use the fileage-service template.

Unfortunately

Code: Select all

define servicegroup{
        servicegroup_name       LogFiles
        alias                   Log File Monitor
        members      hostname,fileage-service
        }
does not work.
Any idea how this can be done?

Regards,

Michael
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Add sevices to servicegroup

Post by slansing »

This can be done two ways as outlined here:

http://nagios.sourceforge.net/docs/3_0/ ... rvicegroup

You can either define the servicegroups as you have, or add the servicegroup name to each individual service's config file, it should work in either fashion, what is happening once you verify the config files?
MichaelW
Posts: 5
Joined: Wed Aug 15, 2012 1:39 pm

Re: Add sevices to servicegroup

Post by MichaelW »

Thank you. I didn't realize I can add a servicegroup to a service. This is exactly what I was looking for.
Locked