Solved

Different Nagios Contact groups for servers inside host groups

Posted on 2014-12-11
11
201 Views
Last Modified: 2015-01-02
I setup nagios pager contact group but ran into problems setting it up on 40 services. Our nagios is setup using hostagroups for all services and there's 11 servers (in that host group) I need to setup that pager contact group.

What do you think I should do?
0
Comment
Question by:SuperRoot
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
11 Comments
 
LVL 29

Expert Comment

by:Jan Springer
ID: 40496509
what problem exactly are you having?  this is a fairly simple configuration.
0
 
LVL 62

Expert Comment

by:gheist
ID: 40496669
Various digest plugins can compensate for too high volume or drop useless notifications.
Alternatively you can start nagios anew.
0
 
LVL 1

Author Comment

by:SuperRoot
ID: 40496746
Thank you for the advise. I guess to better explain this is by showing you what we have on service.

This is one of the examples of what services we have.
define service{
use                                  generic-template
hostgroup_name              linux-vmware
service_description      vmware-linux
check_command             "$USER1$/check_by_ssh -C <commands foo>"
         }

linux-vmware is a host group with 34 servers in it and 11(out of 34) needs to be in different contact groups(with pager). I can't drop the services especially if customers requested them to be monitored.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 29

Expert Comment

by:Jan Springer
ID: 40496803
In the service description you should be able to override the default by specifying the configuration parameter to monitor those hosts.
0
 
LVL 1

Author Comment

by:SuperRoot
ID: 40496927
wait how do you do that?
0
 
LVL 29

Expert Comment

by:Jan Springer
ID: 40496934
Any variable defined in the template should be configurable within the section of the host service you are monitoring.
0
 
LVL 1

Author Comment

by:SuperRoot
ID: 40497349
not sure I'm following you. Maybe a good example might work? :)
0
 
LVL 1

Author Comment

by:SuperRoot
ID: 40497350
sorry for the stupid question. I'm just not sure how to do this. :(
0
 
LVL 29

Expert Comment

by:Jan Springer
ID: 40497928
in contacts.cfg, create a contact group and contact for those 11 servers.

in templates.cfg:
 copy the generic-host to generic-vm
 use the new contact_group

in your host configuration file, for each of those 11 hosts, you will have a statement using the generic-vm section of the template:

define host {
     use                            generic-vm
     host_name                customer1
     alias                           Real Name
     address                     192.168.100.23
     notification_period   24x7
}

this way you can keep your hosts organized within the groups that you want but some hosts can have different types of notification and contacts.

if you want a unique contact for each server, then you will need a unique contact, contact group and host template.
0
 
LVL 1

Author Comment

by:SuperRoot
ID: 40507603
Sorry got tied up at work. Does this change applies to services right away without changing it? Or should copy a service and assign another template with generic-Vm contact group? I Just don't like copying and pasting or even creating new cfg file just for this group of servers
0
 
LVL 29

Accepted Solution

by:
Jan Springer earned 500 total points
ID: 40509110
You should make a copy of the template that you wish to change and put your changes in the copy giving the copy a new name.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question