diff --git a/.github/labels.yaml b/.github/labels.yaml index 87e8db4c4b..e4eb448e0b 100644 --- a/.github/labels.yaml +++ b/.github/labels.yaml @@ -33,6 +33,8 @@ color: "ffc300" - name: renovate/terraform color: "ffc300" +- name: renovate/grafana-dashboard + color: "ffc300" # Semantic Type - name: type/digest color: "FFEC19" diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 230ec22916..4bb1e31370 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -75,8 +75,29 @@ ], "datasourceTemplate": "docker", "versioningTemplate": "redhat" + }, + { + "description": "Process Grafana dashboards", + "fileMatch": [ + "(^|/)kubernetes/.+\\.ya?ml(\\.j2)?$" + ], + "matchStrings": [ + "#\\s+renovate:\\s+depName=\"(?.*)\"\\n\\s+gnetId:\\s+(?.*?)\\n\\s+revision:\\s+(?.*)" + ], + "customType": "regex", + "versioningTemplate": "regex:^(?\\d+)$", + "datasourceTemplate": "custom.grafana-dashboards" } ], + "customDatasources": { + "grafana-dashboards": { + "defaultRegistryUrlTemplate": "https://grafana.com/api/dashboards/{{packageName}}", + "format": "json", + "transformTemplates": [ + "{\"releases\":[{\"version\": $string(revision)}]}" + ] + } + }, "packageRules": [ { "description": "Loose versioning for non-semver packages", diff --git a/.github/renovate/commitMessage.json5 b/.github/renovate/commitMessage.json5 index 6142858ce3..2e3364c1d5 100644 --- a/.github/renovate/commitMessage.json5 +++ b/.github/renovate/commitMessage.json5 @@ -11,6 +11,11 @@ { "matchDatasources": ["docker"], "commitMessageTopic": "image {{depName}}" + }, + { + "matchDatasources": ["custom.grafana-dashboards"], + "commitMessageTopic": "dashboard {{depName}}", + "commitMessageExtra": "to v{{newVersion}}" } ] } \ No newline at end of file diff --git a/.github/renovate/labels.json5 b/.github/renovate/labels.json5 index c2e371547e..1f146925f2 100644 --- a/.github/renovate/labels.json5 +++ b/.github/renovate/labels.json5 @@ -44,6 +44,10 @@ { "matchDatasources": ["pypi"], "addLabels": ["renovate/pip"] + }, + { + "matchDatasources": ["custom.grafana-dashboards"], + "addLabels": ["renovate/grafana-dashboard"] } ] } \ No newline at end of file diff --git a/.github/renovate/semanticCommits.json5 b/.github/renovate/semanticCommits.json5 index 5c23fce028..16be6ec855 100644 --- a/.github/renovate/semanticCommits.json5 +++ b/.github/renovate/semanticCommits.json5 @@ -110,6 +110,11 @@ "matchUpdateTypes": ["patch"], "semanticCommitType": "fix", "semanticCommitScope": "github-action" + }, + { + "matchDatasources": ["custom.grafana-dashboards"], + "matchUpdateTypes": ["major"], + "commitMessagePrefix": "feat(grafana-dashboard)!: " } ] } \ No newline at end of file diff --git a/kubernetes/apps/monitoring/grafana/app/helmrelease.yaml b/kubernetes/apps/monitoring/grafana/app/helmrelease.yaml index c4f5ad3aaa..24eb2dc849 100644 --- a/kubernetes/apps/monitoring/grafana/app/helmrelease.yaml +++ b/kubernetes/apps/monitoring/grafana/app/helmrelease.yaml @@ -186,29 +186,35 @@ spec: dashboards: default: node-exporter-full: - gnetId: 1860 # https://grafana.com/grafana/dashboards/1860?tab=revisions + # renovate: depName="Node Exporter Full" + gnetId: 1860 revision: 31 datasource: Prometheus redis: - gnetId: 763 # https://grafana.com/grafana/dashboards/763?tab=revisions + # renovate: depName="Redis Dashboard for Prometheus Redis Exporter 1.x" + gnetId: 763 revision: 5 datasource: Prometheus external-dns: - gnetId: 15038 # https://grafana.com/grafana/dashboards/15038?tab=revisions + # renovate: depName="External-dns" + gnetId: 15038 revision: 1 datasource: Prometheus blackbox-exporter: - gnetId: 7587 # https://grafana.com/grafana/dashboards/7587?tab=revisions + # renovate: depName="Prometheus Blackbox Exporter" + gnetId: 7587 revision: 3 datasource: Prometheus cloudflared: - gnetId: 17457 # https://grafana.com/grafana/dashboards/17457?tab=revisions + # renovate: depName="Cloudflare Tunnels (cloudflared)" + gnetId: 17457 revision: 6 datasource: - name: DS_PROMETHEUS value: Prometheus speedtest-exporter: - gnetId: 13665 # https://grafana.com/grafana/dashboards/13665?tab=revisions + # renovate: depName="Speedtest-Exporter Dashboard" + gnetId: 13665 revision: 4 datasource: - name: DS_PROMETHEUS @@ -224,15 +230,18 @@ spec: datasource: Prometheus ceph: ceph-cluster: - gnetId: 2842 # https://grafana.com/grafana/dashboards/2842?tab=revisions + # renovate: depName="Ceph Cluster" + gnetId: 2842 revision: 17 datasource: Prometheus ceph-osd: - gnetId: 5336 # https://grafana.com/grafana/dashboards/5336?tab=revisions + # renovate: depName="Ceph - OSD (Single)" + gnetId: 5336 revision: 9 datasource: Prometheus ceph-pools: - gnetId: 5342 # https://grafana.com/grafana/dashboards/5342?tab=revisions + # renovate: depName="Ceph - Pools" + gnetId: 5342 revision: 9 datasource: Prometheus flux: @@ -265,7 +274,8 @@ spec: url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-pods.json datasource: Prometheus kubernetes-volumes: - gnetId: 11454 # https://grafana.com/grafana/dashboards/11454?tab=revisions + # renovate: depName="K8s / Storage / Volumes / Cluster" + gnetId: 11454 revision: 14 datasource: Prometheus nginx: @@ -277,7 +287,8 @@ spec: datasource: Prometheus blocky: blocky: - gnetId: 13768 # https://grafana.com/grafana/dashboards/13768?tab=revisions + # renovate: depName="blocky" + gnetId: 13768 revision: 3 datasource: - name: DS_PROMETHEUS @@ -317,19 +328,23 @@ spec: datasource: Prometheus unifi: unifi-insights: - gnetId: 11315 # https://grafana.com/grafana/dashboards/11315?tab=revisions + # renovate: depName="UniFi-Poller: Client Insights - Prometheus" + gnetId: 11315 revision: 9 datasource: Prometheus unifi-network-sites: - gnetId: 11311 # https://grafana.com/grafana/dashboards/11311?tab=revisions + # renovate: depName="UniFi-Poller: Network Sites - Prometheus" + gnetId: 11311 revision: 5 datasource: Prometheus unifi-uap: - gnetId: 11314 # https://grafana.com/grafana/dashboards/11314?tab=revisions + # renovate: depName="UniFi-Poller: UAP Insights - Prometheus" + gnetId: 11314 revision: 10 datasource: Prometheus unifi-usw: - gnetId: 11312 # https://grafana.com/grafana/dashboards/11312?tab=revisions + # renovate: depName="UniFi-Poller: USW Insights - Prometheus" + gnetId: 11312 revision: 9 datasource: Prometheus media: @@ -345,7 +360,8 @@ spec: - name: DS_PROMETHEUS value: Prometheus unpackerr: - gnetId: 18817 # https://grafana.com/grafana/dashboards/18817?tab=revisions + # renovate: depName="Unpackerr" + gnetId: 18817 revision: 1 datasource: - name: DS_PROMETHEUS