diff --git a/infra/values/grafana-values.yaml b/infra/values/grafana-values.yaml index c2c51b5..6be95d4 100644 --- a/infra/values/grafana-values.yaml +++ b/infra/values/grafana-values.yaml @@ -24,6 +24,7 @@ datasources: isDefault: true - name: Loki type: loki + uid: loki url: http://loki-gateway.monitoring.svc.cluster.local access: proxy dashboardProviders: @@ -44,3 +45,99 @@ dashboards: gnetId: 15758 revision: 1 datasource: Prometheus + dot-ai-logs: + json: | + { + "annotations": { "list": [] }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "links": [], + "panels": [ + { + "title": "Log Volume", + "type": "timeseries", + "gridPos": { "h": 6, "w": 24, "x": 0, "y": 0 }, + "datasource": { "type": "loki", "uid": "loki" }, + "targets": [ + { + "expr": "sum(count_over_time({namespace=\"dot-ai\"} [1m])) by (pod)", + "legendFormat": "{{pod}}", + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "custom": { + "drawStyle": "bars", + "fillOpacity": 50, + "stacking": { "mode": "normal" } + } + }, + "overrides": [] + } + }, + { + "title": "Logs by Pod", + "type": "logs", + "gridPos": { "h": 16, "w": 24, "x": 0, "y": 6 }, + "datasource": { "type": "loki", "uid": "loki" }, + "targets": [ + { + "expr": "{namespace=\"dot-ai\"} |= ``", + "refId": "A" + } + ], + "options": { + "showTime": true, + "showLabels": true, + "showCommonLabels": false, + "wrapLogMessage": true, + "prettifyLogMessage": false, + "enableLogDetails": true, + "sortOrder": "Descending", + "dedupStrategy": "none" + } + }, + { + "title": "Errors & Warnings", + "type": "logs", + "gridPos": { "h": 10, "w": 24, "x": 0, "y": 22 }, + "datasource": { "type": "loki", "uid": "loki" }, + "targets": [ + { + "expr": "{namespace=\"dot-ai\"} |~ \"(?i)(error|warn|panic|fatal)\"", + "refId": "A" + } + ], + "options": { + "showTime": true, + "showLabels": true, + "showCommonLabels": false, + "wrapLogMessage": true, + "prettifyLogMessage": false, + "enableLogDetails": true, + "sortOrder": "Descending", + "dedupStrategy": "none" + } + } + ], + "schemaVersion": 39, + "tags": ["dot-ai", "logs", "loki"], + "templating": { + "list": [ + { + "name": "pod", + "type": "query", + "datasource": { "type": "loki", "uid": "loki" }, + "query": { "label": "pod", "stream": "{namespace=\"dot-ai\"}", "type": 1 }, + "includeAll": true, + "multi": true, + "current": { "selected": true, "text": "All", "value": "$__all" } + } + ] + }, + "time": { "from": "now-1h", "to": "now" }, + "title": "dot-ai Logs", + "uid": "dot-ai-logs" + } diff --git a/infra/values/loki-values.yaml b/infra/values/loki-values.yaml index 7331794..70bc04a 100644 --- a/infra/values/loki-values.yaml +++ b/infra/values/loki-values.yaml @@ -29,10 +29,10 @@ singleBinary: resources: requests: cpu: 100m - memory: 256Mi + memory: 512Mi limits: cpu: 200m - memory: 512Mi + memory: 1Gi read: replicas: 0 backend: