fix: tweak apex RPS alert to only check past 5 minutes (#142)

This commit is contained in:
Zack Pollard
2025-06-03 20:08:12 +02:00
committed by GitHub
parent a2618f0b93
commit bc4bbaf920
2 changed files with 17 additions and 13 deletions
@@ -54,18 +54,18 @@ resource "grafana_rule_group" "rule_group_0000" {
ref_id = "A"
relative_time_range {
from = 43200
from = 300
to = 0
}
datasource_uid = "36979063-5384-4eb9-8679-565a727cbc13"
model = "{\"datasource\":{\"type\":\"prometheus\",\"uid\":\"36979063-5384-4eb9-8679-565a727cbc13\"},\"disableTextWrap\":false,\"editorMode\":\"code\",\"expr\":\"((sum by(apexDomain) (count_over_time(tiles_tile_request_invocation{protocol='https:'}[1h])) or 0) + (sum by(apexDomain) (count_over_time(tiles_cdn_hit_count{request_type=\\\"tile\\\", protocol='https:'}[1h])))) / 60 / 60 \\u003e 0.5\",\"fullMetaSearch\":false,\"includeNullMetadata\":true,\"instant\":false,\"interval\":\"1h\",\"intervalMs\":3600000,\"legendFormat\":\"{{origin}}\",\"maxDataPoints\":10,\"range\":true,\"refId\":\"A\",\"useBackend\":false}"
model = "{\"datasource\":{\"type\":\"prometheus\",\"uid\":\"36979063-5384-4eb9-8679-565a727cbc13\"},\"disableTextWrap\":false,\"editorMode\":\"code\",\"expr\":\"((sum by(apexDomain) (count_over_time(tiles_tile_request_invocation{protocol='https:'}[1h])) or 0) + (sum by(apexDomain) (count_over_time(tiles_cdn_hit_count{request_type=\\\"tile\\\", protocol='https:'}[1h])))) / 60 / 60 \\u003e 0.3\",\"fullMetaSearch\":false,\"includeNullMetadata\":true,\"instant\":false,\"interval\":\"1h\",\"intervalMs\":60000,\"legendFormat\":\"{{origin}}\",\"maxDataPoints\":43200,\"range\":true,\"refId\":\"A\",\"useBackend\":false}"
}
data {
ref_id = "C"
relative_time_range {
from = 43200
from = 300
to = 0
}
@@ -76,7 +76,7 @@ resource "grafana_rule_group" "rule_group_0000" {
ref_id = "B"
relative_time_range {
from = 43200
from = 300
to = 0
}
@@ -296,7 +296,7 @@
"options": {
"mode": "exclude",
"names": [
"99th Percentile"
"95th Percentile"
],
"prefix": "All except:",
"readOnly": true
@@ -1009,6 +1009,7 @@
"options": {
"mode": "exclude",
"names": [
"Last Week",
"Today",
"Last Month"
],
@@ -1179,7 +1180,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -1268,7 +1270,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
}
]
}
@@ -1408,7 +1411,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
}
]
}
@@ -1422,7 +1426,6 @@
"y": 40
},
"id": 12,
"maxDataPoints": 10,
"options": {
"legend": {
"calcs": [],
@@ -1444,11 +1447,11 @@
},
"disableTextWrap": false,
"editorMode": "code",
"expr": "(sum by(apexDomain) (count_over_time(tiles_tile_request_invocation{protocol='https:'}[1h])) or 0) + (sum by(apexDomain) (count_over_time(tiles_cdn_hit_count{request_type=\"tile\", protocol='https:'}[1h]))) > 1000",
"expr": "((sum by(apexDomain) (count_over_time(tiles_tile_request_invocation{protocol='https:'}[1h])) or 0) + (sum by(apexDomain) (count_over_time(tiles_cdn_hit_count{request_type=\"tile\", protocol='https:'}[1h])))) / 60 / 60 > 0.3",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": false,
"interval": "1h",
"interval": "1m",
"legendFormat": "{{origin}}",
"range": true,
"refId": "A",
@@ -1506,7 +1509,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -1627,6 +1631,6 @@
"timezone": "browser",
"title": "Tileserver",
"uid": "ddu4e1545csg0a",
"version": 7,
"version": 11,
"weekStart": ""
}