官术网_书友最值得收藏!

Alert rule types

Log Analytics alert rules are of two types which are as follows:

  • Number of results: When selected, this will create a single alert for all records that conform to the search query and alert rule arguments. An alert will be generated if the number of records returned by the search query is either Greater than or Less than the value you specify.
  • Metric measurements: When selected, this will create a distinct alert for each record in the search query results, with values that conform to the defined metric measurement threshold. The metric measurement alert rule type is composed of the following properties:
    • Aggregate Value: This is the threshold that must be exceeded by each aggregate value in the records returned by the search query in order for it to be a threshold breach. You can look for results that are Greater than or Less than the specified value in order to be considered a breach.
    • Trigger alert based on: This is the number of breaches required in order for an alert to be created. You can look for a number of Total breaches or Consecutive breaches in order for an alert to be generated.
When using the Metric Measurement alert rule type, the search query should contain AggregatedValue and bin (TimeGenerated, <roundTo>).

For instance, the following query can be used with a Metric Measurement alert rule type to create an alert for each computer object in a query with a value that exceeds an 80% threshold:

Perf 
| where CounterName == "% Processor Time" and ObjectName == "Processor" and InstanceName == "_Total"
| summarize AggregatedValue = avg (CounterValue) by Computer, bin (TimeGenerated, 5m)

To specify that the values of interest are those above the 80% threshold, we specify Greater than 80 in the Aggregate Value field for the Metric measurement alert rule:

Figure 3.5
主站蜘蛛池模板: 霍林郭勒市| 罗定市| 宁远县| 桂东县| 呼图壁县| 沂源县| 琼中| 佛山市| 景东| 汾西县| 昆山市| 万载县| 尉氏县| 浪卡子县| 沛县| 方正县| 咸丰县| 色达县| 从江县| 嘉义市| 鄂伦春自治旗| 祁连县| 湄潭县| 嵊泗县| 遂川县| 贵溪市| 友谊县| 建湖县| 嘉善县| 贵德县| 永新县| 宣化县| 湟源县| 来凤县| 鄂尔多斯市| 绿春县| 宜良县| 内乡县| 栖霞市| 彭州市| 正镶白旗|