Syslog 心跳和监控
有谁知道系统日志如何提供任何心跳机制,或者即使我无法找到太多信息,也知道系统日志是否提供任何心跳机制?
我正在特别考虑如何监视提供系统日志消息的设备。
我并不是特别希望使用外部解决方案,而是系统日志可能会自行提供一些东西,如果出现问题,可以对其进行监视/询问和标记。
或者他们是一个标准的轻量级基于 TCP 的心跳协议,运行在 win/linux/bsd/solaris/aix/hp-ux 上?
Does anybody know how or even if, since I can't locate much on it, syslog offers any heartbeat mechanism?
I'm specifically thinking about how to monitor the devices that offer up syslog messages.
I'm not specifically looking to use an external solution, but instead something syslog possibly offers itself, which can be monitored/interrogated and flagged if something is down.
Or is their a standard lightweight tcp-based heartbeat protocol which runs on win/linux/bsd/solaris/aix/hp-ux?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
动机
也许您已经解决了问题,但没有发布您的解决方案,或者您可能已经放弃了,并且仍在等待。我有同样的问题并找到了答案。这里是:
SYSLOG
Syslog 本身提供“标记”。其实这就是心跳。
系统日志条目如下所示:
[来源:http://www.linuxjournal.com/article/5476 ]
NXLOG
如果您希望 NXLOG 也能做到这一点,您可以使用模块 im_mark 来完成此操作:
[来源:https://nxlog.org/node/295#im_mark ]
Windows 上 nxlog 的日志如下所示:
您可以使用以下正则表达式来触发此类日志条目:
Motivation
Maybe you already solved your problem but didn't post your solution or maybe you gave up on that and you're still waiting. I had the same problem and found an answer. Here it is:
SYSLOG
Syslog itself offers "mark". Actually this is a heartbeat.
An syslog entry looks like this:
[Source: http://www.linuxjournal.com/article/5476 ]
NXLOG
If you want the same for NXLOG you can do this by using the Module im_mark:
[Source: https://nxlog.org/node/295#im_mark ]
A log from nxlog on Windows looks like this:
You could use the following RegEx to trigger on such logentries: