LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-02-2006, 11:26 PM   #1
bell.colin
LQ Newbie
 
Registered: Mar 2006
Posts: 1

Rep: Reputation: 0
Nagios + More granular contact groups


Is there any way to define Hosts from multiple hostgroups so certain contactgroups get a limited view of certain hosts (and their services) from several hostgroups but not all hosts from these hostgroups?

Example:

hostgroup: all-switches
switch1 (ping)
switch2 (ping)
switch3 (ping)

hostgroup: all-web-servers
web01 (ping, http)
web02 (ping, http)
web03 (ping, http)

hostgroup: all-routers
router1 (ping)
router2 (ping)
router3 (ping)

I would like a contact group to receive all notifications for only some of the hosts (and their services) such as "contactgroup1" would receive all host/service notifications for switch1, router1, and web01 but not anything else from these hostgroups.

I have tried making a new hostgroups and adding the existing hosts to them (example hostgroup: bldg1 contains switch1, router1, and web01) however i can't seem to find a good way to accomplish this without setting up separate nagios servers (or a very complex config with many duplicates) as I keep running into "host/service already defined" errors.

Is there another practical way to accomplish this without having hosts duplicated with different names with the same services defined? (If it's even possible)


I hope this has made since I would like to find a way to do this without having to have the same host/service defined multiple time. (all running the same check)
 
Old 03-03-2006, 08:31 AM   #2
mousebubble
LQ Newbie
 
Registered: Feb 2004
Location: Ohio
Distribution: Ubuntu
Posts: 16

Rep: Reputation: 0
You can specify which contactgroups to send notifications to by each servcie/host definition. For example:

Code:
define service{
         use                             generic-service         ; Name of service template to use
         host_name                       web01
         service_description             PING
         is_volatile                     0
         check_period                    24x7
         max_check_attempts              3
         normal_check_interval           5
         retry_check_interval            1
         contact_groups                  web01-group,switch1-group
         notification_interval           120
         notification_period             24x7
         notification_options            c,r
         check_command                   check_ping!100.0,20%!500.0,60%
         }
This makes the config files (especially the services.cfg file) a bit long, but it allows the most control. I would recomend setting up service templates for each "group" of contacts and then applying the templates to the services you want.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
groups (system default groups) Xavius Linux - General 2 07-18-2012 02:50 AM
Map Windows NT Groups to UNIX Groups - why? kenji1903 Linux - Networking 4 10-16-2007 11:52 AM
limit to nesting groups within groups? geekgrl Linux - General 3 10-16-2007 11:50 AM
LXer: Gmail Contact Groups: Finally LXer Syndicated Linux News 0 12-15-2005 04:31 PM
winbind: wbinfo -g only lists global groups from PDC and not local groups saradiya Linux - Networking 0 12-01-2003 02:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration