【问题标题】:Custom events for zend server monitorzend 服务器监视器的自定义事件
【发布时间】:2011-04-19 08:48:12
【问题描述】:

我在 PHP 中使用 Zend 服务器构建了复杂的 SOAP Web 服务。

我想在外部系统中创建自定义监控事件。 我已经在使用带有聚合提示的“自定义事件”,但在我的情况下还不够。事件应该有不同的严重性和发生后采取的行动。

我正在积极使用 Zend Monitoring 来报告所有错误之王。从解析错误开始,功能中的逻辑警告到来自其他系统的错误。它导致在 zend 服务器控制台中进行大量监控。不幸的是,它们都被命名为“自定义事件”,因此为了找到原因,它必须一一检查每个事件(事件列表中也没有显示聚合提示)。我可以扩展 Zend_Log_Writer_ZendMonitor 类以登录到不同的地方,但我正在编写 Zend Monitor :(

我发现所有的事件都存储在 /usr/local/zend/etc/events_rules.xml 我计划在那里添加新事件,但找不到该文件的任何规范。可能的规则->规则->事件类型是什么?

申请后期如何处理? 是否可以使用 zend_monitor_custom_event 或类似方法从我们的系统内部调用“新”事件?

【问题讨论】:

    标签: php reporting monitoring zend-server


    【解决方案1】:

    你知道Zend_Log_Writer_ZendMonitor的存在吗?您可以使用 Zend_Log 组件与 Zend Server Monitor 交互并记录到其中!

    Zend_Log 是一个通用的日志组件,它似乎涵盖了您所要求的内容,即严重性级别。

    Zend_Log 采用 Zend_Log_Writer 实例,在您的情况下,您将传递一个 Zend_Log_Writer_ZendMonitor 实例,该实例专门用于将 Zend 事件记录到 Zend 服务器。

    【讨论】:

    • Zend_Log_Writer_ZendMonitor 使用 Zend Monitor API 中的 monitor_custom_event() 函数。所以基本上 its the same Im 现在就拥有了。基本上我想摆脱“自定义事件”并放置“API解析错误”等事件。事件分组也不够。
    • 你考虑过扩展课程吗?
    • Im OK with extending it, but dont 看看它如何解决我的问题。
    • 好吧,那我可能只是对您的问题和 Zend Server 架构了解不够。
    • Im 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 class to log into different place but tham Im wrighting Zend Monitor :(
    猜你喜欢
    • 1970-01-01
    • 2017-02-18
    • 1970-01-01
    • 1970-01-01
    • 2017-03-20
    • 1970-01-01
    • 2013-11-09
    相关资源
    最近更新 更多