Difference between revisions of "Grafana Dashboard Generic Loki"
Jump to navigation
Jump to search
(Created page with "``` { "annotations": { "list": [ { "builtIn": 1, "datasource": "-- Grafana --", "enable": true, "hide": true, "iconColor":...") |
|||
Line 15: | Line 15: | ||
}, | }, | ||
"editable": true, | "editable": true, | ||
− | " | + | "fiscalYearStartMonth": 0, |
"graphTooltip": 0, | "graphTooltip": 0, | ||
− | "id": | + | "id": 365, |
"links": [], | "links": [], | ||
"panels": [ | "panels": [ | ||
Line 24: | Line 24: | ||
"type": "loki", | "type": "loki", | ||
"uid": "${datasource}" | "uid": "${datasource}" | ||
+ | }, | ||
+ | "fieldConfig": { | ||
+ | "defaults": {}, | ||
+ | "overrides": [] | ||
}, | }, | ||
"gridPos": { | "gridPos": { | ||
Line 33: | Line 37: | ||
"id": 2, | "id": 2, | ||
"options": { | "options": { | ||
+ | "dedupStrategy": "none", | ||
+ | "enableInfiniteScrolling": false, | ||
"enableLogDetails": true, | "enableLogDetails": true, | ||
"prettifyLogMessage": false, | "prettifyLogMessage": false, | ||
+ | "showCommonLabels": false, | ||
"showLabels": true, | "showLabels": true, | ||
"showTime": true, | "showTime": true, | ||
+ | "sortOrder": "Descending", | ||
"wrapLogMessage": true | "wrapLogMessage": true | ||
}, | }, | ||
+ | "pluginVersion": "11.6.1", | ||
"targets": [ | "targets": [ | ||
{ | { | ||
Line 59: | Line 68: | ||
"fieldConfig": { | "fieldConfig": { | ||
"defaults": { | "defaults": { | ||
+ | "color": { | ||
+ | "mode": "palette-classic" | ||
+ | }, | ||
"custom": { | "custom": { | ||
+ | "axisBorderShow": false, | ||
"axisCenteredZero": false, | "axisCenteredZero": false, | ||
"axisColorMode": "text", | "axisColorMode": "text", | ||
"axisLabel": "", | "axisLabel": "", | ||
"axisPlacement": "auto", | "axisPlacement": "auto", | ||
− | |||
− | |||
"barAlignment": 0, | "barAlignment": 0, | ||
+ | "barWidthFactor": 0.6, | ||
"drawStyle": "line", | "drawStyle": "line", | ||
− | |||
"fillOpacity": 10, | "fillOpacity": 10, | ||
+ | "gradientMode": "none", | ||
"hideFrom": { | "hideFrom": { | ||
"legend": false, | "legend": false, | ||
Line 75: | Line 87: | ||
"viz": false | "viz": false | ||
}, | }, | ||
+ | "insertNulls": false, | ||
"lineInterpolation": "linear", | "lineInterpolation": "linear", | ||
"lineWidth": 1, | "lineWidth": 1, | ||
Line 92: | Line 105: | ||
}, | }, | ||
"mappings": [], | "mappings": [], | ||
− | " | + | "thresholds": { |
− | "mode": " | + | "mode": "absolute", |
+ | "steps": [ | ||
+ | { | ||
+ | "color": "green" | ||
+ | }, | ||
+ | { | ||
+ | "color": "red", | ||
+ | "value": 80 | ||
+ | } | ||
+ | ] | ||
}, | }, | ||
"unit": "logunit" | "unit": "logunit" | ||
Line 114: | Line 136: | ||
}, | }, | ||
"tooltip": { | "tooltip": { | ||
+ | "hideZeros": false, | ||
"mode": "single", | "mode": "single", | ||
"sort": "none" | "sort": "none" | ||
} | } | ||
}, | }, | ||
+ | "pluginVersion": "11.6.1", | ||
"targets": [ | "targets": [ | ||
{ | { | ||
Line 132: | Line 156: | ||
} | } | ||
], | ], | ||
− | " | + | "preload": false, |
− | " | + | "refresh": "", |
+ | "schemaVersion": 41, | ||
"tags": [ | "tags": [ | ||
"loki", | "loki", | ||
Line 143: | Line 168: | ||
{ | { | ||
"current": { | "current": { | ||
− | + | "text": "sumo-archive-11fceb17-106c-4202-935f-c90606387600", | |
− | "text": " | + | "value": "eer1smtcgrnk0f" |
− | "value": " | ||
}, | }, | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
"includeAll": true, | "includeAll": true, | ||
"label": "Datasource", | "label": "Datasource", | ||
− | |||
"name": "datasource", | "name": "datasource", | ||
+ | "options": [], | ||
"query": "loki", | "query": "loki", | ||
− | "refresh": | + | "refresh": 0, |
"regex": "", | "regex": "", | ||
− | |||
"type": "datasource" | "type": "datasource" | ||
}, | }, | ||
{ | { | ||
"current": { | "current": { | ||
− | |||
"text": "All", | "text": "All", | ||
"value": [ | "value": [ | ||
Line 176: | Line 192: | ||
}, | }, | ||
"definition": "label_values(job)", | "definition": "label_values(job)", | ||
− | |||
− | |||
"includeAll": true, | "includeAll": true, | ||
"label": "Job", | "label": "Job", | ||
"multi": true, | "multi": true, | ||
"name": "job", | "name": "job", | ||
+ | "options": [], | ||
"query": "label_values(job)", | "query": "label_values(job)", | ||
− | "refresh": | + | "refresh": 0, |
"regex": "", | "regex": "", | ||
− | |||
− | |||
"type": "query" | "type": "query" | ||
}, | }, | ||
{ | { | ||
"current": { | "current": { | ||
− | |||
"text": "All", | "text": "All", | ||
− | "value": | + | "value": "$__all" |
− | |||
− | |||
}, | }, | ||
"datasource": { | "datasource": { | ||
Line 202: | Line 212: | ||
}, | }, | ||
"definition": "label_values({job=~\"$job\"}, namespace)", | "definition": "label_values({job=~\"$job\"}, namespace)", | ||
− | |||
− | |||
"includeAll": true, | "includeAll": true, | ||
"label": "Namespace", | "label": "Namespace", | ||
"multi": true, | "multi": true, | ||
"name": "namespace", | "name": "namespace", | ||
+ | "options": [], | ||
"query": "label_values({job=~\"$job\"}, namespace)", | "query": "label_values({job=~\"$job\"}, namespace)", | ||
− | "refresh": | + | "refresh": 0, |
"regex": "", | "regex": "", | ||
− | |||
− | |||
"type": "query" | "type": "query" | ||
}, | }, | ||
{ | { | ||
"current": { | "current": { | ||
− | |||
"text": "All", | "text": "All", | ||
− | "value": | + | "value": "$__all" |
− | |||
− | |||
}, | }, | ||
"datasource": { | "datasource": { | ||
Line 228: | Line 232: | ||
}, | }, | ||
"definition": "label_values({job=~\"$job\", namespace=~\"$namespace\"}, level)", | "definition": "label_values({job=~\"$job\", namespace=~\"$namespace\"}, level)", | ||
− | |||
− | |||
"includeAll": true, | "includeAll": true, | ||
"label": "Level", | "label": "Level", | ||
"multi": true, | "multi": true, | ||
"name": "level", | "name": "level", | ||
+ | "options": [], | ||
"query": "label_values({job=~\"$job\", namespace=~\"$namespace\"}, level)", | "query": "label_values({job=~\"$job\", namespace=~\"$namespace\"}, level)", | ||
− | "refresh": | + | "refresh": 0, |
"regex": "", | "regex": "", | ||
− | |||
− | |||
"type": "query" | "type": "query" | ||
}, | }, | ||
{ | { | ||
"current": { | "current": { | ||
− | |||
"text": "", | "text": "", | ||
"value": "" | "value": "" | ||
}, | }, | ||
"description": "Enter text to search in log lines", | "description": "Enter text to search in log lines", | ||
− | |||
"label": "Filter Text", | "label": "Filter Text", | ||
"name": "filter", | "name": "filter", | ||
+ | "options": [ | ||
+ | { | ||
+ | "selected": true, | ||
+ | "text": "", | ||
+ | "value": "" | ||
+ | } | ||
+ | ], | ||
"query": "", | "query": "", | ||
− | |||
"type": "textbox" | "type": "textbox" | ||
} | } | ||
Line 261: | Line 266: | ||
"to": "now" | "to": "now" | ||
}, | }, | ||
− | "timepicker": { | + | "timepicker": {}, |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
"timezone": "", | "timezone": "", | ||
− | "title": "Generic Loki Log Search", | + | "title": "Generic Loki Log Search Sumo", |
− | "uid": "generic-loki-dashboard", | + | "uid": "generic-loki-dashboard-sumo", |
"version": 1 | "version": 1 | ||
} | } | ||
``` | ``` |
Latest revision as of 21:56, 9 July 2025
{ "annotations": { "list": [ { "builtIn": 1, "datasource": "-- Grafana --", "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "type": "dashboard" } ] }, "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": 365, "links": [], "panels": [ { "datasource": { "type": "loki", "uid": "${datasource}" }, "fieldConfig": { "defaults": {}, "overrides": [] }, "gridPos": { "h": 12, "w": 24, "x": 0, "y": 0 }, "id": 2, "options": { "dedupStrategy": "none", "enableInfiniteScrolling": false, "enableLogDetails": true, "prettifyLogMessage": false, "showCommonLabels": false, "showLabels": true, "showTime": true, "sortOrder": "Descending", "wrapLogMessage": true }, "pluginVersion": "11.6.1", "targets": [ { "datasource": { "type": "loki", "uid": "${datasource}" }, "expr": "{job=~\"$job\", namespace=~\"$namespace\", level=~\"$level\"} |= \"$filter\"", "refId": "A" } ], "title": "Loki Logs", "type": "logs" }, { "datasource": { "type": "loki", "uid": "${datasource}" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "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": 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" }, { "color": "red", "value": 80 } ] }, "unit": "logunit" }, "overrides": [] }, "gridPos": { "h": 7, "w": 24, "x": 0, "y": 12 }, "id": 4, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "hideZeros": false, "mode": "single", "sort": "none" } }, "pluginVersion": "11.6.1", "targets": [ { "datasource": { "type": "loki", "uid": "${datasource}" }, "expr": "sum by(level) (rate({job=~\"$job\", namespace=~\"$namespace\", level=~\"$level\"} |~ \"$filter\" [$__interval]))", "refId": "A" } ], "title": "Log Rate by Level", "type": "timeseries" } ], "preload": false, "refresh": "", "schemaVersion": 41, "tags": [ "loki", "logs", "generic" ], "templating": { "list": [ { "current": { "text": "sumo-archive-11fceb17-106c-4202-935f-c90606387600", "value": "eer1smtcgrnk0f" }, "includeAll": true, "label": "Datasource", "name": "datasource", "options": [], "query": "loki", "refresh": 0, "regex": "", "type": "datasource" }, { "current": { "text": "All", "value": [ "$__all" ] }, "datasource": { "type": "loki", "uid": "${datasource}" }, "definition": "label_values(job)", "includeAll": true, "label": "Job", "multi": true, "name": "job", "options": [], "query": "label_values(job)", "refresh": 0, "regex": "", "type": "query" }, { "current": { "text": "All", "value": "$__all" }, "datasource": { "type": "loki", "uid": "${datasource}" }, "definition": "label_values({job=~\"$job\"}, namespace)", "includeAll": true, "label": "Namespace", "multi": true, "name": "namespace", "options": [], "query": "label_values({job=~\"$job\"}, namespace)", "refresh": 0, "regex": "", "type": "query" }, { "current": { "text": "All", "value": "$__all" }, "datasource": { "type": "loki", "uid": "${datasource}" }, "definition": "label_values({job=~\"$job\", namespace=~\"$namespace\"}, level)", "includeAll": true, "label": "Level", "multi": true, "name": "level", "options": [], "query": "label_values({job=~\"$job\", namespace=~\"$namespace\"}, level)", "refresh": 0, "regex": "", "type": "query" }, { "current": { "text": "", "value": "" }, "description": "Enter text to search in log lines", "label": "Filter Text", "name": "filter", "options": [ { "selected": true, "text": "", "value": "" } ], "query": "", "type": "textbox" } ] }, "time": { "from": "now-1h", "to": "now" }, "timepicker": {}, "timezone": "", "title": "Generic Loki Log Search Sumo", "uid": "generic-loki-dashboard-sumo", "version": 1 }