Scalable Configuration Strategies?

Friedrich Clausen fred at derf.nl
Thu Aug 10 16:15:13 CEST 2006


Hi,

My colleague and I are in the process of giving our bloated, 
all-in-one-file Nagios configuration a re-haul. It was getting unwieldy 
and error prone searching through the config file to add/modify hosts 
and services. So I am emailing the list to get opinions and see what 
other people do in their environments.

Initial Idea:
-------------

We have a multi-department Nagios server, eg. Network Admins, Windows 
Admins and Unix Admins all use the same server. Currently every 
department has their own file, eg. unix-hosts.cfg, network-elements.cfg, 
etc. containing host definitions, hostgroups, service definitions all in 
one file.

So we have decided to try out the "cfg_dir" statement in nagios.cfg as 
the basis for our new configuration.  Our initial layout could be:

/etc/nagios - The main config files eg. nagios.cfg, resource.cfg, 
contacts.cfg, timeperiods.cfg, template.cfg. These files would only be 
editable by the system administrator of the Nagios box.

/etc/nagios/unix-admin - Within here would be the config files for each 
department. The directory and the files/dirs therein would be writeable 
by the "unix-admin" group. We are thinking of organising it like:

/etc/nagios/unix-admin/checkcommands.cfg
/etc/nagios/unix-admin/contactgroups.cfg
/etc/nagios/unix-admin/hostgroups.cfg
/etc/nagios/unix-admin/hosts/host1.example.com.cfg
/etc/nagios/unix-admin/hosts/host2.example.com.cfg
/etc/nagios/unix-admin/hosts/host3.example.com.cfg
....

The other departments would have a similar tree structure and 
permissions allowing them to modify their configurations.

Potential Issues:
-----------------

The main problem is what to do with common services; do we create 
(Option 1) a, for example, ssh.cfg that lists all the hosts (or host 
groups) that use SSH? Or (Option 2) do we add the SSH check into each 
hosts config file seperately?

Option 1 pro - Easy to add new common service.
Option 1 cons - Must know in advance which services are common so as to 
edit the correct file (either hostXX.example.com.cfg or ssh.cfg) config. 
Will not always be clear. There are always exceptions.

Option 2 pro - Simple to configure, consistent.
Option 2 cons - Mass adding a service to many hosts will require 
scripting or much time.

I am inclined to go with option 2 for simplicity's sake.

Any comments or improvements or just what works for you will be appreciated!

Thanks,

Fred.



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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