From 27653aaca521cbd623f42fc1fe75480402b4ef4f Mon Sep 17 00:00:00 2001 From: elAgala Date: Sat, 6 Sep 2025 15:14:30 -0300 Subject: [PATCH] chore: add new grafana dashboard templates --- .../grafana/dashboards/api-logs.json | 127 ++++++++++++++++++ .../dashboards/web-server-monitoring.json | 2 +- 2 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 templates/monitoring/grafana/dashboards/api-logs.json diff --git a/templates/monitoring/grafana/dashboards/api-logs.json b/templates/monitoring/grafana/dashboards/api-logs.json new file mode 100644 index 0000000..92ce756 --- /dev/null +++ b/templates/monitoring/grafana/dashboards/api-logs.json @@ -0,0 +1,127 @@ +{ + "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": 6, + "links": [], + "panels": [ + { + "datasource": { + "type": "loki", + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": {}, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "line" + }, + "properties": [] + } + ] + }, + "gridPos": { + "h": 20, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 1, + "options": { + "dedupStrategy": "none", + "enableLogDetails": true, + "prettifyLogMessage": false, + "showCommonLabels": false, + "showLabels": false, + "showTime": true, + "sortOrder": "Descending", + "wrapLogMessage": true + }, + "pluginVersion": "11.4.1", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "$datasource" + }, + "expr": "{app=\"$app\"}", + "refId": "A" + } + ], + "title": "Application Logs", + "type": "logs" + } + ], + "preload": false, + "refresh": "10s", + "schemaVersion": 40, + "tags": [ + "logs", + "loki" + ], + "templating": { + "list": [ + { + "current": { + "text": "dev-01", + "value": "aex1cmrcd5q0wf" + }, + "includeAll": false, + "name": "datasource", + "options": [], + "query": "loki", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": ".*", + "current": { + "text": "sisvoto-api", + "value": "sisvoto-api" + }, + "datasource": { + "type": "loki", + "uid": "$datasource" + }, + "definition": "label_values(app)", + "includeAll": true, + "name": "app", + "options": [], + "query": "label_values(app)", + "refresh": 2, + "regex": "", + "sort": 1, + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Simple App Log Stream", + "uid": "bex4ub3xkzrwgd", + "version": 6, + "weekStart": "" +} diff --git a/templates/monitoring/grafana/dashboards/web-server-monitoring.json b/templates/monitoring/grafana/dashboards/web-server-monitoring.json index 3de6f9c..b355286 100644 --- a/templates/monitoring/grafana/dashboards/web-server-monitoring.json +++ b/templates/monitoring/grafana/dashboards/web-server-monitoring.json @@ -636,4 +636,4 @@ "title": "Web Server Monitoring", "uid": "web-server-monitoring", "version": 1 -} \ No newline at end of file +}