Files
marunandzeekay 8c2948e30e Add datasource variables to all dashboards (#21)
To enable use with grafana cloud and ensure automatic configuration of
the log dashboard, add datasource variables and use the variables as
the uid of all panel datasource declarations.

 - `${datasource}` for prometheus datasources
 - `${loki_datasource}` for loki datasources
2025-07-18 22:22:06 -05:00

230 lines
4.6 KiB
JSON

{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"description": "Loki dashboard with quick search and timeline.",
"editable": true,
"fiscalYearStartMonth": 0,
"gnetId": 13186,
"graphTooltip": 0,
"id": 12,
"links": [
{
"asDropdown": false,
"icon": "external link",
"includeVars": true,
"keepTime": true,
"tags": [
"Lux"
],
"targetBlank": false,
"title": "",
"tooltip": "",
"type": "dashboards",
"url": ""
}
],
"panels": [
{
"aliasColors": {},
"bars": true,
"dashLength": 10,
"dashes": false,
"datasource": {
"type": "loki",
"uid": "${loki_datasource}"
},
"fieldConfig": {
"defaults": {
"links": []
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 3,
"w": 24,
"x": 0,
"y": 0
},
"hiddenSeries": false,
"id": 6,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": false,
"total": false,
"values": false
},
"lines": false,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "10.4.0",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"datasource": {
"type": "loki",
"uid": "${loki_datasource}"
},
"editorMode": "code",
"expr": "sum(count_over_time({network_uuid=~\".+\"} |~ \"$search\"[$__interval]))",
"queryType": "range",
"refId": "A"
}
],
"thresholds": [],
"timeRegions": [],
"title": "Timeline",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"mode": "time",
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"logBase": 1,
"show": false
},
{
"format": "short",
"logBase": 1,
"show": false
}
],
"yaxis": {
"align": false
}
},
{
"datasource": {
"type": "loki",
"uid": "${loki_datasource}"
},
"gridPos": {
"h": 25,
"w": 24,
"x": 0,
"y": 3
},
"id": 2,
"maxDataPoints": "",
"options": {
"dedupStrategy": "none",
"enableLogDetails": true,
"prettifyLogMessage": false,
"showCommonLabels": false,
"showLabels": true,
"showTime": true,
"sortOrder": "Descending",
"wrapLogMessage": true
},
"targets": [
{
"datasource": {
"type": "loki",
"uid": "${loki_datasource}"
},
"editorMode": "code",
"expr": "{network_uuid=~\".+\"} |~ \"$search\"",
"queryType": "range",
"refId": "A"
}
],
"title": "Logs",
"type": "logs"
}
],
"schemaVersion": 39,
"tags": [
"Lux"
],
"templating": {
"list": [
{
"hide": 0,
"includeAll": false,
"label": "Data Source",
"multi": false,
"name": "loki_datasource",
"options": [],
"query": "loki",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
},
{
"hide": 0,
"name": "search",
"query": "",
"skipUrlSync": false,
"type": "textbox"
},
{
"datasource": {
"type": "loki",
"uid": "${loki_datasource}"
},
"filters": [],
"hide": 0,
"label": "Filter",
"name": "filter",
"skipUrlSync": false,
"type": "adhoc"
}
]
},
"timepicker": {
"refresh_intervals": [
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
]
},
"timezone": "",
"title": "Logs",
"uid": "liz0yRCZz",
"version": 6,
"weekStart": ""
}