Nagios Multiple servers config files

nagios

I'm already configuring a Nagios setup to monitor about 30 Windows servers. Now i am adding every servers definition to the Windows.cfg file but i think would be easyly configurable to have one .cfg file per server (Server1.cfg, Server2.cfg, Server3.cfg, etc) and link this files from Windows.cfg.

Anyone knows the better way to do this?

Thanks.

Best Answer

If your systems are reletively similiar, you should try and use object inheritance to limit the amount of code you have to modify in the future.

In addition to that, you can use the cfg_dir directive in your top-level config (nagios.cfg) to specify an entire directory of configuration files. Any file ending in .cfg will be included, which allows for configuration to be toggled simply be renaming files.

For example:

cfg_dir=/usr/local/nagios/etc/objects