简体   繁体   English

如何在天蓝色服务总线上警告队列大小

[英]How to alert on queue size on azure service bus

I have a premium service bus in Azure with a number of Queues. 我在Azure中有一个高级服务总线,有许多队列。 I can set max size for these, but I can't seem to find a way to alert the support team, via any route, but I would prefer email, if these queues exceed 1,000 messages in length, ie our consumers have fallen over or are not processing fast enough. 我可以为这些设置最大尺寸,但我似乎找不到通过任何路线提醒支持团队的方法,但我更喜欢电子邮件,如果这些队列长度超过1,000条消息,即我们的消费者已经倒下或处理速度不够快。

How can I set up some form of alerting for queue length on Azure service bus? 如何在Azure服务总线上为队列长度设置某种形式的警报?

PS we still seem to be waiting for it to be implemented as a first class feature: https://feedback.azure.com/forums/231545-diagnostics-and-monitoring/suggestions/4486464-alerts-based-on-queue-size PS我们似乎仍在等待它作为一流的功能实现: https//feedback.azure.com/forums/231545-diagnostics-and-monitoring/suggestions/4486464-alerts-based-on-queue-尺寸

Traditionally, a solution was indeed to pull message counts using NamespaceManager and report that value periodically. 传统上,解决方案确实是使用NamespaceManager来提取消息计数并定期报告该值。 While it's an approach that works, there's another alternative that is emerging these days - Azure Monitor Service . 虽然这是一种有效的方法,但现在又出现了另一种替代方案 - Azure Monitor Service

With this approach, unlike polling for data, Azure Service Bus is reporting to Monitor the metrics. 使用此方法,与数据轮询不同,Azure Service Bus报告监视指标。 Those metrics can be queried or alerts be created sending notifications to email addresses, webhook, or LogicApp. 可以查询这些指标或创建警报,向电子邮件地址,webhook或LogicApp发送通知。 It's still fresh and in preview, but is shaping up nicely. 它仍然是新鲜的和预览,但正在形成良好。 For Azure Service Bus specifically, you can already get the metrics for a namespace and entity specific information should be available in a foreseeable future. 特别是对于Azure Service Bus,您可以获取命名空间的度量标准,并且在可预见的将来应该可以获得特定于实体的信息。

Update 更新

I've raised an issue for Azure Service Bus you can track to see when it's available. 我为Azure Service Bus 提出了一个问题 ,您可以跟踪它以查看它何时可用。

I haven't heard of out-of-the-box solution which does not involve custom code or 3rd party service. 我还没有听说过不需要自定义代码或第三方服务的开箱即用解决方案。

IMO, what often happens is that the company has a tool to monitor all operational metrics of their IT landscape, and also do alerts. IMO,经常发生的事情是公司有一个工具来监控其IT环境的所有运营指标,并且还会发出警报。 Depending on the tool, there might be varying levels of Azure Services monitoring support. 根据工具的不同,可能会有不同级别的Azure服务监视支持。

If you don't have such tool, or your tool doesn't integrate with Service Bus, one approach is to create an Azure Function (or multiple functions) to retrieve statistics from Service Bus queues, and then integrate it with an alert-enabled tool. 如果您没有此类工具,或者您的工具未与Service Bus集成,则一种方法是创建Azure功能(或多个功能)以从Service Bus队列中检索统计信息,然后将其与启用警报的功能集成工具。

The suggestion forum from your question has a link to such integration to Azure Application Insights . 您的问题中的建议论坛提供了与Azure Application Insights的此类集成的链接。 We use PRTG for monitoring and alerting, so we integrated PRTG to Azure Functions . 我们使用PRTG进行监控和警报,因此我们将PRTG集成到Azure功能中

Azure portal provides the facility to trigger alert when an entity exceeds a threshold value. Azure门户提供了在实体超过阈值时触发警报的工具。 You can use monitoring in Azure portal to achieve this. 您可以在Azure门户中使用监视来实现此目的。 Note that this feature is in preview stage currently. 请注意,此功能目前处于预览阶段。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM