Loki: Add devenv dashboard (#57519)

* Add loki devenv dashboard

* remove dashboard auto refresh

* set time range to 5m for timeseries graph

* add adhoc filters

* override with new export

* Chore: run stripnulls script

Co-authored-by: Matias Chomicki <matyax@gmail.com>
This commit is contained in:
Gareth Dawson 2022-10-27 12:07:20 +01:00 committed by GitHub
parent 279ac50d59
commit 8b44ca1b0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,430 @@
{
"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": 203,
"links": [],
"liveNow": false,
"panels": [
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"id": 7,
"panels": [],
"title": "Logs",
"type": "row"
},
{
"datasource": {
"type": "loki",
"uid": "PDDA8E780A17E7EF1"
},
"gridPos": {
"h": 9,
"w": 12,
"x": 0,
"y": 1
},
"id": 2,
"options": {
"dedupStrategy": "none",
"enableLogDetails": true,
"prettifyLogMessage": false,
"showCommonLabels": false,
"showLabels": false,
"showTime": true,
"sortOrder": "Descending",
"wrapLogMessage": false
},
"targets": [
{
"datasource": {
"type": "loki",
"uid": "PDDA8E780A17E7EF1"
},
"editorMode": "builder",
"expr": "{place=\"$place\"} |= ``",
"maxLines": 60,
"queryType": "range",
"refId": "A"
}
],
"title": "(Variable) $place logs",
"type": "logs"
},
{
"datasource": {
"type": "loki",
"uid": "PDDA8E780A17E7EF1"
},
"gridPos": {
"h": 9,
"w": 12,
"x": 12,
"y": 1
},
"id": 3,
"options": {
"dedupStrategy": "none",
"enableLogDetails": true,
"prettifyLogMessage": false,
"showCommonLabels": false,
"showLabels": false,
"showTime": true,
"sortOrder": "Descending",
"wrapLogMessage": false
},
"targets": [
{
"datasource": {
"type": "loki",
"uid": "PDDA8E780A17E7EF1"
},
"editorMode": "builder",
"expr": "{place=\"$place\"} |= `error`",
"maxLines": 60,
"queryType": "range",
"refId": "A"
}
],
"title": "(Variable) $place errors",
"type": "logs"
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 10
},
"id": 9,
"panels": [],
"title": "Time Series",
"type": "row"
},
{
"datasource": {
"type": "loki",
"uid": "PDDA8E780A17E7EF1"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineStyle": {
"fill": "solid"
},
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 24,
"x": 0,
"y": 11
},
"id": 4,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.3.0-pre",
"targets": [
{
"datasource": {
"type": "loki",
"uid": "PDDA8E780A17E7EF1"
},
"editorMode": "builder",
"expr": "count_over_time({place=\"$place\"} [5m])",
"legendFormat": "{{place}}",
"maxLines": 60,
"queryType": "range",
"refId": "A"
}
],
"title": "(Variable) No. of $place logs over the last 5m",
"type": "timeseries"
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 17
},
"id": 11,
"panels": [],
"title": "Stats",
"type": "row"
},
{
"datasource": {
"type": "loki",
"uid": "PDDA8E780A17E7EF1"
},
"fieldConfig": {
"defaults": {
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 12,
"x": 0,
"y": 18
},
"id": 20,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "9.3.0-pre",
"targets": [
{
"datasource": {
"type": "loki",
"uid": "PDDA8E780A17E7EF1"
},
"editorMode": "code",
"expr": "count_over_time({place=\"moon\"} [5m])",
"legendFormat": "{{place}}",
"queryType": "range",
"refId": "A"
}
],
"title": "Moon Log count over 5m",
"type": "stat"
},
{
"datasource": {
"type": "loki",
"uid": "PDDA8E780A17E7EF1"
},
"fieldConfig": {
"defaults": {
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 12,
"x": 12,
"y": 18
},
"id": 19,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "9.3.0-pre",
"targets": [
{
"datasource": {
"type": "loki",
"uid": "PDDA8E780A17E7EF1"
},
"editorMode": "code",
"expr": "count_over_time({place=\"luna\"} [5m])",
"legendFormat": "{{place}}",
"queryType": "range",
"refId": "A"
}
],
"title": "Luna Log count over 5m",
"type": "stat"
}
],
"refresh": "",
"schemaVersion": 37,
"style": "dark",
"tags": [
"gdev",
"loki",
"datasource-test"
],
"templating": {
"list": [
{
"current": {
"selected": false,
"text": "luna",
"value": "luna"
},
"datasource": {
"type": "loki",
"uid": "PDDA8E780A17E7EF1"
},
"definition": "",
"hide": 0,
"includeAll": false,
"label": "Place",
"multi": false,
"name": "place",
"options": [],
"query": {
"label": "place",
"refId": "LokiVariableQueryEditor-VariableQuery",
"stream": "",
"type": 1
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"datasource": {
"type": "loki",
"uid": "PDDA8E780A17E7EF1"
},
"filters": [],
"hide": 0,
"label": "Ad-hoc",
"name": "adhoc",
"skipUrlSync": false,
"type": "adhoc"
}
]
},
"time": {
"from": "now-5m",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Datasource tests - Loki",
"uid": "22mq9eSVz",
"version": 1,
"weekStart": ""
}