gpt4 book ai didi

azure - AppInsights - 监控挂起的进程

转载 作者:行者123 更新时间:2023-12-03 05:46:46 24 4
gpt4 key购买 nike

我们正在考虑为我们的非 Web 应用程序实现 AppInsights。我们想要监视的事情之一是可能“挂起”超过 N 秒或分钟的进程。我一直找不到内置的东西可以做到这一点。我见过或想到的最接近的事情是记录进程开始和结束的 2 个自定义事件,然后发出一个自定义日志警报,该日志在 N 分钟后查询没有匹配“结束”事件的事件。

是否有另一种方法可以使用我没有看到的 AppInsights 来监视挂起的进程?感谢您的帮助。

最佳答案

如果您选择使用应用程序洞察,以下建议仅供您引用(但如果您有其他更好的解决方案,可以忽略此建议):

据此post ,您可以利用心跳功能,具体如下:

    if this application runs more than several seconds, you can leverage heartbeat 
feature - it sends metric every N minutes/seconds (configurable) and the absence of such
metric will indicate that application is no longer actively running. However, if
Application Insights thread survives, then heartbeat will still be reported.

You can rely on presense/absense of the telemetry from this app in general as well as
couple custom events as you outlined above - Azure Monitor allows to set an alert on
analytics query, so you'll be able to craft a query that returns nothing in case of
application issues and set an alert on 0 count returned by such a query.

关于azure - AppInsights - 监控挂起的进程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53196142/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com