hostgroup-defined services with notifications defined by other hostgroups?

Assaf Flatto nagios at flatto.net
Thu Nov 4 17:06:26 CET 2010


  On 04/11/10 15:18, Phil! Gold wrote:
> I'm sure this is something other people have wanted to do, but I must not
> be hitting the right combination of search terms when looking for it.
>
> I have a bunch of servers for which I'm using hostgroups to manage their
> monitored services.  In other words, there's a set of standard service
> checks for Windows servers, another set of standard checks for Linux
> servers, and so on.  I then have subgroups for the hosts at each site:
> Windows servers at site 1, Windows servers at site 2, and so on.  I'd like
> to be able to use the site groups to determine who gets notifications for
> service failures while only defining the services once.  Is this possible?
>
> I suppose I could make something work by hacking with user macros and some
> custom notification commands that make their own decisions about whether
> to send the emails (or whatever), but I'd rather work within Nagios'
> structure.  Is my only option to define a separate set of services for
> each site's hostgroups?
>

i think you can do this  with two service templates .
define service{
             name     windows_site2_service
             use        generic_service
             contact_groups site2_admins
             register    0
}


define service{
             name     windows_site1_service
             use        generic_service
             contact_groups site1_admins
             register    0
}


and then you define the service once for each group using that template .

Assaf

-- 
Never,Ever Cut A Deal With a Dragon


Next year I will be doing the London to Paris bike ride to
raise money for the DogTrust (www.dogstrust.co.uk) .
Please Sponsor me at http://www.justgiving.com/Assaf-Flatto


------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
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