Multiple Nagios Admins - Solution

Al Tobey albert.tobey at priority-health.com
Wed Nov 6 17:41:05 CET 2002


We have multiple (2 right now) people working on the configs here using
CVS to keep things in order.  I have two nagios.cfg files, which are
identical except for a couple directory settings.  The secondary
nagios.cfg (nagios-test.cfg) is for running a nagios -v on a freshly
checked out copy of the CVS version of the configs (into a different
directory) ... if the config passes the test, it is copied into
production and nagios is bounced (sudo).   This is all done
automagically by a shell script nagios plugin that monitors the CVS
configs.  It also notifies if there are any problems.  So, when I want
to make a change, I just do a CVS update on my workstation, make my
change, then cvs ci.  Then nagios updates itself.  :)

Perhaps I'll clean that script up someday ... it wasn't hard to write,
so anybody could write one themselves.  Mine is a little more
complicated than it has to be because it only runs the checks if CVS has
changed (cvs update/diff against production).

-Al Tobey
Unix Administrator
Priority Health

On Tue, 2002-11-05 at 15:57, Jolet, John wrote:
> you could even put cvs in the loop there and put all your configs under cvs
> for revision control.....
> 
> -----Original Message-----
> From: Rob King [mailto:rob.king at wholefoods.com]
> Sent: Tuesday, November 05, 2002 2:31 PM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] Multiple Nagios Admins - Solution
> 
> 
> Hey everyone,
>     I'm sorry if this isn't the list to post this to, but I asked the 
> other day if anyone else had multiple people administering a single 
> Nagios setup.
> 
>     I know it sounds insane, but we had a reason for it - At our company 
> we insist on decentralized management, so each team gets it's own stuff 
> to monitor. However, the central IT helpdesk still has to be able to see 
> everything at once. (That's why we couldn't just have multiple Nagios 
> setups - the helpdesk still needs to see everything on one screen).
> 
>     So, anyway, here's what I ended up doing. This is on a FreeBSD 4.7 
> box, and you need 'sudo'. Configuration is in /usr/local/etc/nagios/.
> 
>     * Set up a directory, /usr/local/etc/nagios/teams/
>     * Create a directory per team in that directory (e.g., 
> /usr/local/etc/nagios/teams/network-services, 
> /usr/local/etc/nagios/operating-systems)
>     * Set up the Unix groups appropriately, so that only the members of 
> those groups (network services, operating systems, whatever) can write 
> to those directories. In each directory, put whatever Nagios config 
> files you need in there.
>     * Set up a directory under each team's directory called 'work' or 
> whatever. Make that directory writable only by root (or whoever has the 
> authority to restart Nagios).
>     * Create a copy of the main Nagios config file that references the 
> configurations in the team subdirectories.
>     * Have a script that, when executed with 'sudo', tests the 2nd 
> configuration file (the one from the previous step), and if it tests out 
> okay, copies the configuration into the "work" subdirectory. It then 
> restarts Nagios using the 1st main config file (the one that references 
> the configs stored in the "work" directories).
>    
>     That way, nobody can screw it up for everyone else. Their configs 
> must be tested before they're put into production. You could do more 
> with this (like modify the script to only copy the current caller's 
> team's config), but this seems to work for the time being.
> 
>     I know it's long, convoluted, and ugly-as-sin, but it gets the job 
> done...
> 
>     Thanks all,
>     Rob
> 
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by: See the NEW Palm 
> Tungsten T handheld. Power & Color in a compact size!
> http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by: See the NEW Palm 
> Tungsten T handheld. Power & Color in a compact size!
> http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users




********************************************************************
This email and any files transmitted with it are confidential
and intended solely for the use of the individual or entity
to whom they are addressed.  If you have received this 
email in error please notify the Priority Health Information
Services Department at (616) 942-0954.
********************************************************************



-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en




More information about the Users mailing list