?
Solved

Different Nagios Contact groups for servers inside host groups

Posted on 2014-12-11
11
Medium Priority
?
209 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
WordPress Tutorial 2: Terminology

An important part of learning any new piece of software is understanding the terminology it uses. Thankfully WordPress uses fairly simple names for everything that make it easy to start using the software.

 
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 2000 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

Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

Question has a verified solution.

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

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
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.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month11 days, 17 hours left to enroll

752 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