Skip to content

Commit

Permalink
feat: add alert
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Mar 5, 2025
1 parent 324d448 commit 41a1e5f
Show file tree
Hide file tree
Showing 5 changed files with 429 additions and 23 deletions.
1 change: 1 addition & 0 deletions fault_proof/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ services:
volumes:
- ./grafana/provisioning:/etc/grafana/provisioning
- ./grafana/dashboards:/var/lib/grafana/dashboards
- ./grafana/alerts:/var/lib/grafana/alerts
- /home/op_succinct_lite_grafana_data:/var/lib/grafana
user: root
environment:
Expand Down
159 changes: 159 additions & 0 deletions fault_proof/grafana/alerts/proposer-alert.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
{
"apiVersion": 1,
"groups": [
{
"orgId": 1,
"name": "Proposer",
"folder": "Alerts",
"interval": "10s",
"rules": [
{
"uid": "ceet01897tiwwa",
"title": "Game Not Created",
"condition": "E",
"data": [
{
"refId": "A",
"relativeTimeRange": {
"from": 600,
"to": 0
},
"datasourceUid": "PBFA97CFB590B2093",
"model": {
"disableTextWrap": false,
"editorMode": "builder",
"expr": "op_succinct_fp_finalized_l2_block_number",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": true,
"interval": "",
"intervalMs": 1000,
"legendFormat": "__auto",
"maxDataPoints": 43200,
"range": false,
"refId": "A",
"useBackend": false
}
},
{
"refId": "B",
"relativeTimeRange": {
"from": 600,
"to": 0
},
"datasourceUid": "PBFA97CFB590B2093",
"model": {
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "op_succinct_fp_latest_game_l2_block_number",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": true,
"intervalMs": 1000,
"legendFormat": "__auto",
"maxDataPoints": 43200,
"range": false,
"refId": "B",
"useBackend": false
}
},
{
"refId": "C",
"relativeTimeRange": {
"from": 0,
"to": 0
},
"datasourceUid": "__expr__",
"model": {
"conditions": [
{
"evaluator": {
"params": [
0,
0
],
"type": "gt"
},
"operator": {
"type": "and"
},
"query": {
"params": []
},
"reducer": {
"params": [],
"type": "avg"
},
"type": "query"
}
],
"datasource": {
"name": "Expression",
"type": "__expr__",
"uid": "__expr__"
},
"expression": "$A - $B",
"intervalMs": 1000,
"maxDataPoints": 43200,
"refId": "C",
"type": "math"
}
},
{
"refId": "E",
"relativeTimeRange": {
"from": 0,
"to": 0
},
"datasourceUid": "__expr__",
"model": {
"conditions": [
{
"evaluator": {
"params": [
3600,
0
],
"type": "gt"
},
"operator": {
"type": "and"
},
"query": {
"params": []
},
"reducer": {
"params": [],
"type": "avg"
},
"type": "query"
}
],
"datasource": {
"name": "Expression",
"type": "__expr__",
"uid": "__expr__"
},
"expression": "C",
"intervalMs": 1000,
"maxDataPoints": 43200,
"refId": "E",
"type": "threshold"
}
}
],
"noDataState": "NoData",
"execErrState": "Error",
"isPaused": false,
"notification_settings": {
"receiver": "grafana-default-email"
}
}
]
}
]
}
198 changes: 196 additions & 2 deletions fault_proof/grafana/dashboards/proposer-dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,40 @@
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
Expand All @@ -38,6 +71,10 @@
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
Expand All @@ -50,6 +87,163 @@
"x": 0,
"y": 0
},
"id": 3,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.5.2",
"targets": [
{
"disableTextWrap": false,
"editorMode": "builder",
"expr": "op_succinct_fp_finalized_l2_block_number",
"fullMetaSearch": false,
"includeNullMetadata": true,
"legendFormat": "__auto",
"range": true,
"refId": "A",
"useBackend": false
}
],
"title": "Finalized L2 Block Number",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 4,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.5.2",
"targets": [
{
"disableTextWrap": false,
"editorMode": "builder",
"expr": "op_succinct_fp_latest_game_l2_block_number",
"fullMetaSearch": false,
"includeNullMetadata": true,
"legendFormat": "__auto",
"range": true,
"refId": "A",
"useBackend": false
}
],
"title": "Latest Game L2 Block Number",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 2,
"options": {
"colorMode": "value",
Expand Down Expand Up @@ -98,6 +292,6 @@
"timezone": "",
"title": "Proposer Dashboard",
"uid": "proposer-dashboard",
"version": 2,
"version": 7,
"weekStart": ""
}
Loading

0 comments on commit 41a1e5f

Please sign in to comment.