Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 08-14-2009, 03:12 PM   #1
LQ Newbie
Registered: Aug 2009
Posts: 9

Rep: Reputation: 0
Nagios - Assign a contactgroup to a hostgroup.

I am in a rather large environment and have a large group of folks covering our servers. In many cases, these groups overlap.

I have created a script the scans a system, builds a Nagios services profile, then uploads it.

I have a list of contact groups that I statically entered.

What I would like to do, is assign a contactgroup to a hostgroup. For this to work, I can NOT edit the "define host" for each server. I need to do it with a separate entity.

Escilations would seem to fit the bill, but I would need to make an entry for every server\server to every group (tens of thousands of entries).

Ideas? Is this possible?
Old 08-16-2009, 07:51 AM   #2
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 703

Rep: Reputation: 99
I don't know of a way to do what you're describing using hostgroups.

I have a rather complex setup and I use templates to get similar functionality.
For example, we have different requirements for production and staging environments,
several networks and many projects. I create a template named prod-env and stage-env;
one for internal-net, dmz1-net, dmz2-net, offsite-net and internet-net; and one for
each project, such as old-project, hot-project, etc.

For every host I have a "use +some-project,some-env,some-net" statement that
calls the templates. The + means to inherit whatever settings it can, but then
override with the some-net settings, followed by the some-env settings, followed
by the some-project settings, followed by the settings for the host definition.
In other words it inherits, applies the templates in reverse order, then uses host
settings, and the last setting applied wins.

This lets you easily set parents, check commands and contact info based on the
network of the hosts. Set the times and escalations based on the environment.
Set the contacts and override other settings if needed for specific projects in
the project templates.

I'd be interested to see your script if you can share it.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
LXer: Nagios and Oreon (Nagios web front end) installation and Configuration LXer Syndicated Linux News 1 05-31-2016 07:26 AM
Nagios 3.1.2 + RHEL 5.3 You don't have permission to access /nagios/ on this server psix Linux - Server 13 08-04-2015 02:25 AM
Assign a value mierdatuti Programming 4 12-31-2008 01:50 PM
Nagios Daemon, PID not found but rc.nagios runs agentc0re Slackware 1 07-03-2007 02:47 PM
LXer: Nagios 2.5 and Oreon 1.3 (Nagios web front end) installation with screenshots LXer Syndicated Linux News 0 08-11-2006 05:33 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:15 AM.

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