{ "annotations": { "list": [ { "builtIn": 1, "datasource": {"type": "grafana", "uid": "-- Grafana --"}, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "type": "dashboard" } ] }, "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": null, "links": [], "liveNow": false, "panels": [ { "datasource": {"type": "loki", "uid": "loki"}, "fieldConfig": { "defaults": { "color": {"mode": "thresholds"}, "mappings": [], "thresholds": { "mode": "absolute", "steps": [{"color": "blue", "value": null}] }, "unit": "short" }, "overrides": [] }, "gridPos": {"h": 5, "w": 8, "x": 0, "y": 0}, "id": 1, "options": { "colorMode": "value", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "textMode": "auto" }, "targets": [ { "datasource": {"type": "loki", "uid": "loki"}, "editorMode": "code", "expr": "sum(count_over_time({namespace=\"onelab\", component=~\"$component\"} |~ \"$filter\" [$__range]))", "queryType": "instant", "refId": "A" } ], "title": "Total lines (namespace onelab, matches line filter)", "type": "stat" }, { "datasource": {"type": "loki", "uid": "loki"}, "fieldConfig": { "defaults": { "color": {"mode": "thresholds"}, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ {"color": "green", "value": null}, {"color": "orange", "value": 1} ] }, "unit": "short" }, "overrides": [] }, "gridPos": {"h": 5, "w": 8, "x": 8, "y": 0}, "id": 2, "options": { "colorMode": "value", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "textMode": "auto" }, "targets": [ { "datasource": {"type": "loki", "uid": "loki"}, "editorMode": "code", "expr": "sum(count_over_time({namespace=\"onelab\", component=~\"$component\"} |~ \"$filter\" |~ \"(?i)(\\\\[ERROR\\\\]|\\\\berror\\\\b|\\\\sERROR\\\\s)\" [$__range]))", "queryType": "instant", "refId": "A" } ], "title": "~ Error-like lines (heuristic)", "type": "stat" }, { "datasource": {"type": "loki", "uid": "loki"}, "fieldConfig": { "defaults": { "color": {"mode": "thresholds"}, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ {"color": "green", "value": null}, {"color": "yellow", "value": 1} ] }, "unit": "short" }, "overrides": [] }, "gridPos": {"h": 5, "w": 8, "x": 16, "y": 0}, "id": 3, "options": { "colorMode": "value", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "textMode": "auto" }, "targets": [ { "datasource": {"type": "loki", "uid": "loki"}, "editorMode": "code", "expr": "sum(count_over_time({namespace=\"onelab\", component=~\"$component\"} |~ \"$filter\" |~ \"(?i)(\\\\[WARN\\\\]|\\\\bwarn(ing)?\\\\b|\\\\sWARN\\\\s)\" [$__range]))", "queryType": "instant", "refId": "A" } ], "title": "~ Warning-like lines (heuristic)", "type": "stat" }, { "datasource": {"type": "loki", "uid": "loki"}, "gridPos": {"h": 16, "w": 24, "x": 0, "y": 5}, "id": 4, "options": { "dedupStrategy": "none", "enableLogDetails": true, "prettifyLogMessage": false, "showCommonLabels": false, "showLabels": true, "showTime": true, "sortOrder": "Descending", "wrapLogMessage": true }, "targets": [ { "datasource": {"type": "loki", "uid": "loki"}, "editorMode": "code", "expr": "{namespace=\"onelab\", component=~\"$component\"} |~ \"$filter\"", "queryType": "range", "refId": "A" } ], "title": "OneLab logs — use Component + Line filter (regex)", "type": "logs" } ], "refresh": "30s", "schemaVersion": 39, "tags": ["onelab", "loki"], "templating": { "list": [ { "allValue": ".*", "current": {"selected": true, "text": "All", "value": "$__all"}, "datasource": {"type": "loki", "uid": "loki"}, "definition": "label_values({namespace=\"onelab\"}, component)", "hide": 0, "includeAll": true, "label": "Component", "multi": true, "name": "component", "options": [], "query": "label_values({namespace=\"onelab\"}, component)", "refresh": 2, "regex": "", "sort": 1, "type": "query" }, { "current": {"selected": true, "text": ".*", "value": ".*"}, "hide": 0, "label": "Line filter (regex)", "name": "filter", "options": [ {"selected": true, "text": ".*", "value": ".*"} ], "query": ".*", "type": "textbox" } ] }, "time": {"from": "now-1h", "to": "now"}, "timepicker": {}, "timezone": "browser", "title": "OneLab logs", "uid": "onelab-logs", "version": 1, "weekStart": "" }