Includes using includes...
Caron, Chris
caronc at navcanada.ca
Thu Aug 14 14:56:22 CEST 2008
Hi guys,
I want to use the Nagios directive: 'cfg_dir=/new/directory' from within
a cfg_dir= defined already in the /etc/nagios/nagios.cfg file...
The reason? Simple:
We have a cluster that has projects being dropped in and out all the
time... each project is stored in:
/opt/<random project folder>
I wanted to add a: /opt/<random project folder>/nagios directory to each
project so they can add and remove to it and keep with the global
monitoring of the cluster. Thus keeping all monitoring centralized...
I was hoping I could do this through the adding and removing of files
(similar to how all other programs/services work) instead of
manipulating a file.
I want to avoid using 'sed' and updating the nagios.cfg file each time a
project is added or removed. Is this possible?
In retrospect:
/etc/nagios/nagios.cfg > #line 30 > cfg_dir=/etc/nagios/includes
/etc/nagios/includes/<random_project_id>.cfg > #line 1 >
cfg_dir=/opt/<random_project_id>/nagios
$> ls /opt/<random_project_id>/nagios
Test.cfg
Test2.cfg
Etc...
My proposed idea (an cfg_dir in a config file within a previously
defined cfg_dir) does not work... But I was curious on workarounds or
other great suggestions from others on ways around this.
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20080814/e297aac6/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
-------------- next part --------------
_______________________________________________
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