From 694c30fb6d9e5d64b42ebf31aa1f9dbf6828e0f9 Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 6 Nov 2025 13:02:58 +0300 Subject: [PATCH] add stage1 --- logs_apps_k8s.json | 582 +++++++++++++++++++++++---------------------- 1 file changed, 293 insertions(+), 289 deletions(-) diff --git a/logs_apps_k8s.json b/logs_apps_k8s.json index c95f377..3dbc91b 100644 --- a/logs_apps_k8s.json +++ b/logs_apps_k8s.json @@ -1,312 +1,316 @@ { - "annotations": { - "list": [ - { - "$$hashKey": "object:75", - "builtIn": 1, - "datasource": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] + "annotations": { + "list": [ + { + "$$hashKey": "object:75", + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "description": "Log Viewer Dashboard for Loki", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 18, + "links": [ + { + "$$hashKey": "object:59", + "icon": "bolt", + "includeVars": true, + "keepTime": true, + "tags": [], + "targetBlank": true, + "title": "View In Explore", + "type": "link", + "url": "/explore?orgId=1&left=[\"now-1h\",\"now\",\"Loki\",{\"expr\":\"{job=\\\"$app\\\"}\"},{\"ui\":[true,true,true,\"none\"]}]" }, - "description": "Log Viewer Dashboard for Loki", - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": 14, - "links": [ - { - "$$hashKey": "object:59", - "icon": "bolt", - "includeVars": true, - "keepTime": true, - "tags": [], - "targetBlank": true, - "title": "View In Explore", - "type": "link", - "url": "/explore?orgId=1&left=[\"now-1h\",\"now\",\"Loki\",{\"expr\":\"{job=\\\"$app\\\"}\"},{\"ui\":[true,true,true,\"none\"]}]" + { + "$$hashKey": "object:61", + "icon": "external link", + "tags": [], + "targetBlank": true, + "title": "Learn LogQL", + "type": "link", + "url": "https://grafana.com/docs/loki/latest/logql/" + } + ], + "panels": [ + { + "datasource": { + "type": "loki", + "uid": "loki" }, - { - "$$hashKey": "object:61", - "icon": "external link", - "tags": [], - "targetBlank": true, - "title": "Learn LogQL", - "type": "link", - "url": "https://grafana.com/docs/loki/latest/logql/" - } - ], - "panels": [ - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "hidden", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "hidden", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "bars", - "fillOpacity": 100, - "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": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + { + "color": "red", + "value": 80 } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" + ] }, - "overrides": [] + "unit": "short" }, - "gridPos": { - "h": 3, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 6, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "11.6.0", - "targets": [ - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "direction": "backward", - "editorMode": "code", - "expr": "sum(count_over_time({job=~\"$env/$app\", cluster=\"$cluster\"} | json | (__error__!=\"JSONParserErr\") |= \"$search\" [$__interval]))", - "legendFormat": "", - "queryType": "range", - "refId": "A" - } - ], - "title": "", - "type": "timeseries" + "overrides": [] }, - { - "datasource": { - "type": "loki", - "uid": "loki" + "gridPos": { + "h": 3, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 6, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false }, - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, - "gridPos": { - "h": 25, - "w": 24, - "x": 0, - "y": 3 - }, - "id": 2, - "maxDataPoints": "", - "options": { - "dedupStrategy": "none", - "enableInfiniteScrolling": false, - "enableLogDetails": true, - "prettifyLogMessage": false, - "showCommonLabels": false, - "showLabels": false, - "showTime": true, - "sortOrder": "Descending", - "wrapLogMessage": false - }, - "pluginVersion": "11.6.0", - "targets": [ - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "direction": "backward", - "editorMode": "code", - "expr": "{job=~\"$env/$app\", cluster=\"$cluster\"} |= \"$search\" | json | (__error__!=\"JSONParserErr\")", - "hide": false, - "legendFormat": "", - "queryType": "range", - "refId": "A" - } - ], - "title": "", - "transparent": true, - "type": "logs" - } - ], - "preload": false, - "refresh": false, - "schemaVersion": 41, - "tags": [], - "templating": { - "list": [ + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "12.1.0", + "targets": [ { - "current": { - "text": "yandex", - "value": "yandex" - }, "datasource": { "type": "loki", "uid": "loki" }, - "definition": "", - "name": "cluster", - "options": [], - "query": { - "label": "cluster", - "refId": "LokiVariableQueryEditor-VariableQuery", - "stream": "", - "type": 1 - }, - "refresh": 1, - "regex": "", - "type": "query" - }, + "direction": "backward", + "editorMode": "code", + "expr": "sum(count_over_time({job=~\"$env/$app\", cluster=\"$cluster\"} | json | (__error__!=\"JSONParserErr\") |= \"$search\" [$__interval]))", + "legendFormat": "", + "queryType": "range", + "refId": "A" + } + ], + "title": "", + "type": "timeseries" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 25, + "w": 24, + "x": 0, + "y": 3 + }, + "id": 2, + "maxDataPoints": "", + "options": { + "dedupStrategy": "none", + "enableInfiniteScrolling": false, + "enableLogDetails": true, + "prettifyLogMessage": false, + "showCommonLabels": false, + "showLabels": false, + "showTime": true, + "sortOrder": "Descending", + "wrapLogMessage": false + }, + "pluginVersion": "12.1.0", + "targets": [ { - "allowCustomValue": false, - "current": { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "direction": "backward", + "editorMode": "code", + "expr": "{job=~\"$env/$app\", cluster=\"$cluster\"} |= \"$search\" | json | (__error__!=\"JSONParserErr\")", + "hide": false, + "legendFormat": "", + "queryType": "range", + "refId": "A" + } + ], + "title": "", + "transparent": true, + "type": "logs" + } + ], + "preload": false, + "refresh": false, + "schemaVersion": 41, + "tags": [], + "templating": { + "list": [ + { + "current": { + "text": "local", + "value": "local" + }, + "datasource": { + "type": "loki", + "uid": "loki" + }, + "definition": "", + "name": "cluster", + "options": [], + "query": { + "label": "cluster", + "refId": "LokiVariableQueryEditor-VariableQuery", + "stream": "", + "type": 1 + }, + "refresh": 1, + "regex": "", + "type": "query" + }, + { + "allowCustomValue": false, + "current": { + "text": "stage1", + "value": "stage1" + }, + "label": "Env", + "name": "env", + "options": [ + { + "selected": false, "text": "prod", "value": "prod" }, - "label": "Env", - "name": "env", - "options": [ - { - "selected": true, - "text": "prod", - "value": "prod" - }, - { - "selected": false, - "text": "stage", - "value": "stage" - } - ], - "query": "prod,stage", - "type": "custom" - }, - { - "allValue": ".*", - "allowCustomValue": false, - "current": { - "text": "All", - "value": [ - "$__all" - ] + { + "selected": false, + "text": "stage", + "value": "stage" }, - "datasource": "loki", - "definition": "", - "includeAll": true, - "label": "App", - "multi": true, - "name": "app", - "options": [], - "query": { - "label": "job", - "refId": "LokiVariableQueryEditor-VariableQuery", - "stream": "{cluster=~\"$cluster\", job=~\"$env/.*\"}", - "type": 1 - }, - "refresh": 1, - "regex": ".*/(.*)", - "type": "query" + { + "selected": true, + "text": "stage1", + "value": "stage1" + } + ], + "query": "prod,stage,stage1", + "type": "custom" + }, + { + "allValue": ".*", + "allowCustomValue": false, + "current": { + "text": "All", + "value": "$__all" }, - { - "current": { + "datasource": "loki", + "definition": "", + "includeAll": true, + "label": "App", + "multi": true, + "name": "app", + "options": [], + "query": { + "label": "job", + "refId": "LokiVariableQueryEditor-VariableQuery", + "stream": "{cluster=~\"$cluster\", job=~\"$env/.*\"}", + "type": 1 + }, + "refresh": 1, + "regex": ".*/(.*)", + "type": "query" + }, + { + "current": { + "text": "", + "value": "" + }, + "label": "String Match", + "name": "search", + "options": [ + { + "selected": true, "text": "", "value": "" - }, - "label": "String Match", - "name": "search", - "options": [ - { - "selected": true, - "text": "", - "value": "" - } - ], - "query": "", - "type": "textbox" - } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ] - }, - "timezone": "", - "title": "Logs / Apps K8S", - "uid": "logs-apps-k8s-uid", - "version": 5 - } \ No newline at end of file + } + ], + "query": "", + "type": "textbox" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Logs / Apps K8S", + "uid": "new-k8s-dachboard-app", + "version": 2 +} \ No newline at end of file