让 C# 应用程序与 Nagios 通信
我们使用 Nagios 来监控我们的网络并取得了很好的效果。现在我们正在努力解决一个新的要求:
我们想要通知 Nagios 一个非 致命但严重的应用程序错误。这 应用程序不会停止运行,但 有某种问题 需要调查。
调查问题后, 我们需要某种方法来“取消标记” Nagios 中的问题。
我们尝试使用系统日志,但最大的问题是一旦记录错误,服务就会陷入错误状态,无法恢复。此外,虽然应用程序会向系统日志报告严重错误,但大多数时候它们不会报告“全部清除”错误。
We are using Nagios to monitor our network with great results. There is now a new requirement we are struggling with:
We want to notify Nagios of an non
fatal but critical application errors. The
application does not stop running but
there is some sort of issue that
needs looking into.Once the issue has been looked into,
we need some way to "unflag" the
issue in Nagios.
We tried using the syslog, but the biggest problem was once an error was logged, the service was put into an error state with no way to recover. Also, while applications would report a critical error to the syslog, most of the time they don't report an "All clear" error.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经使用被动检查完成了此操作: http://nagios.sourceforge.net/docs /3_0/passivechecks.html
基本上,您的应用程序只是将一些数据提供给 nagios 核心到其外部命令文件中。 Nagios 最终将读取数据并更新警报、执行事件处理程序等。
具体设置方式对于您的情况来说将是唯一的,但如果您需要任何其他帮助,请告诉我。 :)
I've done this using passive checks: http://nagios.sourceforge.net/docs/3_0/passivechecks.html
Basically, you're application is just going to feed the nagios core some data into its external command file. Nagios will eventually read the data and update the alerts, execute event handlers, etc.
Exactly how you set this up will be unique for your case, but if you need any other help just let me know. :)