简体   繁体   English

从 Log Analytics Workspace 在 Azure 上设置警报

[英]Set an alert on Azure from Log Analytics Workspace

So i have three servers in my Log Analytics Workspace and one of them runs Java application, that i can monitor from logs using perf command for it's utilisation or it's stats.因此,我的 Log Analytics 工作区中有三台服务器,其中一台运行 Java 应用程序,我可以使用perf命令从日志中监控其利用率或统计信息。

Now i want to set an alert if that java service stops.现在,如果该 java 服务停止,我想设置一个警报。 I want that alert to notify me whenever java service has been stopped from last 30 seconds.我希望该警报在最近 30 秒后停止 java 服务时通知我。

Is there any way i can achieve that?有什么办法可以实现吗?

alert to notify me whenever java service has been stopped from last 30 seconds.每当 java 服务从最近 30 秒停止时提醒我。 Is there any way i can achieve that?有什么办法可以实现吗?

Yes, it is possible in Azure Alerts.是的,在 Azure 警报中是可能的。

Follow the workaround to achieve this.按照解决方法来实现这一点。

  1. Create an alert in azure monitor for specific app service.在 Azure Monitor 中为特定应用服务创建警报。 Azure Monitor -> Alerts -> Create Alert Select Specific Scope (Your Application) which you want to get alert. Azure Monitor -> Alerts -> Create Alert选择要获取警报的特定范围(您的应用程序)。
  2. After adding scope go to condition Tab and select the signal type as Activity Log .添加范围后,转到条件选项卡并选择信号类型作为Activity Log Then select the signal name as Stop Web App然后选择信号名称为Stop Web App 在此处输入图像描述在此处输入图像描述

After adding the signals create the alert and save it.添加信号后,创建警报并保存。 Then whenever the web app stops it will trigger the alert.然后,每当 Web 应用程序停止时,它都会触发警报。

Result结果

在此处输入图像描述

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

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