系统日志问题
我正在查看系统日志。
据我所知,它是一个集中式日志记录工具,可以从各种来源收集日志。
我听说 syslog 可以在达到日志文件最大文件大小等条件下生成警报。
这是真的吗?
因为我还没有找到这是如何完成的。
大多数帖子仅涉及日志记录。
事件生成是如何完成的?
即,如果我有一个充当日志源的应用程序(将日志记录重定向到系统日志),那么如果已达到最大文件大小,我的应用程序是否可以收到警报?
这是如何配置的?
谢谢你!
I am looking into syslog.
I understand that it is a centralized logging facility that collects logs from various sources.
I have heard that syslog can generate alerts on conditions e.g. max file size of log file is reached.
Is this true?
Because I haven't found how this is done.
Most posts just refer to the logging.
How is the event generation done?
I.e. if I have an app that acts as a log source (redirects logging to a syslog) then is it possible my app can receive an alert, if the max file size has been reached?
How is this configured?
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从应用程序的角度来看,syslog函数主要是应用程序信息的接收者;应用程序可以将消息写入系统日志。应用程序向系统日志守护进程提供各种信息,包括消息的严重性。
syslog 守护进程 可以配置为在收到不同类型的消息时采取不同的操作。
不,当达到最大文件大小时,您的应用程序无法收到警报 - 至少不能通过系统日志收到警报。您可能会收到可以捕获的 SIGXFSZ 信号。您可能更愿意查看资源限制并密切关注文件大小以避免出现问题。
From the application perspective, the syslog function is primarily a receiver of information from the application; the application can write messages to the syslog. There are various bits of information that the application provides to the syslog daemon, including the severity of the message.
The syslog daemon can be configured to take different actions on receipt of different types of message.
No, your application cannot receive an alert when the maximum file size is reached - at least, not via syslog. You might get a SIGXFSZ signal which you can trap. You might prefer to look at your resource limits and keep tabs on your file size to avoid the problem.