Skip to content

Commit

Permalink
docs: include Grafana dashboards using Sourcify logs (#212)
Browse files Browse the repository at this point in the history
Signed-off-by: Luis Mastrangelo <[email protected]>
  • Loading branch information
acuarica authored Jun 27, 2024
1 parent 43dbd8f commit 5988a3f
Show file tree
Hide file tree
Showing 3 changed files with 1,338 additions and 0 deletions.
337 changes: 337 additions & 0 deletions charts/dashboards/Hedera-Sourcify-Logs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,337 @@
{
"__inputs": [
{
"name": "DS_GRAFANACLOUD-SWIRLDSLABSPRODUCTION-LOGS",
"label": "grafanacloud-swirldslabsproduction-logs",
"description": "",
"type": "datasource",
"pluginId": "loki",
"pluginName": "Loki"
}
],
"__elements": {},
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "11.2.0-72343"
},
{
"type": "panel",
"id": "logs",
"name": "Logs",
"version": ""
},
{
"type": "datasource",
"id": "loki",
"name": "Loki",
"version": "1.0.0"
},
{
"type": "panel",
"id": "timeseries",
"name": "Time series",
"version": ""
}
],
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": null,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "loki",
"uid": "${DS_GRAFANACLOUD-SWIRLDSLABSPRODUCTION-LOGS}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"links": [],
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "warn"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "#FF780A",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "error"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "#E02F44",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "info"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "#56A64B",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "debug"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "#3274D9",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byType",
"options": "time"
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "auto"
}
]
}
]
},
"gridPos": {
"h": 11,
"w": 24,
"x": 0,
"y": 0
},
"id": 31,
"options": {
"legend": {
"calcs": [
"count",
"mean"
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true,
"sortBy": "Name",
"sortDesc": true
},
"tooltip": {
"mode": "multi",
"sort": "none"
}
},
"pluginVersion": "9.4.3",
"targets": [
{
"datasource": {
"type": "loki",
"uid": "${DS_GRAFANACLOUD-SWIRLDSLABSPRODUCTION-LOGS}"
},
"editorMode": "code",
"expr": "count_over_time({namespace=\"sourcify\"} != `GET /select-contract/health HTTP/1.1` | drop filename,node_name,pod,namespace,job |= \"$filter\" |= `` [1m])",
"queryType": "range",
"refId": "A"
}
],
"title": "Log Rate",
"type": "timeseries"
},
{
"datasource": {
"type": "loki",
"uid": "${DS_GRAFANACLOUD-SWIRLDSLABSPRODUCTION-LOGS}"
},
"gridPos": {
"h": 24,
"w": 24,
"x": 0,
"y": 11
},
"id": 29,
"maxDataPoints": "",
"options": {
"dedupStrategy": "none",
"enableLogDetails": true,
"prettifyLogMessage": false,
"showCommonLabels": false,
"showLabels": false,
"showTime": true,
"sortOrder": "Descending",
"wrapLogMessage": true
},
"targets": [
{
"datasource": {
"type": "loki",
"uid": "${DS_GRAFANACLOUD-SWIRLDSLABSPRODUCTION-LOGS}"
},
"editorMode": "code",
"expr": "{namespace=\"sourcify\"} != `GET /select-contract/health HTTP/1.1` | drop filename, node_name, pod, namespace, job |= `$filter`",
"queryType": "range",
"refId": "A"
}
],
"title": "Logs",
"type": "logs"
}
],
"refresh": "",
"revision": 1,
"schemaVersion": 39,
"tags": [],
"templating": {
"list": [
{
"current": {
"selected": false,
"text": "",
"value": ""
},
"hide": 0,
"label": "LogQL Filter",
"name": "filter",
"options": [],
"query": "",
"skipUrlSync": false,
"type": "textbox"
}
]
},
"time": {
"from": "now-3h",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "utc",
"title": "Hedera Sourcify Logs",
"uid": "cspXkJRSz",
"version": 10,
"weekStart": ""
}
Loading

0 comments on commit 5988a3f

Please sign in to comment.