Dynamically adding new host in nagios

nagios

I having nagios server which monitoring xml files available in directory.

Each xml file has unique id, based on the id i create the host in the nagios server with the help of configuration file.

so every xml file has host and corresponding services.

number of xml files in the directory is not fixed, it will change during run time.

So how i can add new host(host config file) for newly added xml file with different id in the directory in runtime?

Is it possible to add new host from nagios webconsole ?

Thanks.

Best Answer

Maybe you could use external commands (e.g RESTART_PROGRAM) to reload the nagios configuration files each time a new XML file trigger a new host config file.

To automate, you could use a service which check new XML files and an event handler to use the RESTART_PROGRAM external command.