Solved

Different Nagios Contact groups for servers inside host groups

Posted on 2014-12-11
11
180 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
  • 5
  • 5
11 Comments
 
LVL 28

Expert Comment

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

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
 
LVL 28

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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 28

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 28

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 28

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now