Does Nagios have an API that can control targets?
In Zabbix, there is a well documented (although in Draft status) API for instantiating targets and controlling them. Does such an API exist in Nagios?
The need for this is a cloud-based implementation. I would like to be able to scale monitoring targets d开发者_高级运维ynamically so that on Monday it would be monitoring 10 targets and Tuesday it would be monitoring 15 and down to 8 on Wednesday.
The best way I can figure to do this is to control targets in a programmatic fashion since auto-discovery will probably fail as the nodes are not in the same subnet. Any ideas on how to do this with Nagios?
Nagios does not natively have this ability. I have gotten around this in the past by adding scripts to contact the nagios server and register on first boot and then using nagios to destroy servers either automatically or via user command. These are custom scripts though.
I have also passed through this problem and yes Nagios does not have any kind of Command Line API but I have discovered that NagiosQL has this feature. http://www.nagiosql.org/
There are many advantages for using such a tool but I will not touch this here...
Regarding the command line API, NagiosQL can manage multiple domains through web interface or command line api. Im my opinion this is very useful.
精彩评论