Scalable Configuration Strategies?

Friedrich Clausen fred at derf.nl
Fri Aug 11 16:48:12 CEST 2006


Hi,

rob.moss at uk.bnpparibas.com wrote:
> Good question, good thinking.
> 
> I think you are on the right track with the separate files/directories,
> however if you have over 1,000 servers i think there may be other overheads
> involved in parsing 1,000 or more individual files on startup, but that can
> be checked later.

Yeah, that may become an issue but I will run some tests to see how it 
will go. I think when we have 1000 servers/network elements, we will 
have to get another Nagios server as the CPU usage from running all the 
checks is already around 40% (with ~200 hosts and ~650 checks).

> 
> I would go for individual host definitions per host including all of the
> services that it runs, that way you can easily script something to write
> out config files per server from a data source such as CSV. For example:
> 
> host,servce1,service2,serviceN...
> host1.example.com,ssh,ping,http,https,someservice,someotherservice
<snip>

We actually tried that idea but there are many exceptions (eg. community 
names, different proc count thresholds, etc) and we had to start putting 
parameters in the text file and it soon looked uglier and harder to edit 
than the current Nagios config. But having it as a CSV and editing it in 
a spreadsheet program might be better...

What I did do was make an "add_nagios_host.pl" script to quickly add a 
host with common services configured. Then you would edit the config to 
add non-standard checks.

I would like to make the whole config tree added to Subversion and then 
when someone has edited the config they would commit their changes. It 
would introduce an audit trail to figure out who broke what.

> I'm looking at a similar solution to monitor 9,000 or so Blade servers..
> fun times!

Indeed! Good luck!

Fred.

> 
> Internet
> fred at derf.nl@lists.sourceforge.net - 10/08/2006 15:15
> 
> 
> Sent by:    nagios-users-bounces at lists.sourceforge.net
> 
> 
> 
> To:    nagios-users
> 
> cc:
> 
> 
> Subject:    [Nagios-users] Scalable Configuration Strategies?
> 
> 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
> 
> 
> 
> This message and any attachments (the "message") is 
> intended solely for the addressees and is confidential. 
> If you receive this message in error, please delete it and
> immediately notify the sender. Any use not in accord with
> its purpose, any dissemination or disclosure, either whole
> or partial, is prohibited except formal approval. The internet
> can not guarantee the integrity of this message.
> BNP PARIBAS (and its subsidiaries) shall (will) not
> therefore be liable for the message if modified. 
> 
> **********************************************************************************************
> 
> BNP Paribas Private Bank London Branch is authorised
> by CECEI & AMF and is regulated by the Financial Services
> Authority for the conduct of its investment business in
> the United Kingdom.
> 
> BNP Paribas Securities Services London Branch is authorised 
> by CECEI & AMF and is regulated by the Financial Services 
> Authority for the conduct of its investment business in 
> the United Kingdom.
>   
> BNP Paribas Fund Services UK Limited is authorised and 
> regulated by the Financial Services Authority
> 
> 
> -------------------------------------------------------------------------
> 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


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