{"id":13563451,"url":"https://github.com/dotdc/grafana-dashboards-kubernetes","last_synced_at":"2025-05-13T23:10:43.942Z","repository":{"id":37469198,"uuid":"297974542","full_name":"dotdc/grafana-dashboards-kubernetes","owner":"dotdc","description":"A set of modern Grafana dashboards for Kubernetes.","archived":false,"fork":false,"pushed_at":"2025-04-18T14:32:57.000Z","size":571,"stargazers_count":2898,"open_issues_count":2,"forks_count":404,"subscribers_count":43,"default_branch":"master","last_synced_at":"2025-04-19T04:12:41.831Z","etag":null,"topics":["dashboard","dashboards","grafana","grafana-dashboard","grafana-dashboards","grafana-prometheus","hacktoberfest","kube-state-metrics","kubernetes","kubernetes-monitoring","monitoring","monitoring-dashboard","node-exporter","o11y","observability","prometheus","prometheus-metrics","prometheus-node-exporter"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dotdc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-23T13:13:13.000Z","updated_at":"2025-04-18T14:32:36.000Z","dependencies_parsed_at":"2023-09-24T08:14:06.020Z","dependency_job_id":"be158ad5-2524-44d0-bd33-05cbf7b41659","html_url":"https://github.com/dotdc/grafana-dashboards-kubernetes","commit_stats":{"total_commits":266,"total_committers":35,"mean_commits":7.6,"dds":0.518796992481203,"last_synced_commit":"dc731ac88620064f2486f63612a5df73cca53cde"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotdc%2Fgrafana-dashboards-kubernetes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotdc%2Fgrafana-dashboards-kubernetes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotdc%2Fgrafana-dashboards-kubernetes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotdc%2Fgrafana-dashboards-kubernetes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dotdc","download_url":"https://codeload.github.com/dotdc/grafana-dashboards-kubernetes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254042329,"owners_count":22004901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dashboard","dashboards","grafana","grafana-dashboard","grafana-dashboards","grafana-prometheus","hacktoberfest","kube-state-metrics","kubernetes","kubernetes-monitoring","monitoring","monitoring-dashboard","node-exporter","o11y","observability","prometheus","prometheus-metrics","prometheus-node-exporter"],"created_at":"2024-08-01T13:01:19.408Z","updated_at":"2025-05-13T23:10:38.923Z","avatar_url":"https://github.com/dotdc.png","language":null,"funding_links":[],"categories":["Others","monitoring"],"sub_categories":[],"readme":"# grafana-dashboards-kubernetes \u003c!-- omit in toc --\u003e\n\n![logo](https://raw.githubusercontent.com/dotdc/media/main/grafana-dashboards-kubernetes/kubernetes-grafana-dashboards-logo.png)\n\n## Table of contents \u003c!-- omit in toc --\u003e\n\n- [Description](#description)\n- [Releases](#releases)\n- [Features](#features)\n- [Dashboards](#dashboards)\n- [Installation](#installation)\n  - [Install manually](#install-manually)\n  - [Install via grafana.com](#install-via-grafanacom)\n  - [Install with ArgoCD](#install-with-argocd)\n  - [Install with Helm values](#install-with-helm-values)\n  - [Install as ConfigMaps](#install-as-configmaps)\n  - [Install as ConfigMaps with Terraform](#install-as-configmaps-with-terraform)\n- [Known issue(s)](#known-issues)\n  - [Broken panels due to a too-high resolution](#broken-panels-due-to-a-too-high-resolution)\n  - [Broken panels on k8s-views-nodes when a node changes its IP address](#broken-panels-on-k8s-views-nodes-when-a-node-changes-its-ip-address)\n  - [Broken panels on k8s-views-nodes due to the nodename label](#broken-panels-on-k8s-views-nodes-due-to-the-nodename-label)\n- [Contributing](#contributing)\n\n## Description\n\nThis repository contains a modern set of [Grafana](https://github.com/grafana/grafana) dashboards for [Kubernetes](https://github.com/kubernetes/kubernetes).\\\nThey are inspired by many other dashboards from `kubernetes-mixin` and `grafana.com`.\n\nMore information about them in my article: [A set of modern Grafana dashboards for Kubernetes](https://0xdc.me/blog/a-set-of-modern-grafana-dashboards-for-kubernetes/)\n\nYou can also download them on [Grafana.com](https://grafana.com/grafana/dashboards/?plcmt=top-nav\u0026cta=downloads\u0026search=dotdc).\n\n## Releases\n\nThis repository follows [semantic versioning](https://semver.org) for releases.\\\nIt relies on [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) to automate releases using [semantic-release](https://github.com/semantic-release/semantic-release).\n\n## Features\n\nThese dashboards are made and tested for the [kube-prometheus-stack](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack) chart, but they should work well with others as soon as you have [kube-state-metrics](https://github.com/kubernetes/kube-state-metrics) and [prometheus-node-exporter](https://github.com/prometheus/node_exporter) installed on your Kubernetes cluster.\n\nThey are not backward compatible with older Grafana versions because they try to take advantage of Grafana's newest features like:\n\n- `gradient mode` introduced in Grafana 8.1 ([Grafana Blog post](https://grafana.com/blog/2021/09/10/new-in-grafana-8.1-gradient-mode-for-time-series-visualizations-and-dynamic-panel-configuration/))\n- `time series` visualization panel introduced in Grafana 7.4 ([Grafana Blog post](https://grafana.com/blog/2021/02/10/how-the-new-time-series-panel-brings-major-performance-improvements-and-new-visualization-features-to-grafana-7.4/))\n- `$__rate_interval` variable introduced in Grafana 7.2 ([Grafana Blog post](https://grafana.com/blog/2020/09/28/new-in-grafana-7.2-__rate_interval-for-prometheus-rate-queries-that-just-work/))\n\nThey also have a `Prometheus Datasource` variable so they will work on a federated Grafana instance.\n\nAs an example, here's how the `Kubernetes / Views / Global` dashboard looks like:\n\n![screenshot](https://raw.githubusercontent.com/dotdc/media/main/grafana-dashboards-kubernetes/k8s-views-global.png \"Kubernetes Global View Screenshot\")\n\n## Dashboards\n\n| File name                  | Description | Screenshot |\n|:---------------------------|:------------|:----------:|\n| k8s-addons-prometheus.json | Dashboard for Prometheus. | [LINK](https://raw.githubusercontent.com/dotdc/media/main/grafana-dashboards-kubernetes/k8s-addons-prometheus.png) |\n| k8s-addons-trivy-operator.json | Dashboard for the Trivy Operator from Aqua Security. | [LINK](https://raw.githubusercontent.com/dotdc/media/main/grafana-dashboards-kubernetes/k8s-addons-trivy-operator.png) |\n| k8s-system-api-server.json | Dashboard for the API Server Kubernetes component. | [LINK](https://raw.githubusercontent.com/dotdc/media/main/grafana-dashboards-kubernetes/k8s-system-api-server.png) |\n| k8s-system-coredns.json    | Show information on the CoreDNS Kubernetes component. | [LINK](https://raw.githubusercontent.com/dotdc/media/main/grafana-dashboards-kubernetes/k8s-system-coredns.png) |\n| k8s-views-global.json      | `Global` level view dashboard for Kubernetes. | [LINK](https://raw.githubusercontent.com/dotdc/media/main/grafana-dashboards-kubernetes/k8s-views-global.png) |\n| k8s-views-namespaces.json  | `Namespaces` level view dashboard for Kubernetes. | [LINK](https://raw.githubusercontent.com/dotdc/media/main/grafana-dashboards-kubernetes/k8s-views-namespaces.png) |\n| k8s-views-nodes.json       | `Nodes` level view dashboard for Kubernetes. | [LINK](https://raw.githubusercontent.com/dotdc/media/main/grafana-dashboards-kubernetes/k8s-views-nodes.png) |\n| k8s-views-pods.json        | `Pods` level view dashboard for Kubernetes. | [LINK](https://raw.githubusercontent.com/dotdc/media/main/grafana-dashboards-kubernetes/k8s-views-pods.png) |\n\n## Installation\n\nIn most cases, you will need to clone this repository (or your fork):\n\n```terminal\ngit clone https://github.com/dotdc/grafana-dashboards-kubernetes.git\ncd grafana-dashboards-kubernetes\n```\n\nIf you plan to deploy these dashboards using [ArgoCD](#install-with-argocd), [ConfigMaps](#install-as-configmaps) or [Terraform](#install-as-configmaps-with-terraform), you will also need to enable and configure the `dashboards sidecar` on the Grafana Helm chart to get the dashboards loaded in your Grafana instance:\n\n```yaml\n# kube-prometheus-stack values\ngrafana:\n  sidecar:\n    dashboards:\n      enabled: true\n      defaultFolderName: \"General\"\n      label: grafana_dashboard\n      labelValue: \"1\"\n      folderAnnotation: grafana_folder\n      searchNamespace: ALL\n      provider:\n        foldersFromFilesStructure: true\n```\n\n### Install manually\n\nOn the WebUI of your Grafana instance, put your mouse over the `+` sign on the left menu, then click on `Import`.\\\nOnce you are on the Import page, you can upload the JSON files one by one from your local copy using the `Upload JSON file` button.\n\n### Install via grafana.com\n\nOn the WebUI of your Grafana instance, put your mouse over the `+` sign on the left menu, then click on `Import`.\\\nOnce you are on the Import page, you can put the grafana.com dashboard ID (see table below) under `Import via grafana.com` then click on the `Load` button. Repeat for each dashboard.\n\nGrafana.com dashboard id list:\n\n| Dashboard                          | ID    |\n|:-----------------------------------|:------|\n| k8s-addons-prometheus.json         | 19105 |\n| k8s-addons-trivy-operator.json     | 16337 |\n| k8s-system-api-server.json         | 15761 |\n| k8s-system-coredns.json            | 15762 |\n| k8s-views-global.json              | 15757 |\n| k8s-views-namespaces.json          | 15758 |\n| k8s-views-nodes.json               | 15759 |\n| k8s-views-pods.json                | 15760 |\n\n### Install with ArgoCD\n\nIf you are using ArgoCD, this will deploy the dashboards in the default project of ArgoCD:\n\n```terminal\nkubectl apply -f argocd-app.yml\n```\n\nYou will also need to enable and configure the Grafana `dashboards sidecar` as described in [Installation](#installation).\n\n### Install with Helm values\n\nIf you use the official Grafana helm chart or kube-prometheus-stack, you can install the dashboards directly using the `dashboardProviders` \u0026 `dashboards` helm chart values.\n\nDepending on your setup, add or merge the following block example to your helm chart values.\\\nThe example is for [kube-prometheus-stack](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack), for the official [Grafana helm chart](https://github.com/grafana/helm-charts/tree/main/charts/grafana), remove the first line (`grafana:`), and reduce the indentation level of the entire block.\n\n```yaml\ngrafana:\n  # Provision grafana-dashboards-kubernetes\n  dashboardProviders:\n    dashboardproviders.yaml:\n      apiVersion: 1\n      providers:\n      - name: 'grafana-dashboards-kubernetes'\n        orgId: 1\n        folder: 'Kubernetes'\n        type: file\n        disableDeletion: true\n        editable: true\n        options:\n          path: /var/lib/grafana/dashboards/grafana-dashboards-kubernetes\n  dashboards:\n    grafana-dashboards-kubernetes:\n      k8s-system-api-server:\n        url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-system-api-server.json\n        token: ''\n      k8s-system-coredns:\n        url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-system-coredns.json\n        token: ''\n      k8s-views-global:\n        url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-global.json\n        token: ''\n      k8s-views-namespaces:\n        url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-namespaces.json\n        token: ''\n      k8s-views-nodes:\n        url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-nodes.json\n        token: ''\n      k8s-views-pods:\n        url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-pods.json\n        token: ''\n```\n\n### Install as ConfigMaps\n\nGrafana dashboards can be provisioned as Kubernetes ConfigMaps if you configure the [dashboard sidecar](https://github.com/grafana/helm-charts/blob/main/charts/grafana/values.yaml#L667) available on the official [Grafana Helm Chart](https://github.com/grafana/helm-charts/tree/main/charts/grafana).\n\nTo build the ConfigMaps and output them on STDOUT :\n\n```terminal\nkubectl kustomize .\n```\n\n*Note: no namespace is set by default, you can change that in the `kustomization.yaml` file.*\n\nTo build and deploy them directly on your Kubernetes cluster :\n\n```terminal\nkubectl apply -k . -n monitoring\n```\n\nYou will also need to enable and configure the Grafana `dashboards sidecar` as described in [Installation](#installation).\n\n*Note: you can change the namespace if needed.*\n\n### Install as ConfigMaps with Terraform\n\nIf you use Terraform to provision your Kubernetes resources, you can convert the generated ConfigMaps to Terraform code using [tfk8s](https://github.com/jrhouston/tfk8s).\n\nTo build and convert ConfigMaps to Terraform code :\n\n```terminal\nkubectl kustomize . | tfk8s\n```\n\nYou will also need to enable and configure the Grafana `dashboards sidecar` as described in [Installation](#installation).\n\n*Note: no namespace is set by default, you can change that in the `kustomization.yaml` file.*\n\n## Known issue(s)\n\n### Broken panels due to a too-high resolution\n\nA user reported in [#50](https://github.com/dotdc/grafana-dashboards-kubernetes/issues/50) that some panels were broken because the default value of the `$resolution` variable was too low. The root cause hasn't been identified precisely, but he was using Grafana Agent \u0026 Grafana Mimir. Changing the `$resolution` variable to a higher value (a lower resolution) will likely solve the issue.\nTo make the fix permanent, you can configure the `Scrape interval` in your Grafana Datasource to a working value for your setup.\n\n### Broken panels on k8s-views-nodes when a node changes its IP address\n\nTo make this dashboard more convenient, there's a small variable hack to display `node` instead of `instance`.\nBecause of that, some panels could lack data when a node changes its IP address as reported in [#102](https://github.com/dotdc/grafana-dashboards-kubernetes/issues/102).\n\nNo easy fix for this scenario yet, but it should be a corner case for most people.\nFeel free to reopen the issue if you have ideas to fix this.\n\n### Broken panels on k8s-views-nodes due to the nodename label\n\nThe `k8s-views-nodes` dashboard will have many broken panels if the `node` label from `kube_node_info` doesn't match the `nodename` label from `node_uname_info`.\n\nThis situation can happen on certain deployments of the node exporter running inside Kubernetes(e.g. via a `DaemonSet`), where `nodename` takes a different value than the node name as understood by the Kubernetes API.\n\nBelow are some ways to relabel the metric to force the `nodename` label to the appropriate value, depending on the way the collection agent is deployed:\n\n#### Directly through the Prometheus configuration file \u003c!-- omit in toc --\u003e\n\nAssuming the node exporter job is defined through `kubernetes_sd_config`, you can take advantage of the internal discovery labels and fix this by adding the following relabeling rule to the job:\n\n```yaml\n# File: prometheus.yaml\nscrape_configs:\n- job_name: node-exporter\n  relabel_configs:\n  # Add this\n  - action: replace\n    source_labels: [ __meta_kubernetes_pod_node_name]\n    target_label: nodename\n```\n\n#### Through a `ServiceMonitor` \u003c!-- omit in toc --\u003e\n\nIf using the Prometheus operator or the Grafana agent in operator mode, the scrape job should instead be configured via a `ServiceMonitor` that will dynamically edit the Prometheus configuration file. In that case, the relabeling has a slightly different syntax:\n\n```yaml\n# File: service-monitor.yaml\napiVersion: monitoring.coreos.com/v1\nkind: ServiceMonitor\n  endpoints:\n  - port: http-metrics\n    relabelings:\n    # Add this\n    - action: replace\n      sourceLabels: [ __meta_kubernetes_node_name]\n      targetLabel: nodename\n```\n\nAs a convenience, if using the [kube-prometheus-stack helm chart](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack), this added rule can be directly specified in your values.yaml:\n\n```yaml\n# File: kube-prometheus-stack-values.yaml\nprometheus-node-exporter:\n  prometheus:\n    monitor:\n      relabelings:\n      - action: replace\n        sourceLabels: [__meta_kubernetes_pod_node_name]\n        targetLabel: nodename\n```\n\n#### With Grafana Agent Flow mode \u003c!-- omit in toc --\u003e\n\nThe Grafana Agent can [bundle its own node_exporter](https://grafana.com/docs/agent/v0.33/flow/reference/components/prometheus.exporter.unix/). In that case, relabeling can be done this way:\n\n```river\nprometheus.exporter.unix {\n}\n\nprometheus.scrape \"node_exporter\" {\n  targets = prometheus.exporter.unix.targets\n  forward_to = [prometheus.relabel.node_exporter.receiver]\n\n  job_name = \"node-exporter\"\n}\n\nprometheus.relabel \"node_exporter\" {\n  forward_to = [prometheus.remote_write.sink.receiver]\n\n  rule {\n    replacement = env(\"HOSTNAME\")\n    target_label = \"nodename\"\n  }\n\n  rule {\n    # The default job name is \"integrations/node_exporter\" and needs to be replaced\n    replacement = \"node-exporter\"\n    target_label = \"job\"\n  }\n}\n```\n\nThe `HOSTNAME` environment variable is injected by default by the [Grafana Agent helm chart](https://github.com/grafana/agent/blob/93cb1a2718f6fc90fd06ef33b6bcff519dbed662/operations/helm/charts/grafana-agent/templates/containers/_agent.yaml#L25)\n\n## Contributing\n\nFeel free to contribute to this project:\n\n- Give a GitHub ⭐ if you like it\n- Create an [Issue](https://github.com/dotdc/grafana-dashboards-kubernetes/issues) to make a feature request, report a bug or share an idea.\n- Create a [Pull Request](https://github.com/dotdc/grafana-dashboards-kubernetes/pulls) if you want to share code or anything useful to this project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotdc%2Fgrafana-dashboards-kubernetes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdotdc%2Fgrafana-dashboards-kubernetes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotdc%2Fgrafana-dashboards-kubernetes/lists"}