Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 124 additions & 0 deletions grafana/alerts/demeter/kupo.json
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,130 @@
"notification_settings": {
"receiver": "#infra-alerts"
}
},
{
"uid": "bkl0kupockpstale",
"title": "Kupo checkpoint is stale",
"condition": "C",
"for": "10m",
"data": [
{
"refId": "A",
"relativeTimeRange": {
"from": 900,
"to": 0
},
"datasourceUid": "${datasource_uid_map.gke_blinklabs-demeter_us-central1_dmtr-cluster-prometheus}",
"model": {
"datasource": {
"type": "prometheus",
"uid": "${datasource_uid_map.gke_blinklabs-demeter_us-central1_dmtr-cluster-prometheus}"
},
"editorMode": "code",
"expr": "changes(kupo_most_recent_checkpoint[15m]) and on (pod) (kupo_connection_status == 1)",
"instant": true,
"intervalMs": 1000,
"legendFormat": "__auto",
"maxDataPoints": 43200,
"range": false,
"refId": "A"
}
},
{
"refId": "B",
"relativeTimeRange": {
"from": 0,
"to": 0
},
"datasourceUid": "__expr__",
"model": {
"conditions": [
{
"evaluator": {
"params": [
0,
0
],
"type": "gt"
},
"operator": {
"type": "and"
},
"query": {
"params": []
},
"reducer": {
"params": [],
"type": "last"
},
"type": "query"
}
],
"datasource": {
"name": "Expression",
"type": "__expr__",
"uid": "__expr__"
},
"expression": "A",
"hide": false,
"reducer": "last",
"refId": "B",
"type": "reduce"
}
},
{
"refId": "C",
"relativeTimeRange": {
"from": 0,
"to": 0
},
"datasourceUid": "__expr__",
"model": {
"conditions": [
{
"evaluator": {
"params": [
1,
0
],
"type": "lt"
},
"operator": {
"type": "and"
},
"query": {
"params": []
},
"reducer": {
"params": [],
"type": "avg"
},
"type": "query"
}
],
"datasource": {
"name": "Expression",
"type": "__expr__",
"uid": "__expr__"
},
"expression": "B",
"hide": false,
"refId": "C",
"type": "threshold"
}
}
],
"noDataState": "OK",
"execErrState": "KeepLast",
"annotations": {
"description": "A Kupo instance is connected to its node backend but its most recent checkpoint (kupo_most_recent_checkpoint) has not advanced for at least 15 minutes, meaning it is serving a stale index to clients. This usually indicates a wedged chain-sync session that a pod restart will clear.",
"summary": "{{ range $k, $v := $values -}}\n{{ if (match \"C[0-9]+\" $k) -}}\nPod: {{ $v.Labels.pod }} checkpoint is not advancing\n{{ end }}\n{{ end }}"
},
"labels": {},
"isPaused": false,
"notification_settings": {
"receiver": "#infra-alerts"
}
}
]
}
Expand Down
103 changes: 103 additions & 0 deletions grafana/dashboards/shared/kupo.json
Original file line number Diff line number Diff line change
Expand Up @@ -1129,6 +1129,109 @@
],
"title": "Container Restarts",
"type": "state-timeline"
},
{
"datasource": {
"type": "prometheus",
"uid": "$datasource"
},
"description": "Number of times each Kupo instance's most recent checkpoint (kupo_most_recent_checkpoint) advanced in the last 15 minutes. A healthy, synced instance advances continuously; a value of 0 means the checkpoint is frozen (wedged chain-sync) and the pod is serving a stale index. This is the signal behind the \"Kupo checkpoint is stale\" alert.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "checkpoint changes / 15m",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 2,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": 0
},
{
"color": "green",
"value": 1
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 24,
"x": 0,
"y": 50
},
"id": 30,
"options": {
"legend": {
"calcs": [
"lastNotNull",
"min"
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "multi",
"sort": "asc"
}
},
"pluginVersion": "13.1.0-25668120414",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "$datasource"
},
"editorMode": "code",
"expr": "changes(kupo_most_recent_checkpoint{pod=~\".*$pod.*\"}[15m]) and on (pod) (kupo_connection_status{pod=~\".*$pod.*\"} == 1)",
"legendFormat": "{{pod}}",
"range": true,
"refId": "A"
}
],
"title": "Checkpoint Advancement (changes / 15m)",
"type": "timeseries"
}
],
"title": "Instances",
Expand Down
Loading