efficient way to create and manage host definition files?
Posted: Tue Oct 17, 2017 2:17 pm
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.
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.