zend 服务器监视器的自定义事件
我使用 PHP 和 Zend 服务器构建了复杂的 SOAP Web 服务。
我想在系统中创建自定义监控事件。 我已经在使用带有聚合提示的“自定义事件”,但这对我来说还不够。事件应该具有不同的严重性以及发生后采取的行动。
我正在积极使用 Zend Monitoring 来报告所有错误。从解析错误开始,功能中的逻辑警告到从其他系统获取的错误。它导致 zend 服务器控制台中的监控量非常大。不幸的是,它们都被命名为“自定义事件”,因此为了找到原因,必须一一检查每个事件(事件列表中也未显示聚合提示)。我可以扩展 Zend_Log_Writer_ZendMonitor 类来登录到不同的位置,但我正在编写 Zend Monitor :(
我发现所有事件都存储在 /usr/local/zend/etc/events_rules.xml,我计划在那里添加新事件,但找不到该文件的任何规范。可能的规则->规则->事件类型是什么?
后期申请中出现问题如何处理? 可以使用 zend_monitor_custom_event 或类似的方法从我们的系统内部调用“新”事件吗?
I have complex SOAP web-service build in PHP with Zend server.
I want to create custom monitoring events in out system.
I are already using "Custom Events" with aggregation hinting but it`s not enough in my case. Events should have different severity and actions take after occurring.
I`m actively using Zend Monitoring for reporting all king of errors. Starting from parsing errors, logical warnings in function to errors got from other systems. It results in really big amount in monitoring in zend server console. Unfortunately all of them are named "Custom Event", so for finding the cause it have to check every Event one by one (also the aggregation hint in not shown in the event list). I can extend the Zend_Log_Writer_ZendMonitor class to log into different place but tham I`m wrighting Zend Monitor :(
I have found that all the events are stored in
/usr/local/zend/etc/events_rules.xml and I plan to add new event there, but can`t find any specifications to this file. What are the possible rules->rule->event-types?
How to handle the problem later in application?
Can the "new" events can be called from inside our system using zend_monitor_custom_event or similar?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您知道 Zend_Log_Writer_ZendMonitor 的存在吗?您可以使用 Zend_Log 组件与 Zend Server Monitor 交互并记录日志!
Zend_Log 是一个通用的日志记录组件,它似乎涵盖了您所要求的内容,即严重性级别。
Zend_Log 采用一个 Zend_Log_Writer 实例,在您的情况下,您将向它传递一个 Zend_Log_Writer_ZendMonitor 实例,该实例专门用于将 Zend 事件记录到 Zend Server。
You know about the existence of Zend_Log_Writer_ZendMonitor? You can use the Zend_Log component to interact with and log to Zend Server Monitor!
Zend_Log is a generic logging component which seems to cover what you're asking for, namely severity levels.
Zend_Log takes a Zend_Log_Writer instance and in your case you would pass it a Zend_Log_Writer_ZendMonitor instance which is specialized in logging Zend Events to the Zend Server.