Hi,
After having Nagios Core installed , up and running, I have created a very first host definition file and have it placed /usr/local/nagios/etc/objects/server1.cfg.
Then I modify the /usr/local/nagios/etc/nagios.cfg file by adding these lines:
# Definitions for monitoring the server1 (Linux) host
cfg_file=/usr/local/nagios/etc/objects/server1.cfg
This works fine, however, I need to create about 100 hosts so I don't want to create 100 host definition files and add 100 lines into the nagios.cfg file.
What would be the most efficient way for me to do this?
I think I can point to a directory or something like that, but not sure how to do this.
thanks,
ik.
efficient way to create and manage host definition files?
Re: efficient way to create and manage host definition files
ikekim wrote:I think I can point to a directory or something like that, but not sure how to do this.
Code: Select all
# You can also tell Nagios to process all config files (with a .cfg
# extension) in a particular directory by using the cfg_dir
# directive as shown below:
cfg_dir=/path/to/some/cfg/files
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
-
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact: