From d1007d29f17a6448951ea5b053530418456d8f51 Mon Sep 17 00:00:00 2001 From: Erich Blume Date: Thu, 22 Jan 2026 12:51:54 -0800 Subject: [PATCH 1/9] Add k8s observability: Alloy for pod logs, service health probes - Remove stale /opt/homebrew/var/loki from borgmatic backup (Loki migrated to k8s) - Add Alloy k8s DaemonSet for automatic pod log collection to Loki - Add blackbox probes for miniflux, kiwix, transmission, devpi, argocd - Replace stale devpi/transmission dashboards with unified services health dashboard - The new Alloy k8s deployment auto-discovers all pods including new ones Co-Authored-By: Claude Opus 4.5 --- ansible/roles/borgmatic/defaults/main.yml | 2 - argocd/apps/alloy-k8s.yaml | 17 + argocd/manifests/alloy-k8s/configmap.yaml | 158 ++++ argocd/manifests/alloy-k8s/daemonset.yaml | 65 ++ argocd/manifests/alloy-k8s/kustomization.yaml | 7 + argocd/manifests/alloy-k8s/namespace.yaml | 4 + argocd/manifests/alloy-k8s/rbac.yaml | 35 + .../dashboards/configmap-devpi.yaml | 452 ---------- .../dashboards/configmap-services.yaml | 145 ++++ .../dashboards/configmap-transmission.yaml | 814 ------------------ .../grafana-config/kustomization.yaml | 3 +- 11 files changed, 432 insertions(+), 1270 deletions(-) create mode 100644 argocd/apps/alloy-k8s.yaml create mode 100644 argocd/manifests/alloy-k8s/configmap.yaml create mode 100644 argocd/manifests/alloy-k8s/daemonset.yaml create mode 100644 argocd/manifests/alloy-k8s/kustomization.yaml create mode 100644 argocd/manifests/alloy-k8s/namespace.yaml create mode 100644 argocd/manifests/alloy-k8s/rbac.yaml delete mode 100644 argocd/manifests/grafana-config/dashboards/configmap-devpi.yaml create mode 100644 argocd/manifests/grafana-config/dashboards/configmap-services.yaml delete mode 100644 argocd/manifests/grafana-config/dashboards/configmap-transmission.yaml diff --git a/ansible/roles/borgmatic/defaults/main.yml b/ansible/roles/borgmatic/defaults/main.yml index 49816d9..14aa046 100644 --- a/ansible/roles/borgmatic/defaults/main.yml +++ b/ansible/roles/borgmatic/defaults/main.yml @@ -11,14 +11,12 @@ borgmatic_schedule_hour: 2 borgmatic_schedule_minute: 0 # Source directories to back up -# NOTE: devpi removed - now hosted in k8s (PVC handles persistence) borgmatic_source_directories: - /Users/erichblume/code/personal/zk - /opt/homebrew/var/forgejo - /Users/erichblume/.config/borgmatic - /Users/erichblume/Documents - /Users/erichblume/Pictures - - /opt/homebrew/var/loki # Backup repository borgmatic_repositories: diff --git a/argocd/apps/alloy-k8s.yaml b/argocd/apps/alloy-k8s.yaml new file mode 100644 index 0000000..29d996c --- /dev/null +++ b/argocd/apps/alloy-k8s.yaml @@ -0,0 +1,17 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: alloy-k8s + namespace: argocd +spec: + project: default + source: + repoURL: ssh://forgejo@indri.tail8d86e.ts.net:2200/eblume/blumeops.git + targetRevision: main + path: argocd/manifests/alloy-k8s + destination: + server: https://kubernetes.default.svc + namespace: alloy + syncPolicy: + syncOptions: + - CreateNamespace=true diff --git a/argocd/manifests/alloy-k8s/configmap.yaml b/argocd/manifests/alloy-k8s/configmap.yaml new file mode 100644 index 0000000..2a12cd9 --- /dev/null +++ b/argocd/manifests/alloy-k8s/configmap.yaml @@ -0,0 +1,158 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: alloy-config + namespace: alloy +data: + config.alloy: | + // Alloy k8s configuration - collects pod logs from all namespaces + + // ============== K8S POD LOG DISCOVERY ============== + + // Discover all pods in the cluster + discovery.kubernetes "pods" { + role = "pod" + } + + // Relabel to extract useful metadata + discovery.relabel "pods" { + targets = discovery.kubernetes.pods.targets + + // Keep only running pods + rule { + source_labels = ["__meta_kubernetes_pod_phase"] + regex = "Pending|Succeeded|Failed|Unknown" + action = "drop" + } + + // Set namespace label + rule { + source_labels = ["__meta_kubernetes_namespace"] + target_label = "namespace" + } + + // Set pod name label + rule { + source_labels = ["__meta_kubernetes_pod_name"] + target_label = "pod" + } + + // Set container name label + rule { + source_labels = ["__meta_kubernetes_pod_container_name"] + target_label = "container" + } + + // Set app label from pod labels + rule { + source_labels = ["__meta_kubernetes_pod_label_app"] + target_label = "app" + } + + // Fallback: use app.kubernetes.io/name if no app label + rule { + source_labels = ["__meta_kubernetes_pod_label_app_kubernetes_io_name"] + target_label = "app" + regex = "(.+)" + action = "replace" + } + + // Set node name + rule { + source_labels = ["__meta_kubernetes_pod_node_name"] + target_label = "node" + } + + // Build the log path for the pod container + rule { + source_labels = ["__meta_kubernetes_pod_uid", "__meta_kubernetes_pod_container_name"] + target_label = "__path__" + separator = "/" + replacement = "/var/log/pods/*$1/$2/*.log" + } + } + + // Tail pod logs + loki.source.kubernetes "pods" { + targets = discovery.relabel.pods.output + forward_to = [loki.process.pods.receiver] + } + + // Process logs - parse JSON if present, add labels + loki.process "pods" { + forward_to = [loki.write.loki.receiver] + + // Try to parse JSON logs + stage.json { + expressions = { + level = "level", + message = "msg", + time = "time", + } + } + + // Extract level from parsed JSON if available + stage.labels { + values = { + level = "", + } + } + } + + // Write logs to Loki + loki.write "loki" { + endpoint { + url = "http://loki.monitoring.svc.cluster.local:3100/loki/api/v1/push" + } + } + + // ============== SERVICE HEALTH PROBES ============== + + // Blackbox-style HTTP probes for k8s services + prometheus.exporter.blackbox "services" { + config = "{ modules: { http_2xx: { prober: http, timeout: 5s } } }" + + target { + name = "miniflux" + address = "http://miniflux.miniflux.svc.cluster.local:8080/healthcheck" + module = "http_2xx" + } + + target { + name = "kiwix" + address = "http://kiwix.kiwix.svc.cluster.local:80/" + module = "http_2xx" + } + + target { + name = "transmission" + address = "http://transmission.torrent.svc.cluster.local:9091/transmission/web/" + module = "http_2xx" + } + + target { + name = "devpi" + address = "http://devpi.devpi.svc.cluster.local:3141/+api" + module = "http_2xx" + } + + target { + name = "argocd" + address = "http://argocd-server.argocd.svc.cluster.local:80/healthz" + module = "http_2xx" + } + } + + // Scrape blackbox probe results + prometheus.scrape "blackbox" { + targets = prometheus.exporter.blackbox.services.targets + scrape_interval = "30s" + forward_to = [prometheus.remote_write.prometheus.receiver] + } + + // Push metrics to Prometheus + prometheus.remote_write "prometheus" { + endpoint { + url = "http://prometheus.monitoring.svc.cluster.local:9090/api/v1/write" + } + } diff --git a/argocd/manifests/alloy-k8s/daemonset.yaml b/argocd/manifests/alloy-k8s/daemonset.yaml new file mode 100644 index 0000000..81a5cf8 --- /dev/null +++ b/argocd/manifests/alloy-k8s/daemonset.yaml @@ -0,0 +1,65 @@ +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: alloy + namespace: alloy + labels: + app: alloy +spec: + selector: + matchLabels: + app: alloy + template: + metadata: + labels: + app: alloy + spec: + serviceAccountName: alloy + containers: + - name: alloy + image: grafana/alloy:v1.5.1 + args: + - run + - --server.http.listen-addr=0.0.0.0:12345 + - --storage.path=/var/lib/alloy/data + - /etc/alloy/config.alloy + ports: + - containerPort: 12345 + name: http + env: + - name: HOSTNAME + valueFrom: + fieldRef: + fieldPath: spec.nodeName + resources: + requests: + cpu: 50m + memory: 128Mi + limits: + cpu: 500m + memory: 512Mi + volumeMounts: + - name: config + mountPath: /etc/alloy + - name: varlog + mountPath: /var/log + readOnly: true + - name: data + mountPath: /var/lib/alloy/data + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + capabilities: + drop: + - ALL + tolerations: + - operator: Exists + volumes: + - name: config + configMap: + name: alloy-config + - name: varlog + hostPath: + path: /var/log + - name: data + emptyDir: {} diff --git a/argocd/manifests/alloy-k8s/kustomization.yaml b/argocd/manifests/alloy-k8s/kustomization.yaml new file mode 100644 index 0000000..17cd3c4 --- /dev/null +++ b/argocd/manifests/alloy-k8s/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - namespace.yaml + - rbac.yaml + - configmap.yaml + - daemonset.yaml diff --git a/argocd/manifests/alloy-k8s/namespace.yaml b/argocd/manifests/alloy-k8s/namespace.yaml new file mode 100644 index 0000000..94f62be --- /dev/null +++ b/argocd/manifests/alloy-k8s/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: alloy diff --git a/argocd/manifests/alloy-k8s/rbac.yaml b/argocd/manifests/alloy-k8s/rbac.yaml new file mode 100644 index 0000000..f205d24 --- /dev/null +++ b/argocd/manifests/alloy-k8s/rbac.yaml @@ -0,0 +1,35 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: alloy + namespace: alloy +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: alloy +rules: + - apiGroups: [""] + resources: ["nodes", "nodes/proxy", "nodes/metrics", "services", "endpoints", "pods", "namespaces"] + verbs: ["get", "list", "watch"] + - apiGroups: [""] + resources: ["configmaps"] + verbs: ["get"] + - apiGroups: ["discovery.k8s.io"] + resources: ["endpointslices"] + verbs: ["get", "list", "watch"] + - nonResourceURLs: ["/metrics", "/metrics/cadvisor"] + verbs: ["get"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: alloy +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: alloy +subjects: + - kind: ServiceAccount + name: alloy + namespace: alloy diff --git a/argocd/manifests/grafana-config/dashboards/configmap-devpi.yaml b/argocd/manifests/grafana-config/dashboards/configmap-devpi.yaml deleted file mode 100644 index 68dd32d..0000000 --- a/argocd/manifests/grafana-config/dashboards/configmap-devpi.yaml +++ /dev/null @@ -1,452 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: grafana-dashboard-devpi - namespace: monitoring - labels: - grafana_dashboard: "1" -data: - devpi.json: | - { - "annotations": { - "list": [] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [], - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { "color": "red", "value": null }, - { "color": "green", "value": 1 } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { "h": 4, "w": 4, "x": 0, "y": 0 }, - "id": 1, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "devpi_up", - "refId": "A" - } - ], - "title": "Devpi Status", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { "color": "green", "value": null }, - { "color": "yellow", "value": 100 }, - { "color": "red", "value": 1000 } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { "h": 4, "w": 4, "x": 4, "y": 0 }, - "id": 2, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "devpi_web_whoosh_index_queue_size", - "refId": "A" - } - ], - "title": "Search Index Queue", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [{ "color": "green", "value": null }] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { "h": 4, "w": 4, "x": 8, "y": 0 }, - "id": 3, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "devpi_serial", - "refId": "A" - } - ], - "title": "Changelog Serial", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "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": "never", - "spanNulls": false, - "stacking": { "group": "A", "mode": "none" }, - "thresholdsStyle": { "mode": "off" } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [{ "color": "green", "value": null }] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { "h": 8, "w": 12, "x": 0, "y": 4 }, - "id": 4, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { "mode": "single", "sort": "none" } - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "rate(devpi_server_storage_cache_hits[5m])", - "legendFormat": "Storage Cache Hits", - "refId": "A" - }, - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "rate(devpi_server_storage_cache_misses[5m])", - "legendFormat": "Storage Cache Misses", - "refId": "B" - } - ], - "title": "Storage Cache Hit/Miss Rate", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "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": "never", - "spanNulls": false, - "stacking": { "group": "A", "mode": "none" }, - "thresholdsStyle": { "mode": "off" } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [{ "color": "green", "value": null }] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { "h": 8, "w": 12, "x": 12, "y": 4 }, - "id": 5, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { "mode": "single", "sort": "none" } - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "rate(devpi_server_changelog_cache_hits[5m])", - "legendFormat": "Changelog Cache Hits", - "refId": "A" - }, - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "rate(devpi_server_changelog_cache_misses[5m])", - "legendFormat": "Changelog Cache Misses", - "refId": "B" - } - ], - "title": "Changelog Cache Hit/Miss Rate", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "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": "never", - "spanNulls": false, - "stacking": { "group": "A", "mode": "none" }, - "thresholdsStyle": { "mode": "off" } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [{ "color": "green", "value": null }] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { "h": 8, "w": 12, "x": 0, "y": 12 }, - "id": 6, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { "mode": "single", "sort": "none" } - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "devpi_web_whoosh_index_queue_size", - "legendFormat": "Index Queue Size", - "refId": "A" - }, - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "devpi_web_whoosh_index_error_queue_size", - "legendFormat": "Index Error Queue Size", - "refId": "B" - } - ], - "title": "Search Index Queue Over Time", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [{ "color": "green", "value": null }] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { "h": 8, "w": 12, "x": 12, "y": 12 }, - "id": 7, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "devpi_server_storage_cache_size", - "legendFormat": "Storage Cache Size", - "refId": "A" - }, - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "devpi_server_changelog_cache_size", - "legendFormat": "Changelog Cache Size", - "refId": "B" - }, - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "devpi_server_changelog_cache_items", - "legendFormat": "Changelog Cache Items", - "refId": "C" - }, - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "devpi_server_relpath_cache_size", - "legendFormat": "Relpath Cache Size", - "refId": "D" - }, - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "devpi_server_relpath_cache_items", - "legendFormat": "Relpath Cache Items", - "refId": "E" - } - ], - "title": "Cache Sizes", - "type": "stat" - } - ], - "refresh": "30s", - "schemaVersion": 38, - "tags": ["devpi", "pypi"], - "templating": { - "list": [] - }, - "time": { - "from": "now-6h", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Devpi PyPI Proxy", - "uid": "devpi", - "version": 1, - "weekStart": "" - } diff --git a/argocd/manifests/grafana-config/dashboards/configmap-services.yaml b/argocd/manifests/grafana-config/dashboards/configmap-services.yaml new file mode 100644 index 0000000..0b07133 --- /dev/null +++ b/argocd/manifests/grafana-config/dashboards/configmap-services.yaml @@ -0,0 +1,145 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: grafana-dashboard-services + namespace: monitoring + labels: + grafana_dashboard: "1" +data: + services.json: | + { + "annotations": { "list": [] }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "panels": [ + { + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "fieldConfig": { + "defaults": { + "color": { "mode": "thresholds" }, + "mappings": [ + { "options": { "0": { "color": "red", "text": "DOWN" }, "1": { "color": "green", "text": "UP" } }, "type": "value" } + ], + "thresholds": { "mode": "absolute", "steps": [{ "color": "red", "value": null }, { "color": "green", "value": 1 }] }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { "h": 6, "w": 24, "x": 0, "y": 0 }, + "id": 1, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "center", + "orientation": "horizontal", + "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false }, + "textMode": "value_and_name" + }, + "pluginVersion": "11.0.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_success{target=\"miniflux\"}", "legendFormat": "Miniflux", "refId": "A" }, + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_success{target=\"kiwix\"}", "legendFormat": "Kiwix", "refId": "B" }, + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_success{target=\"transmission\"}", "legendFormat": "Transmission", "refId": "C" }, + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_success{target=\"devpi\"}", "legendFormat": "Devpi", "refId": "D" }, + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_success{target=\"argocd\"}", "legendFormat": "ArgoCD", "refId": "E" } + ], + "title": "Service Status", + "type": "stat" + }, + { + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "fieldConfig": { + "defaults": { + "color": { "mode": "palette-classic" }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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": "never", + "spanNulls": false, + "stacking": { "group": "A", "mode": "none" }, + "thresholdsStyle": { "mode": "off" } + }, + "mappings": [], + "thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { "h": 8, "w": 24, "x": 0, "y": 6 }, + "id": 2, + "options": { + "legend": { "calcs": ["mean", "max"], "displayMode": "table", "placement": "right", "showLegend": true }, + "tooltip": { "mode": "multi", "sort": "desc" } + }, + "pluginVersion": "11.0.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_duration_seconds{target=\"miniflux\"}", "legendFormat": "Miniflux", "refId": "A" }, + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_duration_seconds{target=\"kiwix\"}", "legendFormat": "Kiwix", "refId": "B" }, + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_duration_seconds{target=\"transmission\"}", "legendFormat": "Transmission", "refId": "C" }, + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_duration_seconds{target=\"devpi\"}", "legendFormat": "Devpi", "refId": "D" }, + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_duration_seconds{target=\"argocd\"}", "legendFormat": "ArgoCD", "refId": "E" } + ], + "title": "Response Time", + "type": "timeseries" + }, + { + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "fieldConfig": { + "defaults": { + "color": { "mode": "thresholds" }, + "mappings": [], + "thresholds": { "mode": "absolute", "steps": [{ "color": "red", "value": null }, { "color": "yellow", "value": 0.95 }, { "color": "green", "value": 0.99 }] }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { "h": 6, "w": 24, "x": 0, "y": 14 }, + "id": 3, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "orientation": "horizontal", + "reduceOptions": { "calcs": ["mean"], "fields": "", "values": false }, + "textMode": "value_and_name" + }, + "pluginVersion": "11.0.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "avg_over_time(probe_success{target=\"miniflux\"}[$__range])", "legendFormat": "Miniflux", "refId": "A" }, + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "avg_over_time(probe_success{target=\"kiwix\"}[$__range])", "legendFormat": "Kiwix", "refId": "B" }, + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "avg_over_time(probe_success{target=\"transmission\"}[$__range])", "legendFormat": "Transmission", "refId": "C" }, + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "avg_over_time(probe_success{target=\"devpi\"}[$__range])", "legendFormat": "Devpi", "refId": "D" }, + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "avg_over_time(probe_success{target=\"argocd\"}[$__range])", "legendFormat": "ArgoCD", "refId": "E" } + ], + "title": "Uptime (selected period)", + "type": "stat" + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": ["services", "health"], + "templating": { "list": [] }, + "time": { "from": "now-24h", "to": "now" }, + "timepicker": {}, + "timezone": "browser", + "title": "K8s Services Health", + "uid": "k8s-services", + "version": 1, + "weekStart": "" + } diff --git a/argocd/manifests/grafana-config/dashboards/configmap-transmission.yaml b/argocd/manifests/grafana-config/dashboards/configmap-transmission.yaml deleted file mode 100644 index 3563ff5..0000000 --- a/argocd/manifests/grafana-config/dashboards/configmap-transmission.yaml +++ /dev/null @@ -1,814 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: grafana-dashboard-transmission - namespace: monitoring - labels: - grafana_dashboard: "1" -data: - transmission.json: | - { - "annotations": { - "list": [] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [], - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { "color": "red", "value": null }, - { "color": "green", "value": 1 } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { "h": 4, "w": 4, "x": 0, "y": 0 }, - "id": 1, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "transmission_up", - "refId": "A" - } - ], - "title": "Transmission Status", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [{ "color": "green", "value": null }] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { "h": 4, "w": 4, "x": 4, "y": 0 }, - "id": 2, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "transmission_torrents_total", - "refId": "A" - } - ], - "title": "Total Torrents", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [{ "color": "blue", "value": null }] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { "h": 4, "w": 4, "x": 8, "y": 0 }, - "id": 3, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "transmission_torrents_active", - "refId": "A" - } - ], - "title": "Active Torrents", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [{ "color": "orange", "value": null }] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { "h": 4, "w": 4, "x": 12, "y": 0 }, - "id": 4, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "transmission_torrents_paused", - "refId": "A" - } - ], - "title": "Paused Torrents", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [{ "color": "green", "value": null }] - }, - "unit": "decbytes" - }, - "overrides": [] - }, - "gridPos": { "h": 4, "w": 4, "x": 16, "y": 0 }, - "id": 5, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "transmission_downloaded_bytes_total", - "refId": "A" - } - ], - "title": "Total Downloaded", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [{ "color": "purple", "value": null }] - }, - "unit": "decbytes" - }, - "overrides": [] - }, - "gridPos": { "h": 4, "w": 4, "x": 20, "y": 0 }, - "id": 6, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "transmission_uploaded_bytes_total", - "refId": "A" - } - ], - "title": "Total Uploaded", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { "color": "red", "value": null }, - { "color": "yellow", "value": 0.5 }, - { "color": "green", "value": 1 } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { "h": 4, "w": 8, "x": 0, "y": 4 }, - "id": 11, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "increase(transmission_uploaded_bytes_total[$__range]) / increase(transmission_downloaded_bytes_total[$__range])", - "refId": "A" - } - ], - "title": "Upload/Download Ratio (Period)", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "green", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [{ "color": "green", "value": null }] - }, - "unit": "decbytes" - }, - "overrides": [] - }, - "gridPos": { "h": 4, "w": 8, "x": 8, "y": 4 }, - "id": 12, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "increase(transmission_downloaded_bytes_total[$__range])", - "refId": "A" - } - ], - "title": "Downloaded (Period)", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "blue", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [{ "color": "blue", "value": null }] - }, - "unit": "decbytes" - }, - "overrides": [] - }, - "gridPos": { "h": 4, "w": 8, "x": 16, "y": 4 }, - "id": 13, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "increase(transmission_uploaded_bytes_total[$__range])", - "refId": "A" - } - ], - "title": "Uploaded (Period)", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "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", "value": null }] - }, - "unit": "Bps" - }, - "overrides": [ - { - "matcher": { "id": "byName", "options": "Download" }, - "properties": [ - { - "id": "color", - "value": { "fixedColor": "green", "mode": "fixed" } - } - ] - }, - { - "matcher": { "id": "byName", "options": "Upload" }, - "properties": [ - { - "id": "color", - "value": { "fixedColor": "blue", "mode": "fixed" } - } - ] - } - ] - }, - "gridPos": { "h": 8, "w": 12, "x": 0, "y": 8 }, - "id": 7, - "options": { - "legend": { - "calcs": ["mean", "max"], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "transmission_download_speed_bytes", - "legendFormat": "Download", - "refId": "A" - }, - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "transmission_upload_speed_bytes", - "legendFormat": "Upload", - "refId": "B" - } - ], - "title": "Transfer Speed", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "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", "value": null }] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { "h": 8, "w": 12, "x": 12, "y": 8 }, - "id": 8, - "options": { - "legend": { - "calcs": ["mean", "max"], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "transmission_torrents_total", - "legendFormat": "Total", - "refId": "A" - }, - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "transmission_torrents_active", - "legendFormat": "Active", - "refId": "B" - }, - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "transmission_torrents_paused", - "legendFormat": "Paused", - "refId": "C" - } - ], - "title": "Torrent Count", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "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", "value": null }] - }, - "unit": "Bps" - }, - "overrides": [ - { - "matcher": { "id": "byName", "options": "Download Rate" }, - "properties": [ - { - "id": "color", - "value": { "fixedColor": "green", "mode": "fixed" } - } - ] - }, - { - "matcher": { "id": "byName", "options": "Upload Rate" }, - "properties": [ - { - "id": "color", - "value": { "fixedColor": "blue", "mode": "fixed" } - } - ] - } - ] - }, - "gridPos": { "h": 8, "w": 24, "x": 0, "y": 16 }, - "id": 9, - "options": { - "legend": { - "calcs": ["mean", "max", "lastNotNull"], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "rate(transmission_downloaded_bytes_total[5m])", - "legendFormat": "Download Rate", - "refId": "A" - }, - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "rate(transmission_uploaded_bytes_total[5m])", - "legendFormat": "Upload Rate", - "refId": "B" - } - ], - "title": "Cumulative Transfer Rate (5m avg)", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "fixed", - "fixedColor": "semi-dark-purple" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [{ "color": "green", "value": null }] - }, - "unit": "decbytes" - }, - "overrides": [] - }, - "gridPos": { "h": 8, "w": 24, "x": 0, "y": 24 }, - "id": 10, - "options": { - "legend": { - "calcs": ["lastNotNull", "min", "max"], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "transmission_torrents_size_bytes", - "legendFormat": "Total Torrent Size", - "refId": "A" - } - ], - "title": "Total Torrent Size", - "type": "timeseries" - } - ], - "refresh": "30s", - "schemaVersion": 38, - "tags": ["transmission", "bittorrent"], - "templating": { - "list": [] - }, - "time": { - "from": "now-6h", - "to": "now" - }, - "timepicker": {}, - "timezone": "browser", - "title": "Transmission", - "uid": "transmission", - "version": 1, - "weekStart": "" - } diff --git a/argocd/manifests/grafana-config/kustomization.yaml b/argocd/manifests/grafana-config/kustomization.yaml index d897b1d..781f139 100644 --- a/argocd/manifests/grafana-config/kustomization.yaml +++ b/argocd/manifests/grafana-config/kustomization.yaml @@ -7,11 +7,10 @@ resources: - ingress-tailscale.yaml # Dashboard ConfigMaps - discovered by Grafana sidecar via label grafana_dashboard=1 - dashboards/configmap-borgmatic.yaml - - dashboards/configmap-devpi.yaml - dashboards/configmap-loki.yaml - dashboards/configmap-macos.yaml - dashboards/configmap-minikube.yaml - dashboards/configmap-plex.yaml - dashboards/configmap-postgresql.yaml - - dashboards/configmap-transmission.yaml + - dashboards/configmap-services.yaml - dashboards/configmap-zot.yaml -- 2.50.1 (Apple Git-155) From b5bf773d9500fc6a8ed58c8e21ebc260adeb11c3 Mon Sep 17 00:00:00 2001 From: Erich Blume Date: Thu, 22 Jan 2026 13:01:58 -0800 Subject: [PATCH 2/9] Add transmission exporter, update dashboards for k8s services - Add transmission-exporter sidecar for full metrics (speed, torrents, etc.) - Add Prometheus scrape config for transmission metrics - Update devpi dashboard to use blackbox probe metrics (status, response time, uptime) - Restore transmission dashboard (will use exporter metrics) Co-Authored-By: Claude Opus 4.5 --- .../dashboards/configmap-devpi.yaml | 159 ++++ .../dashboards/configmap-transmission.yaml | 814 ++++++++++++++++++ .../grafana-config/kustomization.yaml | 2 + argocd/manifests/prometheus/configmap.yaml | 5 + argocd/manifests/torrent/deployment.yaml | 15 + argocd/manifests/torrent/service.yaml | 3 + 6 files changed, 998 insertions(+) create mode 100644 argocd/manifests/grafana-config/dashboards/configmap-devpi.yaml create mode 100644 argocd/manifests/grafana-config/dashboards/configmap-transmission.yaml diff --git a/argocd/manifests/grafana-config/dashboards/configmap-devpi.yaml b/argocd/manifests/grafana-config/dashboards/configmap-devpi.yaml new file mode 100644 index 0000000..ebe0a3a --- /dev/null +++ b/argocd/manifests/grafana-config/dashboards/configmap-devpi.yaml @@ -0,0 +1,159 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: grafana-dashboard-devpi + namespace: monitoring + labels: + grafana_dashboard: "1" +data: + devpi.json: | + { + "annotations": { "list": [] }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "panels": [ + { + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "fieldConfig": { + "defaults": { + "color": { "mode": "thresholds" }, + "mappings": [ + { "options": { "0": { "color": "red", "text": "DOWN" }, "1": { "color": "green", "text": "UP" } }, "type": "value" } + ], + "thresholds": { "mode": "absolute", "steps": [{ "color": "red", "value": null }, { "color": "green", "value": 1 }] }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { "h": 6, "w": 8, "x": 0, "y": 0 }, + "id": 1, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto", + "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false }, + "textMode": "value" + }, + "pluginVersion": "11.0.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_success{target=\"devpi\"}", "refId": "A" } + ], + "title": "Devpi Status", + "type": "stat" + }, + { + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "fieldConfig": { + "defaults": { + "color": { "mode": "thresholds" }, + "thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }, { "color": "yellow", "value": 0.5 }, { "color": "red", "value": 1 }] }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { "h": 6, "w": 8, "x": 8, "y": 0 }, + "id": 2, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto", + "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false }, + "textMode": "value" + }, + "pluginVersion": "11.0.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_duration_seconds{target=\"devpi\"}", "refId": "A" } + ], + "title": "Response Time", + "type": "stat" + }, + { + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "fieldConfig": { + "defaults": { + "color": { "mode": "thresholds" }, + "thresholds": { "mode": "absolute", "steps": [{ "color": "red", "value": null }, { "color": "yellow", "value": 0.95 }, { "color": "green", "value": 0.99 }] }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { "h": 6, "w": 8, "x": 16, "y": 0 }, + "id": 3, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto", + "reduceOptions": { "calcs": ["mean"], "fields": "", "values": false }, + "textMode": "value" + }, + "pluginVersion": "11.0.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "avg_over_time(probe_success{target=\"devpi\"}[$__range])", "refId": "A" } + ], + "title": "Uptime (selected period)", + "type": "stat" + }, + { + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "fieldConfig": { + "defaults": { + "color": { "mode": "palette-classic" }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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": "never", + "spanNulls": false, + "stacking": { "group": "A", "mode": "none" }, + "thresholdsStyle": { "mode": "off" } + }, + "mappings": [], + "thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { "h": 8, "w": 24, "x": 0, "y": 6 }, + "id": 4, + "options": { + "legend": { "calcs": ["mean", "max"], "displayMode": "table", "placement": "right", "showLegend": true }, + "tooltip": { "mode": "single", "sort": "none" } + }, + "pluginVersion": "11.0.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_duration_seconds{target=\"devpi\"}", "legendFormat": "Response Time", "refId": "A" } + ], + "title": "Response Time Over Time", + "type": "timeseries" + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": ["devpi", "pypi"], + "templating": { "list": [] }, + "time": { "from": "now-6h", "to": "now" }, + "timepicker": {}, + "timezone": "", + "title": "Devpi PyPI Proxy", + "uid": "devpi", + "version": 1, + "weekStart": "" + } diff --git a/argocd/manifests/grafana-config/dashboards/configmap-transmission.yaml b/argocd/manifests/grafana-config/dashboards/configmap-transmission.yaml new file mode 100644 index 0000000..3563ff5 --- /dev/null +++ b/argocd/manifests/grafana-config/dashboards/configmap-transmission.yaml @@ -0,0 +1,814 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: grafana-dashboard-transmission + namespace: monitoring + labels: + grafana_dashboard: "1" +data: + transmission.json: | + { + "annotations": { + "list": [] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { "color": "red", "value": null }, + { "color": "green", "value": 1 } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { "h": 4, "w": 4, "x": 0, "y": 0 }, + "id": 1, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.0", + "targets": [ + { + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "expr": "transmission_up", + "refId": "A" + } + ], + "title": "Transmission Status", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [{ "color": "green", "value": null }] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { "h": 4, "w": 4, "x": 4, "y": 0 }, + "id": 2, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.0", + "targets": [ + { + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "expr": "transmission_torrents_total", + "refId": "A" + } + ], + "title": "Total Torrents", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [{ "color": "blue", "value": null }] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { "h": 4, "w": 4, "x": 8, "y": 0 }, + "id": 3, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.0", + "targets": [ + { + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "expr": "transmission_torrents_active", + "refId": "A" + } + ], + "title": "Active Torrents", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [{ "color": "orange", "value": null }] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { "h": 4, "w": 4, "x": 12, "y": 0 }, + "id": 4, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.0", + "targets": [ + { + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "expr": "transmission_torrents_paused", + "refId": "A" + } + ], + "title": "Paused Torrents", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [{ "color": "green", "value": null }] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { "h": 4, "w": 4, "x": 16, "y": 0 }, + "id": 5, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.0", + "targets": [ + { + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "expr": "transmission_downloaded_bytes_total", + "refId": "A" + } + ], + "title": "Total Downloaded", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [{ "color": "purple", "value": null }] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { "h": 4, "w": 4, "x": 20, "y": 0 }, + "id": 6, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.0", + "targets": [ + { + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "expr": "transmission_uploaded_bytes_total", + "refId": "A" + } + ], + "title": "Total Uploaded", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { "color": "red", "value": null }, + { "color": "yellow", "value": 0.5 }, + { "color": "green", "value": 1 } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { "h": 4, "w": 8, "x": 0, "y": 4 }, + "id": 11, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.0", + "targets": [ + { + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "expr": "increase(transmission_uploaded_bytes_total[$__range]) / increase(transmission_downloaded_bytes_total[$__range])", + "refId": "A" + } + ], + "title": "Upload/Download Ratio (Period)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "green", + "mode": "fixed" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [{ "color": "green", "value": null }] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { "h": 4, "w": 8, "x": 8, "y": 4 }, + "id": 12, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.0", + "targets": [ + { + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "expr": "increase(transmission_downloaded_bytes_total[$__range])", + "refId": "A" + } + ], + "title": "Downloaded (Period)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "blue", + "mode": "fixed" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [{ "color": "blue", "value": null }] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { "h": 4, "w": 8, "x": 16, "y": 4 }, + "id": 13, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.0", + "targets": [ + { + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "expr": "increase(transmission_uploaded_bytes_total[$__range])", + "refId": "A" + } + ], + "title": "Uploaded (Period)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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", "value": null }] + }, + "unit": "Bps" + }, + "overrides": [ + { + "matcher": { "id": "byName", "options": "Download" }, + "properties": [ + { + "id": "color", + "value": { "fixedColor": "green", "mode": "fixed" } + } + ] + }, + { + "matcher": { "id": "byName", "options": "Upload" }, + "properties": [ + { + "id": "color", + "value": { "fixedColor": "blue", "mode": "fixed" } + } + ] + } + ] + }, + "gridPos": { "h": 8, "w": 12, "x": 0, "y": 8 }, + "id": 7, + "options": { + "legend": { + "calcs": ["mean", "max"], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.0", + "targets": [ + { + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "expr": "transmission_download_speed_bytes", + "legendFormat": "Download", + "refId": "A" + }, + { + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "expr": "transmission_upload_speed_bytes", + "legendFormat": "Upload", + "refId": "B" + } + ], + "title": "Transfer Speed", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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", "value": null }] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { "h": 8, "w": 12, "x": 12, "y": 8 }, + "id": 8, + "options": { + "legend": { + "calcs": ["mean", "max"], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.0", + "targets": [ + { + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "expr": "transmission_torrents_total", + "legendFormat": "Total", + "refId": "A" + }, + { + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "expr": "transmission_torrents_active", + "legendFormat": "Active", + "refId": "B" + }, + { + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "expr": "transmission_torrents_paused", + "legendFormat": "Paused", + "refId": "C" + } + ], + "title": "Torrent Count", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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", "value": null }] + }, + "unit": "Bps" + }, + "overrides": [ + { + "matcher": { "id": "byName", "options": "Download Rate" }, + "properties": [ + { + "id": "color", + "value": { "fixedColor": "green", "mode": "fixed" } + } + ] + }, + { + "matcher": { "id": "byName", "options": "Upload Rate" }, + "properties": [ + { + "id": "color", + "value": { "fixedColor": "blue", "mode": "fixed" } + } + ] + } + ] + }, + "gridPos": { "h": 8, "w": 24, "x": 0, "y": 16 }, + "id": 9, + "options": { + "legend": { + "calcs": ["mean", "max", "lastNotNull"], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.0.0", + "targets": [ + { + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "expr": "rate(transmission_downloaded_bytes_total[5m])", + "legendFormat": "Download Rate", + "refId": "A" + }, + { + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "expr": "rate(transmission_uploaded_bytes_total[5m])", + "legendFormat": "Upload Rate", + "refId": "B" + } + ], + "title": "Cumulative Transfer Rate (5m avg)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "fixed", + "fixedColor": "semi-dark-purple" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [{ "color": "green", "value": null }] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { "h": 8, "w": 24, "x": 0, "y": 24 }, + "id": 10, + "options": { + "legend": { + "calcs": ["lastNotNull", "min", "max"], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "10.0.0", + "targets": [ + { + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "expr": "transmission_torrents_size_bytes", + "legendFormat": "Total Torrent Size", + "refId": "A" + } + ], + "title": "Total Torrent Size", + "type": "timeseries" + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": ["transmission", "bittorrent"], + "templating": { + "list": [] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Transmission", + "uid": "transmission", + "version": 1, + "weekStart": "" + } diff --git a/argocd/manifests/grafana-config/kustomization.yaml b/argocd/manifests/grafana-config/kustomization.yaml index 781f139..7daee90 100644 --- a/argocd/manifests/grafana-config/kustomization.yaml +++ b/argocd/manifests/grafana-config/kustomization.yaml @@ -7,10 +7,12 @@ resources: - ingress-tailscale.yaml # Dashboard ConfigMaps - discovered by Grafana sidecar via label grafana_dashboard=1 - dashboards/configmap-borgmatic.yaml + - dashboards/configmap-devpi.yaml - dashboards/configmap-loki.yaml - dashboards/configmap-macos.yaml - dashboards/configmap-minikube.yaml - dashboards/configmap-plex.yaml - dashboards/configmap-postgresql.yaml - dashboards/configmap-services.yaml + - dashboards/configmap-transmission.yaml - dashboards/configmap-zot.yaml diff --git a/argocd/manifests/prometheus/configmap.yaml b/argocd/manifests/prometheus/configmap.yaml index 7ae945a..92b76fe 100644 --- a/argocd/manifests/prometheus/configmap.yaml +++ b/argocd/manifests/prometheus/configmap.yaml @@ -36,3 +36,8 @@ data: - job_name: "loki" static_configs: - targets: ["loki.monitoring.svc.cluster.local:3100"] + + # Transmission metrics (via exporter sidecar) + - job_name: "transmission" + static_configs: + - targets: ["transmission.torrent.svc.cluster.local:19091"] diff --git a/argocd/manifests/torrent/deployment.yaml b/argocd/manifests/torrent/deployment.yaml index 78bc436..32b5dec 100644 --- a/argocd/manifests/torrent/deployment.yaml +++ b/argocd/manifests/torrent/deployment.yaml @@ -55,6 +55,21 @@ spec: port: 9091 initialDelaySeconds: 10 periodSeconds: 10 + - name: exporter + image: metalmatze/transmission-exporter:latest + env: + - name: TRANSMISSION_ADDR + value: "http://localhost:9091" + ports: + - containerPort: 19091 + name: metrics + resources: + requests: + memory: "32Mi" + cpu: "10m" + limits: + memory: "64Mi" + cpu: "50m" volumes: - name: downloads persistentVolumeClaim: diff --git a/argocd/manifests/torrent/service.yaml b/argocd/manifests/torrent/service.yaml index 51f7592..a54fc93 100644 --- a/argocd/manifests/torrent/service.yaml +++ b/argocd/manifests/torrent/service.yaml @@ -11,3 +11,6 @@ spec: - name: web port: 9091 targetPort: 9091 + - name: metrics + port: 19091 + targetPort: 19091 -- 2.50.1 (Apple Git-155) From e8ec538f28e494a21b367786ca3f9c08dbf8ae5b Mon Sep 17 00:00:00 2001 From: Erich Blume Date: Thu, 22 Jan 2026 13:04:56 -0800 Subject: [PATCH 3/9] Fix alloy-k8s: add fsGroup for data directory permissions --- argocd/manifests/alloy-k8s/daemonset.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/argocd/manifests/alloy-k8s/daemonset.yaml b/argocd/manifests/alloy-k8s/daemonset.yaml index 81a5cf8..95f780b 100644 --- a/argocd/manifests/alloy-k8s/daemonset.yaml +++ b/argocd/manifests/alloy-k8s/daemonset.yaml @@ -15,6 +15,8 @@ spec: app: alloy spec: serviceAccountName: alloy + securityContext: + fsGroup: 473 # alloy user group containers: - name: alloy image: grafana/alloy:v1.5.1 -- 2.50.1 (Apple Git-155) From 2dc43c5ae1173d6e43681dae8345995c9d2e0a13 Mon Sep 17 00:00:00 2001 From: Erich Blume Date: Thu, 22 Jan 2026 13:07:11 -0800 Subject: [PATCH 4/9] Fix alloy-k8s: add pods/log permission for log collection --- argocd/manifests/alloy-k8s/rbac.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/argocd/manifests/alloy-k8s/rbac.yaml b/argocd/manifests/alloy-k8s/rbac.yaml index f205d24..58a31df 100644 --- a/argocd/manifests/alloy-k8s/rbac.yaml +++ b/argocd/manifests/alloy-k8s/rbac.yaml @@ -10,7 +10,7 @@ metadata: name: alloy rules: - apiGroups: [""] - resources: ["nodes", "nodes/proxy", "nodes/metrics", "services", "endpoints", "pods", "namespaces"] + resources: ["nodes", "nodes/proxy", "nodes/metrics", "services", "endpoints", "pods", "pods/log", "namespaces"] verbs: ["get", "list", "watch"] - apiGroups: [""] resources: ["configmaps"] -- 2.50.1 (Apple Git-155) From 0ec16dd72a72efca00e394864fa7538657a054f7 Mon Sep 17 00:00:00 2001 From: Erich Blume Date: Thu, 22 Jan 2026 13:08:59 -0800 Subject: [PATCH 5/9] Fix dashboard labels to match blackbox probe job names --- .../dashboards/configmap-devpi.yaml | 8 ++--- .../dashboards/configmap-services.yaml | 30 +++++++++---------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/argocd/manifests/grafana-config/dashboards/configmap-devpi.yaml b/argocd/manifests/grafana-config/dashboards/configmap-devpi.yaml index ebe0a3a..acb062a 100644 --- a/argocd/manifests/grafana-config/dashboards/configmap-devpi.yaml +++ b/argocd/manifests/grafana-config/dashboards/configmap-devpi.yaml @@ -40,7 +40,7 @@ data: }, "pluginVersion": "11.0.0", "targets": [ - { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_success{target=\"devpi\"}", "refId": "A" } + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_success{job=\\"integrations/blackbox/devpi\\"}", "refId": "A" } ], "title": "Devpi Status", "type": "stat" @@ -67,7 +67,7 @@ data: }, "pluginVersion": "11.0.0", "targets": [ - { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_duration_seconds{target=\"devpi\"}", "refId": "A" } + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_duration_seconds{job=\\"integrations/blackbox/devpi\\"}", "refId": "A" } ], "title": "Response Time", "type": "stat" @@ -94,7 +94,7 @@ data: }, "pluginVersion": "11.0.0", "targets": [ - { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "avg_over_time(probe_success{target=\"devpi\"}[$__range])", "refId": "A" } + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "avg_over_time(probe_success{job=\\"integrations/blackbox/devpi\\"}[$__range])", "refId": "A" } ], "title": "Uptime (selected period)", "type": "stat" @@ -139,7 +139,7 @@ data: }, "pluginVersion": "11.0.0", "targets": [ - { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_duration_seconds{target=\"devpi\"}", "legendFormat": "Response Time", "refId": "A" } + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_duration_seconds{job=\\"integrations/blackbox/devpi\\"}", "legendFormat": "Response Time", "refId": "A" } ], "title": "Response Time Over Time", "type": "timeseries" diff --git a/argocd/manifests/grafana-config/dashboards/configmap-services.yaml b/argocd/manifests/grafana-config/dashboards/configmap-services.yaml index 0b07133..241212a 100644 --- a/argocd/manifests/grafana-config/dashboards/configmap-services.yaml +++ b/argocd/manifests/grafana-config/dashboards/configmap-services.yaml @@ -40,11 +40,11 @@ data: }, "pluginVersion": "11.0.0", "targets": [ - { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_success{target=\"miniflux\"}", "legendFormat": "Miniflux", "refId": "A" }, - { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_success{target=\"kiwix\"}", "legendFormat": "Kiwix", "refId": "B" }, - { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_success{target=\"transmission\"}", "legendFormat": "Transmission", "refId": "C" }, - { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_success{target=\"devpi\"}", "legendFormat": "Devpi", "refId": "D" }, - { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_success{target=\"argocd\"}", "legendFormat": "ArgoCD", "refId": "E" } + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_success{job=\"integrations/blackbox/miniflux\"}", "legendFormat": "Miniflux", "refId": "A" }, + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_success{job=\"integrations/blackbox/kiwix\"}", "legendFormat": "Kiwix", "refId": "B" }, + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_success{job=\"integrations/blackbox/transmission\"}", "legendFormat": "Transmission", "refId": "C" }, + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_success{job=\"integrations/blackbox/devpi\"}", "legendFormat": "Devpi", "refId": "D" }, + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_success{job=\"integrations/blackbox/argocd\"}", "legendFormat": "ArgoCD", "refId": "E" } ], "title": "Service Status", "type": "stat" @@ -89,11 +89,11 @@ data: }, "pluginVersion": "11.0.0", "targets": [ - { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_duration_seconds{target=\"miniflux\"}", "legendFormat": "Miniflux", "refId": "A" }, - { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_duration_seconds{target=\"kiwix\"}", "legendFormat": "Kiwix", "refId": "B" }, - { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_duration_seconds{target=\"transmission\"}", "legendFormat": "Transmission", "refId": "C" }, - { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_duration_seconds{target=\"devpi\"}", "legendFormat": "Devpi", "refId": "D" }, - { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_duration_seconds{target=\"argocd\"}", "legendFormat": "ArgoCD", "refId": "E" } + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_duration_seconds{job=\"integrations/blackbox/miniflux\"}", "legendFormat": "Miniflux", "refId": "A" }, + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_duration_seconds{job=\"integrations/blackbox/kiwix\"}", "legendFormat": "Kiwix", "refId": "B" }, + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_duration_seconds{job=\"integrations/blackbox/transmission\"}", "legendFormat": "Transmission", "refId": "C" }, + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_duration_seconds{job=\"integrations/blackbox/devpi\"}", "legendFormat": "Devpi", "refId": "D" }, + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_duration_seconds{job=\"integrations/blackbox/argocd\"}", "legendFormat": "ArgoCD", "refId": "E" } ], "title": "Response Time", "type": "timeseries" @@ -121,11 +121,11 @@ data: }, "pluginVersion": "11.0.0", "targets": [ - { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "avg_over_time(probe_success{target=\"miniflux\"}[$__range])", "legendFormat": "Miniflux", "refId": "A" }, - { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "avg_over_time(probe_success{target=\"kiwix\"}[$__range])", "legendFormat": "Kiwix", "refId": "B" }, - { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "avg_over_time(probe_success{target=\"transmission\"}[$__range])", "legendFormat": "Transmission", "refId": "C" }, - { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "avg_over_time(probe_success{target=\"devpi\"}[$__range])", "legendFormat": "Devpi", "refId": "D" }, - { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "avg_over_time(probe_success{target=\"argocd\"}[$__range])", "legendFormat": "ArgoCD", "refId": "E" } + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "avg_over_time(probe_success{job=\"integrations/blackbox/miniflux\"}[$__range])", "legendFormat": "Miniflux", "refId": "A" }, + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "avg_over_time(probe_success{job=\"integrations/blackbox/kiwix\"}[$__range])", "legendFormat": "Kiwix", "refId": "B" }, + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "avg_over_time(probe_success{job=\"integrations/blackbox/transmission\"}[$__range])", "legendFormat": "Transmission", "refId": "C" }, + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "avg_over_time(probe_success{job=\"integrations/blackbox/devpi\"}[$__range])", "legendFormat": "Devpi", "refId": "D" }, + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "avg_over_time(probe_success{job=\"integrations/blackbox/argocd\"}[$__range])", "legendFormat": "ArgoCD", "refId": "E" } ], "title": "Uptime (selected period)", "type": "stat" -- 2.50.1 (Apple Git-155) From 49cce87ff87bb1eb4d70746f0c50a31b3098a55c Mon Sep 17 00:00:00 2001 From: Erich Blume Date: Thu, 22 Jan 2026 13:21:41 -0800 Subject: [PATCH 6/9] Add kube-state-metrics for k8s resource monitoring --- argocd/apps/kube-state-metrics.yaml | 17 ++++ .../kube-state-metrics/deployment.yaml | 53 +++++++++++++ .../kube-state-metrics/kustomization.yaml | 6 ++ argocd/manifests/kube-state-metrics/rbac.yaml | 79 +++++++++++++++++++ .../manifests/kube-state-metrics/service.yaml | 17 ++++ argocd/manifests/prometheus/configmap.yaml | 5 ++ 6 files changed, 177 insertions(+) create mode 100644 argocd/apps/kube-state-metrics.yaml create mode 100644 argocd/manifests/kube-state-metrics/deployment.yaml create mode 100644 argocd/manifests/kube-state-metrics/kustomization.yaml create mode 100644 argocd/manifests/kube-state-metrics/rbac.yaml create mode 100644 argocd/manifests/kube-state-metrics/service.yaml diff --git a/argocd/apps/kube-state-metrics.yaml b/argocd/apps/kube-state-metrics.yaml new file mode 100644 index 0000000..91df2cd --- /dev/null +++ b/argocd/apps/kube-state-metrics.yaml @@ -0,0 +1,17 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: kube-state-metrics + namespace: argocd +spec: + project: default + source: + repoURL: ssh://forgejo@indri.tail8d86e.ts.net:2200/eblume/blumeops.git + targetRevision: main + path: argocd/manifests/kube-state-metrics + destination: + server: https://kubernetes.default.svc + namespace: monitoring + syncPolicy: + syncOptions: + - CreateNamespace=true diff --git a/argocd/manifests/kube-state-metrics/deployment.yaml b/argocd/manifests/kube-state-metrics/deployment.yaml new file mode 100644 index 0000000..69d3bd2 --- /dev/null +++ b/argocd/manifests/kube-state-metrics/deployment.yaml @@ -0,0 +1,53 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: kube-state-metrics + namespace: monitoring + labels: + app: kube-state-metrics +spec: + replicas: 1 + selector: + matchLabels: + app: kube-state-metrics + template: + metadata: + labels: + app: kube-state-metrics + spec: + serviceAccountName: kube-state-metrics + containers: + - name: kube-state-metrics + image: registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.13.0 + ports: + - containerPort: 8080 + name: http-metrics + - containerPort: 8081 + name: telemetry + livenessProbe: + httpGet: + path: /healthz + port: 8080 + initialDelaySeconds: 5 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: / + port: 8080 + initialDelaySeconds: 5 + timeoutSeconds: 5 + resources: + requests: + cpu: 10m + memory: 64Mi + limits: + cpu: 100m + memory: 256Mi + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 65534 + capabilities: + drop: + - ALL diff --git a/argocd/manifests/kube-state-metrics/kustomization.yaml b/argocd/manifests/kube-state-metrics/kustomization.yaml new file mode 100644 index 0000000..bc60c0b --- /dev/null +++ b/argocd/manifests/kube-state-metrics/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - rbac.yaml + - deployment.yaml + - service.yaml diff --git a/argocd/manifests/kube-state-metrics/rbac.yaml b/argocd/manifests/kube-state-metrics/rbac.yaml new file mode 100644 index 0000000..36193ac --- /dev/null +++ b/argocd/manifests/kube-state-metrics/rbac.yaml @@ -0,0 +1,79 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: kube-state-metrics + namespace: monitoring +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kube-state-metrics +rules: + - apiGroups: [""] + resources: + - configmaps + - secrets + - nodes + - pods + - services + - serviceaccounts + - resourcequotas + - replicationcontrollers + - limitranges + - persistentvolumeclaims + - persistentvolumes + - namespaces + - endpoints + verbs: ["list", "watch"] + - apiGroups: ["apps"] + resources: + - statefulsets + - daemonsets + - deployments + - replicasets + verbs: ["list", "watch"] + - apiGroups: ["batch"] + resources: + - cronjobs + - jobs + verbs: ["list", "watch"] + - apiGroups: ["autoscaling"] + resources: + - horizontalpodautoscalers + verbs: ["list", "watch"] + - apiGroups: ["networking.k8s.io"] + resources: + - networkpolicies + - ingresses + verbs: ["list", "watch"] + - apiGroups: ["coordination.k8s.io"] + resources: + - leases + verbs: ["list", "watch"] + - apiGroups: ["certificates.k8s.io"] + resources: + - certificatesigningrequests + verbs: ["list", "watch"] + - apiGroups: ["storage.k8s.io"] + resources: + - storageclasses + - volumeattachments + verbs: ["list", "watch"] + - apiGroups: ["admissionregistration.k8s.io"] + resources: + - mutatingwebhookconfigurations + - validatingwebhookconfigurations + verbs: ["list", "watch"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: kube-state-metrics +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kube-state-metrics +subjects: + - kind: ServiceAccount + name: kube-state-metrics + namespace: monitoring diff --git a/argocd/manifests/kube-state-metrics/service.yaml b/argocd/manifests/kube-state-metrics/service.yaml new file mode 100644 index 0000000..3a804df --- /dev/null +++ b/argocd/manifests/kube-state-metrics/service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: kube-state-metrics + namespace: monitoring + labels: + app: kube-state-metrics +spec: + selector: + app: kube-state-metrics + ports: + - name: http-metrics + port: 8080 + targetPort: http-metrics + - name: telemetry + port: 8081 + targetPort: telemetry diff --git a/argocd/manifests/prometheus/configmap.yaml b/argocd/manifests/prometheus/configmap.yaml index 92b76fe..611e9b5 100644 --- a/argocd/manifests/prometheus/configmap.yaml +++ b/argocd/manifests/prometheus/configmap.yaml @@ -41,3 +41,8 @@ data: - job_name: "transmission" static_configs: - targets: ["transmission.torrent.svc.cluster.local:19091"] + + # Kubernetes state metrics (pods, deployments, resource usage, etc.) + - job_name: "kube-state-metrics" + static_configs: + - targets: ["kube-state-metrics.monitoring.svc.cluster.local:8080"] -- 2.50.1 (Apple Git-155) From 9a69cbebec533b561f0df6eef861636af3086b49 Mon Sep 17 00:00:00 2001 From: Erich Blume Date: Thu, 22 Jan 2026 13:26:39 -0800 Subject: [PATCH 7/9] Enhance minikube dashboard with namespace filter and resource metrics - Add namespace dropdown variable for filtering all panels - Add kube-state-metrics for k8s resource tracking - Show pods, deployments, statefulsets counts - Show memory/CPU requests by namespace - Show namespace resource summary table - Filter pod logs by selected namespace --- .../dashboards/configmap-minikube.yaml | 552 +++++------------- 1 file changed, 157 insertions(+), 395 deletions(-) diff --git a/argocd/manifests/grafana-config/dashboards/configmap-minikube.yaml b/argocd/manifests/grafana-config/dashboards/configmap-minikube.yaml index 6d4df71..2b1956f 100644 --- a/argocd/manifests/grafana-config/dashboards/configmap-minikube.yaml +++ b/argocd/manifests/grafana-config/dashboards/configmap-minikube.yaml @@ -8,9 +8,7 @@ metadata: data: minikube.json: | { - "annotations": { - "list": [] - }, + "annotations": { "list": [] }, "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, @@ -18,424 +16,173 @@ data: "links": [], "panels": [ { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, + "datasource": { "type": "prometheus", "uid": "prometheus" }, "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [ - { - "options": { - "0": { "color": "red", "index": 0, "text": "DOWN" } - }, - "type": "value" - }, - { - "options": { - "1": { "color": "green", "index": 1, "text": "UP" } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { "color": "red", "value": null }, - { "color": "green", "value": 1 } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { "h": 4, "w": 4, "x": 0, "y": 0 }, - "id": 1, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "minikube_up", - "refId": "A" + "color": { "mode": "thresholds" }, + "mappings": [{ "options": { "0": { "color": "red", "text": "DOWN" }, "1": { "color": "green", "text": "UP" } }, "type": "value" }], + "thresholds": { "mode": "absolute", "steps": [{ "color": "red", "value": null }, { "color": "green", "value": 1 }] } } - ], - "title": "Minikube Status", + }, + "gridPos": { "h": 3, "w": 3, "x": 0, "y": 0 }, + "id": 1, + "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "center", "orientation": "auto", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false }, "textMode": "value" }, + "targets": [{ "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "minikube_up", "refId": "A" }], + "title": "Cluster", "type": "stat" }, { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, + "datasource": { "type": "prometheus", "uid": "prometheus" }, "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [ - { - "options": { - "0": { "color": "red", "index": 0, "text": "DOWN" } - }, - "type": "value" - }, - { - "options": { - "1": { "color": "green", "index": 1, "text": "UP" } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { "color": "red", "value": null }, - { "color": "green", "value": 1 } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { "h": 4, "w": 4, "x": 4, "y": 0 }, - "id": 2, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "minikube_apiserver_up", - "refId": "A" + "color": { "mode": "thresholds" }, + "mappings": [{ "options": { "0": { "color": "red", "text": "DOWN" }, "1": { "color": "green", "text": "UP" } }, "type": "value" }], + "thresholds": { "mode": "absolute", "steps": [{ "color": "red", "value": null }, { "color": "green", "value": 1 }] } } - ], + }, + "gridPos": { "h": 3, "w": 3, "x": 3, "y": 0 }, + "id": 2, + "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "center", "orientation": "auto", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false }, "textMode": "value" }, + "targets": [{ "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "minikube_apiserver_up", "refId": "A" }], "title": "API Server", "type": "stat" }, { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { "color": "red", "value": null }, - { "color": "green", "value": 1 } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { "h": 4, "w": 4, "x": 8, "y": 0 }, + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] } } }, + "gridPos": { "h": 3, "w": 3, "x": 6, "y": 0 }, "id": 3, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "minikube_node_count", - "refId": "A" - } - ], - "title": "Node Count", + "options": { "colorMode": "value", "graphMode": "none", "justifyMode": "center", "orientation": "auto", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false }, "textMode": "value" }, + "targets": [{ "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "count(kube_pod_info{namespace=~\"$namespace\"})", "refId": "A" }], + "title": "Pods", "type": "stat" }, { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [{ "color": "green", "value": null }] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { "h": 4, "w": 4, "x": 12, "y": 0 }, + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] } } }, + "gridPos": { "h": 3, "w": 3, "x": 9, "y": 0 }, "id": 4, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "minikube_pod_count", - "refId": "A" - } - ], - "title": "Pod Count", + "options": { "colorMode": "value", "graphMode": "none", "justifyMode": "center", "orientation": "auto", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false }, "textMode": "value" }, + "targets": [{ "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "count(kube_deployment_created{namespace=~\"$namespace\"})", "refId": "A" }], + "title": "Deployments", "type": "stat" }, { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [{ "color": "green", "value": null }] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { "h": 4, "w": 4, "x": 16, "y": 0 }, + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] } } }, + "gridPos": { "h": 3, "w": 3, "x": 12, "y": 0 }, "id": 5, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "minikube_namespace_count", - "refId": "A" - } - ], + "options": { "colorMode": "value", "graphMode": "none", "justifyMode": "center", "orientation": "auto", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false }, "textMode": "value" }, + "targets": [{ "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "count(kube_statefulset_created{namespace=~\"$namespace\"})", "refId": "A" }], + "title": "StatefulSets", + "type": "stat" + }, + { + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] } } }, + "gridPos": { "h": 3, "w": 3, "x": 15, "y": 0 }, + "id": 6, + "options": { "colorMode": "value", "graphMode": "none", "justifyMode": "center", "orientation": "auto", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false }, "textMode": "value" }, + "targets": [{ "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "count(kube_namespace_created)", "refId": "A" }], "title": "Namespaces", "type": "stat" }, { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "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": "never", - "spanNulls": false, - "stacking": { "group": "A", "mode": "none" }, - "thresholdsStyle": { "mode": "off" } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [{ "color": "green", "value": null }] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { "h": 8, "w": 12, "x": 0, "y": 4 }, - "id": 6, - "options": { - "legend": { - "calcs": ["lastNotNull"], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { "mode": "multi", "sort": "desc" } - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "minikube_up", - "legendFormat": "Minikube", - "refId": "A" - }, - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "minikube_apiserver_up", - "legendFormat": "API Server", - "refId": "B" - } - ], - "title": "Cluster Health Over Time", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "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": "never", - "spanNulls": false, - "stacking": { "group": "A", "mode": "none" }, - "thresholdsStyle": { "mode": "off" } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [{ "color": "green", "value": null }] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { "h": 8, "w": 12, "x": 12, "y": 4 }, + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "unit": "bytes", "thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] } } }, + "gridPos": { "h": 3, "w": 3, "x": 18, "y": 0 }, "id": 7, - "options": { - "legend": { - "calcs": ["lastNotNull", "max"], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { "mode": "multi", "sort": "desc" } - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "minikube_pod_count", - "legendFormat": "Pods", - "refId": "A" - }, - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "minikube_namespace_count", - "legendFormat": "Namespaces", - "refId": "B" + "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "center", "orientation": "auto", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false }, "textMode": "value" }, + "targets": [{ "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum(kube_pod_container_resource_requests{resource=\"memory\",namespace=~\"$namespace\"})", "refId": "A" }], + "title": "Memory Requests", + "type": "stat" + }, + { + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "unit": "short", "thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] } } }, + "gridPos": { "h": 3, "w": 3, "x": 21, "y": 0 }, + "id": 8, + "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "center", "orientation": "auto", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false }, "textMode": "value" }, + "targets": [{ "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum(kube_pod_container_resource_requests{resource=\"cpu\",namespace=~\"$namespace\"})", "refId": "A" }], + "title": "CPU Requests (cores)", + "type": "stat" + }, + { + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "fieldConfig": { + "defaults": { + "color": { "mode": "palette-classic" }, + "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "bars", "fillOpacity": 80, "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": "normal" }, "thresholdsStyle": { "mode": "off" } }, + "mappings": [], + "thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] }, + "unit": "short" } - ], - "title": "Resource Counts Over Time", + }, + "gridPos": { "h": 8, "w": 12, "x": 0, "y": 3 }, + "id": 9, + "options": { "legend": { "calcs": ["lastNotNull"], "displayMode": "table", "placement": "right", "showLegend": true, "sortBy": "Last *", "sortDesc": true }, "tooltip": { "mode": "multi", "sort": "desc" } }, + "targets": [{ "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "count by (namespace) (kube_pod_info{namespace=~\"$namespace\"})", "legendFormat": "{{namespace}}", "refId": "A" }], + "title": "Pods by Namespace", "type": "timeseries" }, { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "gridPos": { "h": 10, "w": 24, "x": 0, "y": 12 }, - "id": 8, - "options": { - "dedupStrategy": "none", - "enableLogDetails": true, - "prettifyLogMessage": false, - "showCommonLabels": false, - "showLabels": false, - "showTime": true, - "sortOrder": "Descending", - "wrapLogMessage": false - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "loki", "uid": "loki" }, - "expr": "{host=\"indri\"} |= \"minikube\" or {host=\"indri\"} |= \"kube\"", - "refId": "A" + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "fieldConfig": { + "defaults": { + "color": { "mode": "palette-classic" }, + "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "bars", "fillOpacity": 80, "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": "normal" }, "thresholdsStyle": { "mode": "off" } }, + "mappings": [], + "thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] }, + "unit": "bytes" } + }, + "gridPos": { "h": 8, "w": 12, "x": 12, "y": 3 }, + "id": 10, + "options": { "legend": { "calcs": ["lastNotNull"], "displayMode": "table", "placement": "right", "showLegend": true, "sortBy": "Last *", "sortDesc": true }, "tooltip": { "mode": "multi", "sort": "desc" } }, + "targets": [{ "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum by (namespace) (kube_pod_container_resource_requests{resource=\"memory\",namespace=~\"$namespace\"})", "legendFormat": "{{namespace}}", "refId": "A" }], + "title": "Memory Requests by Namespace", + "type": "timeseries" + }, + { + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "fieldConfig": { + "defaults": { + "color": { "mode": "thresholds" }, + "custom": { "align": "auto", "cellOptions": { "type": "auto" }, "inspect": false }, + "mappings": [], + "thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] } + }, + "overrides": [ + { "matcher": { "id": "byName", "options": "Memory Requests" }, "properties": [{ "id": "unit", "value": "bytes" }] }, + { "matcher": { "id": "byName", "options": "Memory Limits" }, "properties": [{ "id": "unit", "value": "bytes" }] }, + { "matcher": { "id": "byName", "options": "CPU Requests" }, "properties": [{ "id": "unit", "value": "short" }] }, + { "matcher": { "id": "byName", "options": "CPU Limits" }, "properties": [{ "id": "unit", "value": "short" }] } + ] + }, + "gridPos": { "h": 8, "w": 24, "x": 0, "y": 11 }, + "id": 11, + "options": { "cellHeight": "sm", "footer": { "countRows": false, "fields": "", "reducer": ["sum"], "show": false }, "showHeader": true, "sortBy": [{ "desc": true, "displayName": "Pods" }] }, + "targets": [ + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "count by (namespace) (kube_pod_info{namespace=~\"$namespace\"})", "format": "table", "instant": true, "refId": "pods" }, + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum by (namespace) (kube_pod_container_resource_requests{resource=\"memory\",namespace=~\"$namespace\"})", "format": "table", "instant": true, "refId": "mem_req" }, + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum by (namespace) (kube_pod_container_resource_limits{resource=\"memory\",namespace=~\"$namespace\"})", "format": "table", "instant": true, "refId": "mem_lim" }, + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum by (namespace) (kube_pod_container_resource_requests{resource=\"cpu\",namespace=~\"$namespace\"})", "format": "table", "instant": true, "refId": "cpu_req" }, + { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum by (namespace) (kube_pod_container_resource_limits{resource=\"cpu\",namespace=~\"$namespace\"})", "format": "table", "instant": true, "refId": "cpu_lim" } ], - "title": "Kubernetes Related Logs", + "title": "Namespace Resource Summary", + "transformations": [ + { "id": "seriesToColumns", "options": { "byField": "namespace" } }, + { "id": "organize", "options": { "excludeByName": { "Time": true, "Time 1": true, "Time 2": true, "Time 3": true, "Time 4": true, "Time 5": true }, "renameByName": { "Value #pods": "Pods", "Value #mem_req": "Memory Requests", "Value #mem_lim": "Memory Limits", "Value #cpu_req": "CPU Requests", "Value #cpu_lim": "CPU Limits", "namespace": "Namespace" } } } + ], + "type": "table" + }, + { + "datasource": { "type": "loki", "uid": "loki" }, + "gridPos": { "h": 8, "w": 24, "x": 0, "y": 19 }, + "id": 12, + "options": { "dedupStrategy": "none", "enableLogDetails": true, "prettifyLogMessage": false, "showCommonLabels": false, "showLabels": true, "showTime": true, "sortOrder": "Descending", "wrapLogMessage": false }, + "targets": [{ "datasource": { "type": "loki", "uid": "loki" }, "expr": "{namespace=~\"$namespace\"}", "refId": "A" }], + "title": "Pod Logs", "type": "logs" } ], @@ -443,16 +190,31 @@ data: "schemaVersion": 38, "tags": ["minikube", "kubernetes", "k8s"], "templating": { - "list": [] - }, - "time": { - "from": "now-6h", - "to": "now" + "list": [ + { + "current": { "selected": true, "text": "All", "value": "$__all" }, + "datasource": { "type": "prometheus", "uid": "prometheus" }, + "definition": "label_values(kube_namespace_created, namespace)", + "hide": 0, + "includeAll": true, + "label": "Namespace", + "multi": true, + "name": "namespace", + "options": [], + "query": { "query": "label_values(kube_namespace_created, namespace)", "refId": "StandardVariableQuery" }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + } + ] }, + "time": { "from": "now-6h", "to": "now" }, "timepicker": {}, - "timezone": "", + "timezone": "browser", "title": "Minikube Kubernetes", "uid": "minikube", - "version": 1, + "version": 2, "weekStart": "" } -- 2.50.1 (Apple Git-155) From 369a1aa8816bcc636f81b7719cf2d1b81f18cbd2 Mon Sep 17 00:00:00 2001 From: Erich Blume Date: Thu, 22 Jan 2026 13:36:15 -0800 Subject: [PATCH 8/9] Remove transmission metrics exporter (incompatible with Transmission 4) The metalmatze/transmission-exporter is unmaintained and has JSON parsing issues with Transmission 4's API changes. Removing: - Exporter sidecar from transmission deployment - Transmission dashboard from Grafana - Prometheus scrape config for transmission - Metrics port from transmission service TODO: Write custom transmission exporter Co-Authored-By: Claude Opus 4.5 --- .../dashboards/configmap-transmission.yaml | 814 ------------------ .../grafana-config/kustomization.yaml | 1 - argocd/manifests/prometheus/configmap.yaml | 5 - argocd/manifests/torrent/deployment.yaml | 15 - argocd/manifests/torrent/service.yaml | 3 - 5 files changed, 838 deletions(-) delete mode 100644 argocd/manifests/grafana-config/dashboards/configmap-transmission.yaml diff --git a/argocd/manifests/grafana-config/dashboards/configmap-transmission.yaml b/argocd/manifests/grafana-config/dashboards/configmap-transmission.yaml deleted file mode 100644 index 3563ff5..0000000 --- a/argocd/manifests/grafana-config/dashboards/configmap-transmission.yaml +++ /dev/null @@ -1,814 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: grafana-dashboard-transmission - namespace: monitoring - labels: - grafana_dashboard: "1" -data: - transmission.json: | - { - "annotations": { - "list": [] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [], - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { "color": "red", "value": null }, - { "color": "green", "value": 1 } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { "h": 4, "w": 4, "x": 0, "y": 0 }, - "id": 1, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "transmission_up", - "refId": "A" - } - ], - "title": "Transmission Status", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [{ "color": "green", "value": null }] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { "h": 4, "w": 4, "x": 4, "y": 0 }, - "id": 2, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "transmission_torrents_total", - "refId": "A" - } - ], - "title": "Total Torrents", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [{ "color": "blue", "value": null }] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { "h": 4, "w": 4, "x": 8, "y": 0 }, - "id": 3, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "transmission_torrents_active", - "refId": "A" - } - ], - "title": "Active Torrents", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [{ "color": "orange", "value": null }] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { "h": 4, "w": 4, "x": 12, "y": 0 }, - "id": 4, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "transmission_torrents_paused", - "refId": "A" - } - ], - "title": "Paused Torrents", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [{ "color": "green", "value": null }] - }, - "unit": "decbytes" - }, - "overrides": [] - }, - "gridPos": { "h": 4, "w": 4, "x": 16, "y": 0 }, - "id": 5, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "transmission_downloaded_bytes_total", - "refId": "A" - } - ], - "title": "Total Downloaded", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [{ "color": "purple", "value": null }] - }, - "unit": "decbytes" - }, - "overrides": [] - }, - "gridPos": { "h": 4, "w": 4, "x": 20, "y": 0 }, - "id": 6, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "transmission_uploaded_bytes_total", - "refId": "A" - } - ], - "title": "Total Uploaded", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { "color": "red", "value": null }, - { "color": "yellow", "value": 0.5 }, - { "color": "green", "value": 1 } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { "h": 4, "w": 8, "x": 0, "y": 4 }, - "id": 11, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "increase(transmission_uploaded_bytes_total[$__range]) / increase(transmission_downloaded_bytes_total[$__range])", - "refId": "A" - } - ], - "title": "Upload/Download Ratio (Period)", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "green", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [{ "color": "green", "value": null }] - }, - "unit": "decbytes" - }, - "overrides": [] - }, - "gridPos": { "h": 4, "w": 8, "x": 8, "y": 4 }, - "id": 12, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "increase(transmission_downloaded_bytes_total[$__range])", - "refId": "A" - } - ], - "title": "Downloaded (Period)", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "blue", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [{ "color": "blue", "value": null }] - }, - "unit": "decbytes" - }, - "overrides": [] - }, - "gridPos": { "h": 4, "w": 8, "x": 16, "y": 4 }, - "id": 13, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "increase(transmission_uploaded_bytes_total[$__range])", - "refId": "A" - } - ], - "title": "Uploaded (Period)", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "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", "value": null }] - }, - "unit": "Bps" - }, - "overrides": [ - { - "matcher": { "id": "byName", "options": "Download" }, - "properties": [ - { - "id": "color", - "value": { "fixedColor": "green", "mode": "fixed" } - } - ] - }, - { - "matcher": { "id": "byName", "options": "Upload" }, - "properties": [ - { - "id": "color", - "value": { "fixedColor": "blue", "mode": "fixed" } - } - ] - } - ] - }, - "gridPos": { "h": 8, "w": 12, "x": 0, "y": 8 }, - "id": 7, - "options": { - "legend": { - "calcs": ["mean", "max"], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "transmission_download_speed_bytes", - "legendFormat": "Download", - "refId": "A" - }, - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "transmission_upload_speed_bytes", - "legendFormat": "Upload", - "refId": "B" - } - ], - "title": "Transfer Speed", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "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", "value": null }] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { "h": 8, "w": 12, "x": 12, "y": 8 }, - "id": 8, - "options": { - "legend": { - "calcs": ["mean", "max"], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "transmission_torrents_total", - "legendFormat": "Total", - "refId": "A" - }, - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "transmission_torrents_active", - "legendFormat": "Active", - "refId": "B" - }, - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "transmission_torrents_paused", - "legendFormat": "Paused", - "refId": "C" - } - ], - "title": "Torrent Count", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "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", "value": null }] - }, - "unit": "Bps" - }, - "overrides": [ - { - "matcher": { "id": "byName", "options": "Download Rate" }, - "properties": [ - { - "id": "color", - "value": { "fixedColor": "green", "mode": "fixed" } - } - ] - }, - { - "matcher": { "id": "byName", "options": "Upload Rate" }, - "properties": [ - { - "id": "color", - "value": { "fixedColor": "blue", "mode": "fixed" } - } - ] - } - ] - }, - "gridPos": { "h": 8, "w": 24, "x": 0, "y": 16 }, - "id": 9, - "options": { - "legend": { - "calcs": ["mean", "max", "lastNotNull"], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "rate(transmission_downloaded_bytes_total[5m])", - "legendFormat": "Download Rate", - "refId": "A" - }, - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "rate(transmission_uploaded_bytes_total[5m])", - "legendFormat": "Upload Rate", - "refId": "B" - } - ], - "title": "Cumulative Transfer Rate (5m avg)", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "fixed", - "fixedColor": "semi-dark-purple" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [{ "color": "green", "value": null }] - }, - "unit": "decbytes" - }, - "overrides": [] - }, - "gridPos": { "h": 8, "w": 24, "x": 0, "y": 24 }, - "id": 10, - "options": { - "legend": { - "calcs": ["lastNotNull", "min", "max"], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "transmission_torrents_size_bytes", - "legendFormat": "Total Torrent Size", - "refId": "A" - } - ], - "title": "Total Torrent Size", - "type": "timeseries" - } - ], - "refresh": "30s", - "schemaVersion": 38, - "tags": ["transmission", "bittorrent"], - "templating": { - "list": [] - }, - "time": { - "from": "now-6h", - "to": "now" - }, - "timepicker": {}, - "timezone": "browser", - "title": "Transmission", - "uid": "transmission", - "version": 1, - "weekStart": "" - } diff --git a/argocd/manifests/grafana-config/kustomization.yaml b/argocd/manifests/grafana-config/kustomization.yaml index 7daee90..e10f437 100644 --- a/argocd/manifests/grafana-config/kustomization.yaml +++ b/argocd/manifests/grafana-config/kustomization.yaml @@ -14,5 +14,4 @@ resources: - dashboards/configmap-plex.yaml - dashboards/configmap-postgresql.yaml - dashboards/configmap-services.yaml - - dashboards/configmap-transmission.yaml - dashboards/configmap-zot.yaml diff --git a/argocd/manifests/prometheus/configmap.yaml b/argocd/manifests/prometheus/configmap.yaml index 611e9b5..cc43999 100644 --- a/argocd/manifests/prometheus/configmap.yaml +++ b/argocd/manifests/prometheus/configmap.yaml @@ -37,11 +37,6 @@ data: static_configs: - targets: ["loki.monitoring.svc.cluster.local:3100"] - # Transmission metrics (via exporter sidecar) - - job_name: "transmission" - static_configs: - - targets: ["transmission.torrent.svc.cluster.local:19091"] - # Kubernetes state metrics (pods, deployments, resource usage, etc.) - job_name: "kube-state-metrics" static_configs: diff --git a/argocd/manifests/torrent/deployment.yaml b/argocd/manifests/torrent/deployment.yaml index 32b5dec..78bc436 100644 --- a/argocd/manifests/torrent/deployment.yaml +++ b/argocd/manifests/torrent/deployment.yaml @@ -55,21 +55,6 @@ spec: port: 9091 initialDelaySeconds: 10 periodSeconds: 10 - - name: exporter - image: metalmatze/transmission-exporter:latest - env: - - name: TRANSMISSION_ADDR - value: "http://localhost:9091" - ports: - - containerPort: 19091 - name: metrics - resources: - requests: - memory: "32Mi" - cpu: "10m" - limits: - memory: "64Mi" - cpu: "50m" volumes: - name: downloads persistentVolumeClaim: diff --git a/argocd/manifests/torrent/service.yaml b/argocd/manifests/torrent/service.yaml index a54fc93..51f7592 100644 --- a/argocd/manifests/torrent/service.yaml +++ b/argocd/manifests/torrent/service.yaml @@ -11,6 +11,3 @@ spec: - name: web port: 9091 targetPort: 9091 - - name: metrics - port: 19091 - targetPort: 19091 -- 2.50.1 (Apple Git-155) From 5f9ed589d4902563a7f283ff860f429adec4e9e1 Mon Sep 17 00:00:00 2001 From: Erich Blume Date: Thu, 22 Jan 2026 13:44:43 -0800 Subject: [PATCH 9/9] Fix macOS dashboard instance variable to only show macOS hosts Use node_memory_wired_bytes (macOS-specific metric) instead of node_uname_info to populate the instance dropdown. This prevents Linux hosts like sifaka from appearing in the macOS dashboard. Co-Authored-By: Claude Opus 4.5 --- .../manifests/grafana-config/dashboards/configmap-macos.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/argocd/manifests/grafana-config/dashboards/configmap-macos.yaml b/argocd/manifests/grafana-config/dashboards/configmap-macos.yaml index aea4192..a9089f0 100644 --- a/argocd/manifests/grafana-config/dashboards/configmap-macos.yaml +++ b/argocd/manifests/grafana-config/dashboards/configmap-macos.yaml @@ -1263,7 +1263,7 @@ data: { "current": {}, "datasource": { "type": "prometheus", "uid": "prometheus" }, - "definition": "label_values(node_uname_info, instance)", + "definition": "label_values(node_memory_wired_bytes, instance)", "hide": 0, "includeAll": false, "label": "Instance", @@ -1271,7 +1271,7 @@ data: "name": "instance", "options": [], "query": { - "query": "label_values(node_uname_info, instance)", + "query": "label_values(node_memory_wired_bytes, instance)", "refId": "StandardVariableQuery" }, "refresh": 1, -- 2.50.1 (Apple Git-155)