Sectional Configuration Possible?


#1

I have to ask you a question about configuration architecture about Nagios 3. Let me describe you our organization: We have 3 different IT section which differentiated according to business area. These are Agro-IT, Holding-IT and FB-IT (FB is Food and Beavarage).
So, each IT section has own servers and admins. But, there is only one Nagios.
I have to say that,we wanna separate the configuration of these IT sections, for example, FB-IT has own windows.cfg, etc.
And, I want that each IT section can add or remove their servers, monitor only their servers.
In NAgios 3.0, is it possible?
I try something I create directories under objects for each IT section:

[blockquote]drwxrwxr-x 6 nagios nagios 4096 2008-05-28 09:37 .
drwxrwxr-x 3 nagios nagios 4096 2008-05-27 17:44 …
drwxr-xr-x 2 nagios nagios 4096 2008-05-27 16:42 agro
drwxr-xr-x 2 nagios nagios 4096 2008-05-27 16:42 holding
drwxr-xr-x 2 nagios nagios 4096 2008-05-27 16:18 fb

-rw-rw-r-- 1 nagios nagios 8311 2008-05-12 16:08 commands.cfg
-rw-rw-r-- 1 nagios nagios 2166 2008-05-05 18:49 contacts.cfg
-rw-rw-r-- 1 nagios nagios 5403 2008-05-05 18:49 localhost.cfg
-rw-rw-r-- 1 nagios nagios 3124 2008-05-05 18:49 printer.cfg
-rw-rw-r-- 1 nagios nagios 3293 2008-05-05 18:49 switch.cfg
-rw-rw-r-- 1 nagios nagios 12335 2008-05-28 10:10 templates.cfg
-rw-rw-r-- 1 nagios nagios 3209 2008-05-05 18:49 timeperiods.cfg
-rw-rw-r-- 1 nagios nagios 4910 2008-05-12 16:19 windows.cfg[/blockquote]
And each directory has own configuration files. For example :
[blockquote]root@yonyim1:/usr/local/nagios/etc/objects# cd agro/
root@yonyim1:/usr/local/nagios/etc/objects/agro# ls -la
total 24
drwxr-xr-x 2 nagios nagios 4096 2008-05-27 16:42 .
drwxrwxr-x 6 nagios nagios 4096 2008-05-28 09:37 …
-rw-r–r-- 1 nagios nagios 3124 2008-05-27 14:31 printer.cfg
-rw-r–r-- 1 nagios nagios 3293 2008-05-27 14:31 switch.cfg
-rw-r–r-- 1 nagios nagios 4892 2008-05-27 16:44 windows.cfg[/blockquote]
But it not works.
We want that each admin can reach his own directories andconfigure his files
Is ?t possible?


#2

What exactly doesn’t work?

If the cfg files in your subdirectories are not being read by nagios, make sure that your nagios.cfg contains a cfg_dir= line for each directory.

We have a whole tree of directories under etc. For each directory specified with cfg_dir= in the nagios.cfg all files ending with .cfg in that directory and its subdirectories are read into the configuration.

That should allow you to keep the admins’s sections separate, but since they’re all owned by Nagios and I wouldn’t recommend changing that, you may need to rely on the honor system that admins won’t change other admins’ configs.