Nagios 有可以控制目标的 API 吗?
在Zabbix中,有一个详细记录的(尽管处于草案状态)API 用于实例化目标并控制它们。 Nagios 中是否存在这样的 API?
为此需要基于云的实施。我希望能够动态扩展监控目标,以便周一监控 10 个目标,周二监控 15 个目标,周三监控目标减少到 8 个。
我能想到的最好方法是以编程方式控制目标,因为自动发现可能会失败,因为节点不在同一子网中。关于如何使用 Nagios 执行此操作有什么想法吗?
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 dynamically 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Nagios 本身并不具备这种能力。我过去通过添加脚本来联系 nagios 服务器并在首次启动时注册,然后使用 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.
我也遇到过这个问题,是的,Nagios 没有任何类型的命令行 API,但我发现 NagiosQL 有这个功能。 http://www.nagiosql.org/
使用这样的工具有很多优点,但我不会触及这里...
关于命令行 API,NagiosQL 可以通过 Web 界面或命令行 api 管理多个域。我认为这非常有用。
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.