I have a Linux environment which having more than 50 servers and which is monitoring by Nagios. Now we are creating new servers using python web based GUI and we need to add them to nagios server manually. Now we would like to add new servers automatically to nagios. is there any method to add the new servers to nagios automatically?
Thanks in advance
I think it's not possible to automatically add client in monitoring system, but you can add it through web browser using Nconf.
Nagios doesn't support this out of the box. That said, it would be fairly easy to create a Python script to automate the task. At the least, you'd have to provide it with a list of machine names and IP addresses, then let the script do all the .cfg file updates. Did this with Perl, taking less than a day to write, it added the host and several basic infra checks.
来源:https://stackoverflow.com/questions/26708916/automatically-add-clients-to-nagios-server