master
conf 153 lines 5.76 KB
Raw
1 # you can disable an alarm notification by setting the 'to' line to: silent
2
3 # --- Errors: Failed Requests ---
4
5 # helper: total requests over 5m (no alarm, value only)
6 template: am_appgw_total_requests
7 on: azure_monitor.application_gateway.requests
8 class: Workload
9 type: Web Server
10 component: Application Gateway
11 lookup: sum -5m unaligned of total
12 units: requests/s
13 every: 1m
14 info: Total requests on Application Gateway ${label:resource_name}
15
16 # failed request ratio — fires only when traffic is meaningful
17 template: am_appgw_failed_requests
18 on: azure_monitor.application_gateway.requests
19 class: Errors
20 type: Web Server
21 component: Application Gateway
22 lookup: sum -5m unaligned of failed
23 calc: ($am_appgw_total_requests > 10) ? ($this * 100 / $am_appgw_total_requests) : (0)
24 units: %
25 every: 1m
26 warn: $this > (($status >= $WARNING) ? (5) : (10))
27 crit: $this > (($status == $CRITICAL) ? (10) : (25))
28 delay: down 5m multiplier 1.5 max 1h
29 summary: App Gateway failed requests on ${label:resource_name}
30 info: Percentage of failed requests on Application Gateway ${label:resource_name} \
31 in ${label:resource_group} (${label:region})
32 to: sysadmin
33
34 # --- Availability: Backend Health ---
35
36 template: am_appgw_unhealthy_hosts
37 on: azure_monitor.application_gateway.backend_health
38 class: Errors
39 type: Web Server
40 component: Application Gateway
41 lookup: average -5m unaligned of unhealthy
42 units: hosts
43 every: 1m
44 warn: $this > (($status >= $WARNING) ? (0) : (1))
45 crit: $this > (($status == $CRITICAL) ? (1) : (2))
46 delay: down 5m multiplier 1.5 max 1h
47 summary: App Gateway unhealthy backends on ${label:resource_name}
48 info: Unhealthy backend hosts on Application Gateway ${label:resource_name} \
49 in ${label:resource_group} (${label:region})
50 to: sysadmin
51
52 # --- Latency: Backend Connect Time ---
53
54 template: am_appgw_backend_connect_time
55 on: azure_monitor.application_gateway.backend_latency
56 class: Latency
57 type: Web Server
58 component: Application Gateway
59 lookup: average -5m unaligned of connect
60 units: milliseconds
61 every: 1m
62 warn: $this > (($status >= $WARNING) ? (100) : (250))
63 crit: $this > (($status == $CRITICAL) ? (250) : (500))
64 delay: down 5m multiplier 1.5 max 1h
65 summary: App Gateway backend connect time on ${label:resource_name}
66 info: Average backend connection time on Application Gateway ${label:resource_name} \
67 in ${label:resource_group} (${label:region})
68 to: sysadmin
69
70 # --- Latency: Backend First Byte ---
71
72 template: am_appgw_backend_first_byte
73 on: azure_monitor.application_gateway.backend_latency
74 class: Latency
75 type: Web Server
76 component: Application Gateway
77 lookup: average -5m unaligned of first_byte
78 units: milliseconds
79 every: 1m
80 warn: $this > (($status >= $WARNING) ? (2000) : (4000))
81 crit: $this > (($status == $CRITICAL) ? (4000) : (8000))
82 delay: down 5m multiplier 1.5 max 1h
83 summary: App Gateway backend TTFB on ${label:resource_name}
84 info: Average backend time to first byte on Application Gateway ${label:resource_name} \
85 in ${label:resource_group} (${label:region})
86 to: sysadmin
87
88 # --- Latency: Total Client Request Time ---
89
90 template: am_appgw_total_time
91 on: azure_monitor.application_gateway.client_latency
92 class: Latency
93 type: Web Server
94 component: Application Gateway
95 lookup: average -5m unaligned of total_time
96 units: milliseconds
97 every: 1m
98 warn: $this > (($status >= $WARNING) ? (3000) : (5000))
99 crit: $this > (($status == $CRITICAL) ? (5000) : (10000))
100 delay: down 5m multiplier 1.5 max 1h
101 summary: App Gateway total request time on ${label:resource_name}
102 info: Average total client request time on Application Gateway ${label:resource_name} \
103 in ${label:resource_group} (${label:region})
104 to: sysadmin
105
106 # --- Utilization: CPU ---
107
108 template: am_appgw_cpu_utilization
109 on: azure_monitor.application_gateway.cpu
110 class: Utilization
111 type: Web Server
112 component: Application Gateway
113 lookup: average -5m unaligned of average
114 units: percentage
115 every: 1m
116 warn: $this > (($status >= $WARNING) ? (75) : (85))
117 crit: $this > (($status == $CRITICAL) ? (85) : (95))
118 delay: down 5m multiplier 1.5 max 1h
119 summary: App Gateway CPU utilization on ${label:resource_name}
120 info: CPU utilization on Application Gateway ${label:resource_name} \
121 in ${label:resource_group} (${label:region})
122 to: sysadmin
123
124 # --- Errors: WAF Blocked Request Ratio ---
125
126 # helper: total WAF requests over 5m (no alarm, value only)
127 template: am_appgw_waf_total_requests
128 on: azure_monitor.application_gateway.waf_requests
129 class: Workload
130 type: Web Server
131 component: Application Gateway
132 lookup: sum -5m unaligned of total
133 units: requests/s
134 every: 1m
135 info: Total WAF requests on Application Gateway ${label:resource_name}
136
137 # WAF blocked ratio — fires only when WAF has meaningful traffic
138 template: am_appgw_waf_blocked_ratio
139 on: azure_monitor.application_gateway.waf_requests
140 class: Errors
141 type: Web Server
142 component: Application Gateway
143 lookup: sum -5m unaligned of blocked
144 calc: ($am_appgw_waf_total_requests > 10) ? ($this * 100 / $am_appgw_waf_total_requests) : (0)
145 units: %
146 every: 1m
147 warn: $this != nan AND $this > (($status >= $WARNING) ? (25) : (50))
148 delay: down 5m multiplier 1.5 max 1h
149 summary: App Gateway WAF block ratio on ${label:resource_name}
150 info: Percentage of requests blocked by WAF on Application Gateway ${label:resource_name} \
151 in ${label:resource_group} (${label:region}). \
152 High values may indicate an attack or WAF misconfiguration
153 to: sysadmin