Skip to content

Commit 234f994

Browse files
Rename metrics in Prometheus alerts tests to be consistent with docker cluster
1 parent 3394f26 commit 234f994

File tree

2 files changed

+99
-99
lines changed

2 files changed

+99
-99
lines changed

example/prometheus/alerts.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,12 @@ groups:
8484

8585
- name: tarantool-business
8686
rules:
87-
# Warning for any endpoint of an instance in example_project job that responds too long.
87+
# Warning for any endpoint of an instance in tarantool_app job that responds too long.
8888
# Beware that metric name depends on name of the collector you use in HTTP metrics middleware
8989
# and request depends on type of this collector.
9090
# This example based on summary collector with default name.
9191
- alert: HTTPHighLatency
92-
expr: http_server_request_latency{ job="example_project", quantile="0.99" } > 0.1
92+
expr: http_server_request_latency{ job="tarantool_app", quantile="0.99" } > 0.1
9393
for: 5m
9494
labels:
9595
severity: warning
@@ -98,12 +98,12 @@ groups:
9898
description: "Some {{ $labels.method }} requests to {{ $labels.path }} path with {{ $labels.status }} response status
9999
on {{ $labels.alias }} instance of job {{ $labels.job }} are processed too long."
100100

101-
# Warning for any endpoint of an instance in example_project job that sends too much 4xx responses.
101+
# Warning for any endpoint of an instance in tarantool_app job that sends too much 4xx responses.
102102
# Beware that metric name depends on name of the collector you use in HTTP metrics middleware
103103
# and request depends on type of this collector.
104104
# This example based on summary collector with default name.
105105
- alert: HTTPHighClientErrorRateInstance
106-
expr: sum by (job, instance, method, path, alias) (rate(http_server_request_latency_count{ job="example_project", status=~"^4\\d{2}$" }[5m])) > 10
106+
expr: sum by (job, instance, method, path, alias) (rate(http_server_request_latency_count{ job="tarantool_app", status=~"^4\\d{2}$" }[5m])) > 10
107107
for: 1m
108108
labels:
109109
severity: warning
@@ -112,12 +112,12 @@ groups:
112112
description: "Too many {{ $labels.method }} requests to {{ $labels.path }} path
113113
on {{ $labels.alias }} instance of job {{ $labels.job }} get client error (4xx) responses."
114114

115-
# Warning for any endpoint in example_project job that sends too much 4xx responses (cluster overall).
115+
# Warning for any endpoint in tarantool_app job that sends too much 4xx responses (cluster overall).
116116
# Beware that metric name depends on name of the collector you use in HTTP metrics middleware
117117
# and request depends on type of this collector.
118118
# This example based on summary collector with default name.
119119
- alert: HTTPHighClientErrorRate
120-
expr: sum by (job, method, path) (rate(http_server_request_latency_count{ job="example_project", status=~"^4\\d{2}$" }[5m])) > 20
120+
expr: sum by (job, method, path) (rate(http_server_request_latency_count{ job="tarantool_app", status=~"^4\\d{2}$" }[5m])) > 20
121121
for: 1m
122122
labels:
123123
severity: warning
@@ -126,12 +126,12 @@ groups:
126126
description: "Too many {{ $labels.method }} requests to {{ $labels.path }} path
127127
on instances of job {{ $labels.job }} get client error (4xx) responses."
128128

129-
# Warning for any endpoint of an instance in example_project job that sends 5xx responses.
129+
# Warning for any endpoint of an instance in tarantool_app job that sends 5xx responses.
130130
# Beware that metric name depends on name of the collector you use in HTTP metrics middleware
131131
# and request depends on type of this collector.
132132
# This example based on summary collector with default name.
133133
- alert: HTTPServerErrors
134-
expr: sum by (job, instance, method, path, alias) (rate(http_server_request_latency_count{ job="example_project", status=~"^5\\d{2}$" }[5m])) > 0
134+
expr: sum by (job, instance, method, path, alias) (rate(http_server_request_latency_count{ job="tarantool_app", status=~"^5\\d{2}$" }[5m])) > 0
135135
for: 1m
136136
labels:
137137
severity: warning
@@ -140,12 +140,12 @@ groups:
140140
description: "Some {{ $labels.method }} requests to {{ $labels.path }} path
141141
on {{ $labels.alias }} instance of job {{ $labels.job }} get server error (5xx) responses."
142142

143-
# Warning for any endpoint of a router instance (with "router" in alias) in example_project job that gets too little requests.
143+
# Warning for any endpoint of a router instance (with "router" in alias) in tarantool_app job that gets too little requests.
144144
# Beware that metric name depends on name of the collector you use in HTTP metrics middleware
145145
# and request depends on type of this collector.
146146
# This example based on summary collector with default name.
147147
- alert: HTTPLowRequestRateRouter
148-
expr: sum by (job, instance, alias) (rate(http_server_request_latency_count{ job="example_project", alias=~"^.*router.*$" }[5m])) < 10
148+
expr: sum by (job, instance, alias) (rate(http_server_request_latency_count{ job="tarantool_app", alias=~"^.*router.*$" }[5m])) < 10
149149
for: 5m
150150
labels:
151151
severity: warning

0 commit comments

Comments
 (0)