Distributed config admin tool?
Marc Powell
marc at ena.com
Wed Sep 5 14:51:56 CEST 2007
> -----Original Message-----
> From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-
> bounces at lists.sourceforge.net] On Behalf Of Rob Brown
> Sent: Tuesday, September 04, 2007 6:52 PM
> To: nagios-users at lists.sourceforge.net
> Subject: Re: [Nagios-users] Distributed config admin tool?
>
> Thanks, but most of these answers seem to be based around distributing
> the configs. All good answers, but not really what I was looking for.
You're going to have to distribute configs one way or another unless you
nfs mount your ~nagios/etc dir or something similar.
> I am more interested in how to GENerate the configs (ie: adding hosts,
> services etc) for a distributed setup, without having to add things
> twice (once on master as passive, then again on distributed as active,
> yadda yadda)
There's no need to generate different configs between the two with
templating. All you need is a single host and service template on the
active and a different host and service template on the passive. These
templates will have the same name on both machines, but different
contents depending on their roles. For example, a generic-service
template on the active might look like --
define service {
name generic-service
check_period 24x7
register 0
}
On the passive, that would turn into --
define service {
name generic-service
check_period none
register 0
}
Now, in your distributed configs, you just need to specify inheritance
of the generic-service template and it'll do the right thing based on
the machine it's running on --
define service {
use generic-service
host_name whatever
service_description someservice
contact_groups somecontacts
check_command somecommand
...
}
I have all my templates in one directory that is static per machine and
my host/service/hostgroup configs in another that's dynamic and rsynced
from a central machine. The contents of this directory are the same
across all my nagios instances.
--
Marc
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list