master
conf 175 lines 6.88 KB
Raw
1 # you can disable an alarm notification by setting the 'to' line to: silent
2
3 # --- Availability ---
4
5 template: am_cosmos_db_availability
6 on: azure_monitor.cosmos_db.availability
7 class: Availability
8 type: Database
9 component: Cosmos DB
10 lookup: average -10m unaligned of average
11 units: percentage
12 every: 1m
13 warn: $this < (($status >= $WARNING) ? (99.99) : (99.9))
14 crit: $this < (($status == $CRITICAL) ? (99.9) : (99))
15 delay: down 5m multiplier 1.5 max 1h
16 summary: Cosmos DB availability on ${label:resource_name}
17 info: Service availability of Cosmos DB account ${label:resource_name} \
18 in ${label:resource_group} (${label:region})
19 to: dba
20
21 # --- Utilization ---
22
23 template: am_cosmos_db_normalized_ru_consumption
24 on: azure_monitor.cosmos_db.normalized_ru_consumption
25 class: Utilization
26 type: Database
27 component: Cosmos DB
28 lookup: average -5m unaligned of maximum
29 units: percentage
30 every: 1m
31 warn: $this > (($status >= $WARNING) ? (70) : (80))
32 crit: $this > (($status == $CRITICAL) ? (80) : (90))
33 delay: down 5m multiplier 1.5 max 1h
34 summary: Cosmos DB RU consumption on ${label:resource_name}
35 info: Normalized request unit consumption on Cosmos DB account ${label:resource_name} \
36 in ${label:resource_group} (${label:region}). \
37 High values indicate approaching provisioned throughput limit and risk of throttling
38 to: dba
39
40 template: am_cosmos_db_storage_utilization
41 on: azure_monitor.cosmos_db.storage
42 class: Utilization
43 type: Database
44 component: Cosmos DB
45 calc: ($quota > 0) ? (($data + $index) * 100 / $quota) : (0)
46 units: %
47 every: 5m
48 warn: $this > (($status >= $WARNING) ? (70) : (80))
49 crit: $this > (($status == $CRITICAL) ? (80) : (90))
50 delay: down 5m multiplier 1.5 max 1h
51 summary: Cosmos DB storage utilization on ${label:resource_name}
52 info: Data and index storage as a percentage of document quota on Cosmos DB account ${label:resource_name} \
53 in ${label:resource_group} (${label:region})
54 to: dba
55
56 # --- Latency ---
57
58 template: am_cosmos_db_server_side_latency_direct
59 on: azure_monitor.cosmos_db.server_side_latency
60 class: Latency
61 type: Database
62 component: Cosmos DB
63 lookup: average -5m unaligned of direct
64 units: milliseconds
65 every: 1m
66 warn: $this != nan AND $this > (($status >= $WARNING) ? (8) : (10))
67 crit: $this != nan AND $this > (($status == $CRITICAL) ? (10) : (15))
68 delay: down 5m multiplier 1.5 max 1h
69 summary: Cosmos DB direct latency on ${label:resource_name}
70 info: Average server-side latency for direct connections on Cosmos DB account ${label:resource_name} \
71 in ${label:resource_group} (${label:region})
72 to: dba
73
74 template: am_cosmos_db_server_side_latency_gateway
75 on: azure_monitor.cosmos_db.server_side_latency
76 class: Latency
77 type: Database
78 component: Cosmos DB
79 lookup: average -5m unaligned of gateway
80 units: milliseconds
81 every: 1m
82 warn: $this != nan AND $this > (($status >= $WARNING) ? (40) : (50))
83 crit: $this != nan AND $this > (($status == $CRITICAL) ? (60) : (80))
84 delay: down 5m multiplier 1.5 max 1h
85 summary: Cosmos DB gateway latency on ${label:resource_name}
86 info: Average server-side latency for gateway connections on Cosmos DB account ${label:resource_name} \
87 in ${label:resource_group} (${label:region})
88 to: dba
89
90 template: am_cosmos_db_replication_latency
91 on: azure_monitor.cosmos_db.replication_latency
92 class: Latency
93 type: Database
94 component: Cosmos DB
95 lookup: average -5m unaligned of average
96 units: milliseconds
97 every: 1m
98 warn: $this != nan AND $this > (($status >= $WARNING) ? (100) : (200))
99 crit: $this != nan AND $this > (($status == $CRITICAL) ? (200) : (500))
100 delay: down 5m multiplier 1.5 max 1h
101 summary: Cosmos DB replication latency on ${label:resource_name}
102 info: Average geo-replication latency (P99) on Cosmos DB account ${label:resource_name} \
103 in ${label:resource_group} (${label:region}). \
104 Only relevant when multi-region writes are configured
105 to: dba
106
107 # --- Dedicated Gateway ---
108
109 template: am_cosmos_db_dedicated_gateway_cpu
110 on: azure_monitor.cosmos_db.dedicated_gateway_cpu
111 class: Utilization
112 type: Database
113 component: Cosmos DB
114 lookup: average -5m unaligned of average
115 units: percentage
116 every: 1m
117 warn: $this != nan AND $this > (($status >= $WARNING) ? (75) : (85))
118 crit: $this != nan AND $this > (($status == $CRITICAL) ? (85) : (95))
119 delay: down 5m multiplier 1.5 max 1h
120 summary: Cosmos DB dedicated gateway CPU on ${label:resource_name}
121 info: CPU utilization of the dedicated gateway on Cosmos DB account ${label:resource_name} \
122 in ${label:resource_group} (${label:region})
123 to: dba
124
125 # --- Integrated Cache ---
126
127 template: am_cosmos_db_integrated_cache_item_hit_rate
128 on: azure_monitor.cosmos_db.integrated_cache_hit_rate
129 class: Utilization
130 type: Database
131 component: Cosmos DB
132 lookup: average -10m unaligned of item
133 units: percentage
134 every: 5m
135 warn: $this != nan AND $this < (($status >= $WARNING) ? (60) : (50))
136 delay: down 5m multiplier 1.5 max 1h
137 summary: Cosmos DB cache item hit rate on ${label:resource_name}
138 info: Integrated cache item hit rate on Cosmos DB account ${label:resource_name} \
139 in ${label:resource_group} (${label:region}). \
140 Low hit rates indicate cache is not effectively reducing RU consumption
141 to: dba
142
143 template: am_cosmos_db_integrated_cache_query_hit_rate
144 on: azure_monitor.cosmos_db.integrated_cache_hit_rate
145 class: Utilization
146 type: Database
147 component: Cosmos DB
148 lookup: average -10m unaligned of query
149 units: percentage
150 every: 5m
151 warn: $this != nan AND $this < (($status >= $WARNING) ? (60) : (50))
152 delay: down 5m multiplier 1.5 max 1h
153 summary: Cosmos DB cache query hit rate on ${label:resource_name}
154 info: Integrated cache query hit rate on Cosmos DB account ${label:resource_name} \
155 in ${label:resource_group} (${label:region}). \
156 Low hit rates indicate cache is not effectively reducing RU consumption
157 to: dba
158
159 # --- Cassandra API ---
160
161 template: am_cosmos_db_cassandra_connection_closures
162 on: azure_monitor.cosmos_db.cassandra_connections
163 class: Errors
164 type: Database
165 component: Cosmos DB
166 lookup: average -5m unaligned of total
167 units: connections/s
168 every: 1m
169 warn: $this != nan AND $this > (($status >= $WARNING) ? (5) : (10))
170 delay: down 5m multiplier 1.5 max 1h
171 summary: Cosmos DB Cassandra connection closures on ${label:resource_name}
172 info: Rate of Cassandra connection closures on Cosmos DB account ${label:resource_name} \
173 in ${label:resource_group} (${label:region}). \
174 Only relevant for accounts using the Cassandra API
175 to: dba