├── dashboards ├── .templateignore ├── k8s-system-api-server.json ├── k8s-system-coredns.json └── k8s-addons-trivy-operator.json ├── .github ├── CODEOWNERS ├── PULL_REQUEST_TEMPLATE.md ├── workflows │ ├── pre-commit-checks.yml │ └── release.yml └── ISSUE_TEMPLATE │ ├── feature_request.yml │ └── bug_report.yml ├── .releaserc.json ├── .pre-commit-config.yaml ├── argocd-app.yml ├── CONTRIBUTING.md ├── kustomization.yaml ├── CODE_OF_CONDUCT.md ├── LICENSE └── README.md /dashboards/.templateignore: -------------------------------------------------------------------------------- 1 | *.json 2 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # CODEOWNERS 2 | # https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners 3 | * @dotdc -------------------------------------------------------------------------------- /.releaserc.json: -------------------------------------------------------------------------------- 1 | { 2 | "branches": [ 3 | "master" 4 | ], 5 | "plugins": [ 6 | "@semantic-release/commit-analyzer", 7 | "@semantic-release/release-notes-generator", 8 | "@semantic-release/github" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | # Pull Request 2 | 3 | ## Required Fields 4 | 5 | ### :mag_right: What kind of change is it? 6 | 7 | - fix | feat | docs | chore | ci 8 | 9 | ### :dart: What has been changed and why do we need it? 10 | 11 | - ... 12 | 13 | ## Optional Fields 14 | 15 | ### :heavy_check_mark: Which issue(s) this PR fixes? 16 | 17 | - ... 18 | 19 | ### :speech_balloon: Additional information? 20 | 21 | - ... 22 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | # Doc: https://pre-commit.com 2 | 3 | repos: 4 | # Default pre-commit hooks 5 | - repo: https://github.com/pre-commit/pre-commit-hooks 6 | rev: v6.0.0 7 | hooks: 8 | - id: check-json 9 | - id: check-yaml 10 | - id: check-added-large-files 11 | - id: check-merge-conflict 12 | - id: mixed-line-ending 13 | - id: trailing-whitespace 14 | 15 | # Typos 16 | - repo: https://github.com/crate-ci/typos 17 | rev: v1.36.2 18 | hooks: 19 | - id: typos 20 | 21 | # Markdown linter 22 | - repo: https://github.com/igorshubovych/markdownlint-cli 23 | rev: v0.45.0 24 | hooks: 25 | - id: markdownlint 26 | args: 27 | - "--disable=MD013" 28 | -------------------------------------------------------------------------------- /argocd-app.yml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: grafana-dashboards-kubernetes 5 | namespace: argocd 6 | labels: 7 | app.kubernetes.io/name: grafana-dashboards-kubernetes 8 | app.kubernetes.io/version: HEAD 9 | app.kubernetes.io/managed-by: argocd 10 | finalizers: 11 | - resources-finalizer.argocd.argoproj.io 12 | spec: 13 | project: default # You may need to change this! 14 | source: 15 | path: ./ 16 | repoURL: https://github.com/dotdc/grafana-dashboards-kubernetes 17 | targetRevision: HEAD 18 | 19 | destination: 20 | server: https://kubernetes.default.svc 21 | namespace: monitoring 22 | syncPolicy: 23 | ## https://argo-cd.readthedocs.io/en/stable/user-guide/auto_sync 24 | automated: 25 | prune: true 26 | selfHeal: true 27 | syncOptions: 28 | - CreateNamespace=true 29 | - Replace=true 30 | -------------------------------------------------------------------------------- /.github/workflows/pre-commit-checks.yml: -------------------------------------------------------------------------------- 1 | name: pre-commit-checks 2 | 3 | # Doc: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions 4 | 5 | on: 6 | push: 7 | branches: 8 | - master 9 | pull_request: 10 | branches: 11 | - master 12 | # Allow this workflow to be manually triggered 13 | workflow_dispatch: 14 | 15 | jobs: 16 | pre-commit-checks: 17 | runs-on: ubuntu-latest 18 | steps: 19 | # Doc: https://github.com/marketplace/actions/checkout 20 | - name: Checkout ${{ github.repository }} 21 | uses: actions/checkout@v5 22 | 23 | # Doc: https://github.com/marketplace/actions/setup-python 24 | - name: Setup Python 25 | uses: actions/setup-python@v6 26 | 27 | # Install pre-commit 28 | - name: Install pre-commit 29 | run: pip install pre-commit 30 | 31 | # Run pre-commit checks 32 | - name: Run pre-commit checks 33 | run: pre-commit run --all-files 34 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing Guidelines 2 | 3 | Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms. 4 | 5 | ## Project Scope 6 | 7 | This project aims to offer a set of modern Grafana dashboards for Kubernetes.\ 8 | Because setups could be very diverse, it is not possible to make theses dashboards universal.\ 9 | Changes are welcome as soon as they work with [kube-prometheus-stack](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack). 10 | 11 | ## How to Contribute 12 | 13 | - **Submit an issue :** to report a bug, share an idea or open a discussion. 14 | - **Submit a pull request:** to share a fix or a feature. 15 | 16 | ## Best practices 17 | 18 | - Bump dashboard(s) version(s) 19 | - [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) is preferred 20 | - [Signed commits](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---signoff) is preferred 21 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: release 2 | 3 | # Doc: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions 4 | 5 | on: 6 | push: 7 | branches: 8 | - master 9 | paths: 10 | - 'dashboards/**/*.json' 11 | # Allow this workflow to be manually triggered 12 | workflow_dispatch: 13 | 14 | jobs: 15 | release: 16 | runs-on: ubuntu-latest 17 | steps: 18 | # Doc: https://github.com/marketplace/actions/checkout 19 | - name: Checkout ${{ github.repository }} 20 | uses: actions/checkout@v5 21 | with: 22 | fetch-depth: 0 23 | 24 | # Doc: https://github.com/marketplace/actions/setup-node-js-environment 25 | - name: Setup Node.js 26 | uses: actions/setup-node@v5 27 | with: 28 | node-version: 20 29 | 30 | # Doc: https://github.com/semantic-release/semantic-release/blob/master/docs/recipes/ci-configurations/github-actions.md 31 | - name: Semantic Release 32 | env: 33 | GITHUB_TOKEN: ${{ secrets.PAT }} 34 | run: npx semantic-release 35 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.yml: -------------------------------------------------------------------------------- 1 | name: Feature request 2 | description: Suggest an idea for this project 3 | title: "[enhancement] " 4 | labels: ["enhancement"] 5 | assignees: 6 | - dotdc 7 | # Doc: https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms 8 | body: 9 | - type: markdown 10 | attributes: 11 | value: | 12 | **Please make sure you don't accidentally share sensitive information while filing this issue.** 13 | 14 | - type: textarea 15 | attributes: 16 | label: Describe the enhancement you'd like 17 | description: A clear and concise description of what should be added to this project. 18 | validations: 19 | required: true 20 | 21 | - type: textarea 22 | attributes: 23 | label: Additional context 24 | description: | 25 | Add any other context about your feature request here. 26 | 27 | Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. 28 | validations: 29 | required: false 30 | -------------------------------------------------------------------------------- /kustomization.yaml: -------------------------------------------------------------------------------- 1 | # Global options 2 | generatorOptions: 3 | disableNameSuffixHash: true 4 | labels: 5 | grafana_dashboard: "1" 6 | commonAnnotations: 7 | grafana_folder: "Kubernetes" 8 | #namespace: monitoring 9 | 10 | # Generate a ConfigMap for each dashboard 11 | configMapGenerator: 12 | 13 | ################################################# 14 | # Views Dashboards 15 | ################################################# 16 | 17 | - name: dashboards-k8s-views-global 18 | files: [ dashboards/k8s-views-global.json ] 19 | 20 | - name: dashboards-k8s-views-namespaces 21 | files: [ dashboards/k8s-views-namespaces.json ] 22 | 23 | - name: dashboards-k8s-views-nodes 24 | files: [ dashboards/k8s-views-nodes.json ] 25 | 26 | - name: dashboards-k8s-views-pods 27 | files: [ dashboards/k8s-views-pods.json ] 28 | 29 | ################################################# 30 | # System / Addons Dashboards 31 | ################################################# 32 | 33 | - name: dashboards-k8s-system-api-server 34 | files: [ dashboards/k8s-system-api-server.json ] 35 | 36 | - name: dashboards-k8s-system-coredns 37 | files: [ dashboards/k8s-system-coredns.json ] 38 | 39 | - name: dashboards-k8s-addons-prometheus 40 | files: [ dashboards/k8s-addons-prometheus.json ] 41 | 42 | - name: dashboards-k8s-addons-trivy-operator 43 | files: [ dashboards/k8s-addons-trivy-operator.json ] 44 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.yml: -------------------------------------------------------------------------------- 1 | name: Bug Report 2 | description: File a bug report 3 | title: "[bug] " 4 | labels: ["bug"] 5 | assignees: 6 | - dotdc 7 | # Doc: https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms 8 | body: 9 | - type: markdown 10 | attributes: 11 | value: | 12 | **Please make sure you don't accidentally share sensitive information while filing this issue.** 13 | 14 | - type: textarea 15 | attributes: 16 | label: Describe the bug 17 | description: A clear and concise description of what the bug is. 18 | validations: 19 | required: true 20 | 21 | - type: textarea 22 | attributes: 23 | label: How to reproduce? 24 | description: Steps to reproduce the bug. 25 | placeholder: | 26 | 1. In this environment... 27 | 2. With this config... 28 | 3. Run '...' 29 | 4. See error... 30 | validations: 31 | required: false 32 | 33 | - type: textarea 34 | attributes: 35 | label: Expected behavior 36 | description: A concise description of what you expected to happen. 37 | validations: 38 | required: false 39 | 40 | - type: textarea 41 | attributes: 42 | label: Additional context 43 | description: | 44 | Add any other context about the problem here. 45 | 46 | Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. 47 | validations: 48 | required: false 49 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, caste, color, religion, or sexual 10 | identity and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | * Demonstrating empathy and kindness toward other people 21 | * Being respectful of differing opinions, viewpoints, and experiences 22 | * Giving and gracefully accepting constructive feedback 23 | * Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | * Focusing on what is best not just for us as individuals, but for the overall 26 | community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | * The use of sexualized language or imagery, and sexual attention or advances of 31 | any kind 32 | * Trolling, insulting or derogatory comments, and personal or political attacks 33 | * Public or private harassment 34 | * Publishing others' private information, such as a physical or email address, 35 | without their explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at . 63 | All complaints will be reviewed and investigated promptly and fairly. 64 | 65 | All community leaders are obligated to respect the privacy and security of the 66 | reporter of any incident. 67 | 68 | ## Enforcement Guidelines 69 | 70 | Community leaders will follow these Community Impact Guidelines in determining 71 | the consequences for any action they deem in violation of this Code of Conduct: 72 | 73 | ### 1. Correction 74 | 75 | **Community Impact**: Use of inappropriate language or other behavior deemed 76 | unprofessional or unwelcome in the community. 77 | 78 | **Consequence**: A private, written warning from community leaders, providing 79 | clarity around the nature of the violation and an explanation of why the 80 | behavior was inappropriate. A public apology may be requested. 81 | 82 | ### 2. Warning 83 | 84 | **Community Impact**: A violation through a single incident or series of 85 | actions. 86 | 87 | **Consequence**: A warning with consequences for continued behavior. No 88 | interaction with the people involved, including unsolicited interaction with 89 | those enforcing the Code of Conduct, for a specified period of time. This 90 | includes avoiding interactions in community spaces as well as external channels 91 | like social media. Violating these terms may lead to a temporary or permanent 92 | ban. 93 | 94 | ### 3. Temporary Ban 95 | 96 | **Community Impact**: A serious violation of community standards, including 97 | sustained inappropriate behavior. 98 | 99 | **Consequence**: A temporary ban from any sort of interaction or public 100 | communication with the community for a specified period of time. No public or 101 | private interaction with the people involved, including unsolicited interaction 102 | with those enforcing the Code of Conduct, is allowed during this period. 103 | Violating these terms may lead to a permanent ban. 104 | 105 | ### 4. Permanent Ban 106 | 107 | **Community Impact**: Demonstrating a pattern of violation of community 108 | standards, including sustained inappropriate behavior, harassment of an 109 | individual, or aggression toward or disparagement of classes of individuals. 110 | 111 | **Consequence**: A permanent ban from any sort of public interaction within the 112 | community. 113 | 114 | ## Attribution 115 | 116 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 117 | version 2.1, available at 118 | [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. 119 | 120 | Community Impact Guidelines were inspired by 121 | [Mozilla's code of conduct enforcement ladder][Mozilla CoC]. 122 | 123 | For answers to common questions about this code of conduct, see the FAQ at 124 | [https://www.contributor-covenant.org/faq][FAQ].\ 125 | Translations are available at 126 | [https://www.contributor-covenant.org/translations][translations]. 127 | 128 | [homepage]: https://www.contributor-covenant.org 129 | [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html 130 | [Mozilla CoC]: https://github.com/mozilla/diversity 131 | [FAQ]: https://www.contributor-covenant.org/faq 132 | [translations]: https://www.contributor-covenant.org/translations 133 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2020 David Calvert 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # grafana-dashboards-kubernetes 2 | 3 | ![logo](https://raw.githubusercontent.com/dotdc/media/main/grafana-dashboards-kubernetes/kubernetes-grafana-dashboards-logo.png) 4 | 5 | ## Table of contents 6 | 7 | - [Description](#description) 8 | - [Releases](#releases) 9 | - [Features](#features) 10 | - [Dashboards](#dashboards) 11 | - [Installation](#installation) 12 | - [Install manually](#install-manually) 13 | - [Install via grafana.com](#install-via-grafanacom) 14 | - [Install with ArgoCD](#install-with-argocd) 15 | - [Install with Helm values](#install-with-helm-values) 16 | - [Install as ConfigMaps](#install-as-configmaps) 17 | - [Install as ConfigMaps with Terraform](#install-as-configmaps-with-terraform) 18 | - [Install as GrafanaDashboard with Grafana Operator](#install-as-grafanadashboard-with-grafana-operator) 19 | - [Known issue(s)](#known-issues) 20 | - [Broken panels due to a too-high resolution](#broken-panels-due-to-a-too-high-resolution) 21 | - [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) 22 | - [Broken panels on k8s-views-nodes due to the nodename label](#broken-panels-on-k8s-views-nodes-due-to-the-nodename-label) 23 | - [Windows support](#windows-support) 24 | - [Contributing](#contributing) 25 | 26 | ## Description 27 | 28 | This repository contains a modern set of [Grafana](https://github.com/grafana/grafana) dashboards for [Kubernetes](https://github.com/kubernetes/kubernetes).\ 29 | They are inspired by many other dashboards from `kubernetes-mixin` and `grafana.com`. 30 | 31 | More 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/) 32 | 33 | You can also download them on [Grafana.com](https://grafana.com/grafana/dashboards/?plcmt=top-nav&cta=downloads&search=dotdc). 34 | 35 | ## Releases 36 | 37 | This repository follows [semantic versioning](https://semver.org) for releases.\ 38 | It 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). 39 | 40 | ## Features 41 | 42 | These 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. 43 | 44 | They are not backward compatible with older Grafana versions because they try to take advantage of Grafana's newest features like: 45 | 46 | - `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/)) 47 | - `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/)) 48 | - `$__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/)) 49 | 50 | They also have a `Prometheus Datasource` variable so they will work on a federated Grafana instance. 51 | 52 | As an example, here's how the `Kubernetes / Views / Global` dashboard looks like: 53 | 54 | ![screenshot](https://raw.githubusercontent.com/dotdc/media/main/grafana-dashboards-kubernetes/k8s-views-global.png "Kubernetes Global View Screenshot") 55 | 56 | ## Dashboards 57 | 58 | | File name | Description | Screenshot | 59 | |:---------------------------|:------------|:----------:| 60 | | k8s-addons-prometheus.json | Dashboard for Prometheus. | [Screenshot](https://raw.githubusercontent.com/dotdc/media/main/grafana-dashboards-kubernetes/k8s-addons-prometheus.png) | 61 | | k8s-addons-trivy-operator.json | Dashboard for the Trivy Operator from Aqua Security. | [Screenshot](https://raw.githubusercontent.com/dotdc/media/main/grafana-dashboards-kubernetes/k8s-addons-trivy-operator.png) | 62 | | k8s-system-api-server.json | Dashboard for the API Server Kubernetes component. | [Screenshot](https://raw.githubusercontent.com/dotdc/media/main/grafana-dashboards-kubernetes/k8s-system-api-server.png) | 63 | | k8s-system-coredns.json | Show information on the CoreDNS Kubernetes component. | [Screenshot](https://raw.githubusercontent.com/dotdc/media/main/grafana-dashboards-kubernetes/k8s-system-coredns.png) | 64 | | k8s-views-global.json | `Global` level view dashboard for Kubernetes. | [Screenshot](https://raw.githubusercontent.com/dotdc/media/main/grafana-dashboards-kubernetes/k8s-views-global.png) | 65 | | k8s-views-namespaces.json | `Namespaces` level view dashboard for Kubernetes. | [Screenshot](https://raw.githubusercontent.com/dotdc/media/main/grafana-dashboards-kubernetes/k8s-views-namespaces.png) | 66 | | k8s-views-nodes.json | `Nodes` level view dashboard for Kubernetes. | [Screenshot](https://raw.githubusercontent.com/dotdc/media/main/grafana-dashboards-kubernetes/k8s-views-nodes.png) | 67 | | k8s-views-pods.json | `Pods` level view dashboard for Kubernetes. | [Screenshot](https://raw.githubusercontent.com/dotdc/media/main/grafana-dashboards-kubernetes/k8s-views-pods.png) | 68 | 69 | ## Installation 70 | 71 | In most cases, you will need to clone this repository (or your fork): 72 | 73 | ```terminal 74 | git clone https://github.com/dotdc/grafana-dashboards-kubernetes.git 75 | cd grafana-dashboards-kubernetes 76 | ``` 77 | 78 | If 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: 79 | 80 | ```yaml 81 | # kube-prometheus-stack values 82 | grafana: 83 | sidecar: 84 | dashboards: 85 | enabled: true 86 | defaultFolderName: "General" 87 | label: grafana_dashboard 88 | labelValue: "1" 89 | folderAnnotation: grafana_folder 90 | searchNamespace: ALL 91 | provider: 92 | foldersFromFilesStructure: true 93 | ``` 94 | 95 | ### Install manually 96 | 97 | On the WebUI of your Grafana instance, put your mouse over the `+` sign on the left menu, then click on `Import`.\ 98 | Once 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. 99 | 100 | ### Install via grafana.com 101 | 102 | On the WebUI of your Grafana instance, put your mouse over the `+` sign on the left menu, then click on `Import`.\ 103 | Once 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. 104 | 105 | Grafana.com dashboard id list: 106 | 107 | | Dashboard | ID | 108 | |:-----------------------------------|:------| 109 | | k8s-addons-prometheus.json | 19105 | 110 | | k8s-addons-trivy-operator.json | 16337 | 111 | | k8s-system-api-server.json | 15761 | 112 | | k8s-system-coredns.json | 15762 | 113 | | k8s-views-global.json | 15757 | 114 | | k8s-views-namespaces.json | 15758 | 115 | | k8s-views-nodes.json | 15759 | 116 | | k8s-views-pods.json | 15760 | 117 | 118 | ### Install with ArgoCD 119 | 120 | If you are using ArgoCD, this will deploy the dashboards in the default project of ArgoCD: 121 | 122 | ```terminal 123 | kubectl apply -f argocd-app.yml 124 | ``` 125 | 126 | You will also need to enable and configure the Grafana `dashboards sidecar` as described in [Installation](#installation). 127 | 128 | ### Install with Helm values 129 | 130 | If you use the official Grafana helm chart or kube-prometheus-stack, you can install the dashboards directly using the `dashboardProviders` & `dashboards` helm chart values. 131 | 132 | Depending on your setup, add or merge the following block example to your helm chart values.\ 133 | The 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. 134 | 135 | ```yaml 136 | grafana: 137 | # Provision grafana-dashboards-kubernetes 138 | dashboardProviders: 139 | dashboardproviders.yaml: 140 | apiVersion: 1 141 | providers: 142 | - name: 'grafana-dashboards-kubernetes' 143 | orgId: 1 144 | folder: 'Kubernetes' 145 | type: file 146 | disableDeletion: true 147 | editable: true 148 | options: 149 | path: /var/lib/grafana/dashboards/grafana-dashboards-kubernetes 150 | dashboards: 151 | grafana-dashboards-kubernetes: 152 | k8s-system-api-server: 153 | url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-system-api-server.json 154 | token: '' 155 | k8s-system-coredns: 156 | url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-system-coredns.json 157 | token: '' 158 | k8s-views-global: 159 | url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-global.json 160 | token: '' 161 | k8s-views-namespaces: 162 | url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-namespaces.json 163 | token: '' 164 | k8s-views-nodes: 165 | url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-nodes.json 166 | token: '' 167 | k8s-views-pods: 168 | url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-pods.json 169 | token: '' 170 | ``` 171 | 172 | ### Install as ConfigMaps 173 | 174 | Grafana 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). 175 | 176 | To build the ConfigMaps and output them on STDOUT : 177 | 178 | ```terminal 179 | kubectl kustomize . 180 | ``` 181 | 182 | *Note: no namespace is set by default, you can change that in the `kustomization.yaml` file.* 183 | 184 | To build and deploy them directly on your Kubernetes cluster : 185 | 186 | ```terminal 187 | kubectl apply -k . -n monitoring 188 | ``` 189 | 190 | You will also need to enable and configure the Grafana `dashboards sidecar` as described in [Installation](#installation). 191 | 192 | *Note: you can change the namespace if needed.* 193 | 194 | ### Install as ConfigMaps with Terraform 195 | 196 | If you use Terraform to provision your Kubernetes resources, you can convert the generated ConfigMaps to Terraform code using [tfk8s](https://github.com/jrhouston/tfk8s). 197 | 198 | To build and convert ConfigMaps to Terraform code : 199 | 200 | ```terminal 201 | kubectl kustomize . | tfk8s 202 | ``` 203 | 204 | You will also need to enable and configure the Grafana `dashboards sidecar` as described in [Installation](#installation). 205 | 206 | *Note: no namespace is set by default, you can change that in the `kustomization.yaml` file.* 207 | 208 | ### Install as GrafanaDashboard with Grafana Operator 209 | 210 | If you use Grafana Operator to provision your Grafana dashboards, you can use the following manifests: 211 | 212 | Make sure to use your proper namespace. 213 | 214 | ```yaml 215 | apiVersion: grafana.integreatly.org/v1beta1 216 | kind: GrafanaDashboard 217 | metadata: 218 | name: k8s-system-api-server 219 | namespace: monitoring 220 | spec: 221 | instanceSelector: 222 | matchLabels: 223 | dashboards: "grafana" 224 | url: "https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-system-api-server.json" 225 | --- 226 | apiVersion: grafana.integreatly.org/v1beta1 227 | kind: GrafanaDashboard 228 | metadata: 229 | name: k8s-system-coredns 230 | namespace: monitoring 231 | spec: 232 | instanceSelector: 233 | matchLabels: 234 | dashboards: "grafana" 235 | url: "https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-system-coredns.json" 236 | --- 237 | apiVersion: grafana.integreatly.org/v1beta1 238 | kind: GrafanaDashboard 239 | metadata: 240 | name: k8s-views-global 241 | namespace: monitoring 242 | spec: 243 | instanceSelector: 244 | matchLabels: 245 | dashboards: "grafana" 246 | url: "https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-global.json" 247 | --- 248 | apiVersion: grafana.integreatly.org/v1beta1 249 | kind: GrafanaDashboard 250 | metadata: 251 | name: k8s-views-namespaces 252 | namespace: monitoring 253 | spec: 254 | instanceSelector: 255 | matchLabels: 256 | dashboards: "grafana" 257 | url: "https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-namespaces.json" 258 | --- 259 | apiVersion: grafana.integreatly.org/v1beta1 260 | kind: GrafanaDashboard 261 | metadata: 262 | name: k8s-views-nodes 263 | namespace: monitoring 264 | spec: 265 | instanceSelector: 266 | matchLabels: 267 | dashboards: "grafana" 268 | url: "https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-nodes.json" 269 | --- 270 | apiVersion: grafana.integreatly.org/v1beta1 271 | kind: GrafanaDashboard 272 | metadata: 273 | name: k8s-views-pods 274 | namespace: monitoring 275 | spec: 276 | instanceSelector: 277 | matchLabels: 278 | dashboards: "grafana" 279 | url: "https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-pods.json" 280 | ``` 281 | 282 | ## Known issue(s) 283 | 284 | ### Broken panels due to a too-high resolution 285 | 286 | A 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 & Grafana Mimir. Changing the `$resolution` variable to a higher value (a lower resolution) will likely solve the issue. 287 | To make the fix permanent, you can configure the `Scrape interval` in your Grafana Datasource to a working value for your setup. 288 | 289 | ### Broken panels on k8s-views-nodes when a node changes its IP address 290 | 291 | To make this dashboard more convenient, there's a small variable hack to display `node` instead of `instance`. 292 | Because 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). 293 | 294 | No easy fix for this scenario yet, but it should be a corner case for most people. 295 | Feel free to reopen the issue if you have ideas to fix this. 296 | 297 | ### Broken panels on k8s-views-nodes due to the nodename label 298 | 299 | The `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`. 300 | 301 | This 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. 302 | 303 | Below 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: 304 | 305 | #### Directly through the Prometheus configuration file 306 | 307 | Assuming 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: 308 | 309 | ```yaml 310 | # File: prometheus.yaml 311 | scrape_configs: 312 | - job_name: node-exporter 313 | relabel_configs: 314 | # Add this 315 | - action: replace 316 | source_labels: [ __meta_kubernetes_pod_node_name] 317 | target_label: nodename 318 | ``` 319 | 320 | #### Through a `ServiceMonitor` 321 | 322 | If 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: 323 | 324 | ```yaml 325 | # File: service-monitor.yaml 326 | apiVersion: monitoring.coreos.com/v1 327 | kind: ServiceMonitor 328 | endpoints: 329 | - port: http-metrics 330 | relabelings: 331 | # Add this 332 | - action: replace 333 | sourceLabels: [ __meta_kubernetes_node_name] 334 | targetLabel: nodename 335 | ``` 336 | 337 | As 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: 338 | 339 | ```yaml 340 | # File: kube-prometheus-stack-values.yaml 341 | prometheus-node-exporter: 342 | prometheus: 343 | monitor: 344 | relabelings: 345 | - action: replace 346 | sourceLabels: [__meta_kubernetes_pod_node_name] 347 | targetLabel: nodename 348 | ``` 349 | 350 | #### With Grafana Agent Flow mode 351 | 352 | The 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: 353 | 354 | ```river 355 | prometheus.exporter.unix { 356 | } 357 | 358 | prometheus.scrape "node_exporter" { 359 | targets = prometheus.exporter.unix.targets 360 | forward_to = [prometheus.relabel.node_exporter.receiver] 361 | 362 | job_name = "node-exporter" 363 | } 364 | 365 | prometheus.relabel "node_exporter" { 366 | forward_to = [prometheus.remote_write.sink.receiver] 367 | 368 | rule { 369 | replacement = env("HOSTNAME") 370 | target_label = "nodename" 371 | } 372 | 373 | rule { 374 | # The default job name is "integrations/node_exporter" and needs to be replaced 375 | replacement = "node-exporter" 376 | target_label = "job" 377 | } 378 | } 379 | ``` 380 | 381 | The `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) 382 | 383 | ### Windows support 384 | 385 | The dashboards currently don't support Windows. We experimented with Windows support in the `k8s-views-global` dashboard, but it ended up breaking some panels, so it has been removed for now. You can download the [last Windows-compatible version](https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/refs/tags/v2.10.1/dashboards/k8s-views-global.json) of the dashboard or download [revision 43 on Grafana.com](https://grafana.com/api/dashboards/15757/revisions/43/download). 386 | 387 | See [#79](https://github.com/dotdc/grafana-dashboards-kubernetes/issues/79) 388 | 389 | ## Contributing 390 | 391 | Feel free to contribute to this project: 392 | 393 | - Give a GitHub ⭐ if you like it 394 | - Create an [Issue](https://github.com/dotdc/grafana-dashboards-kubernetes/issues) to make a feature request, report a bug or share an idea. 395 | - Create a [Pull Request](https://github.com/dotdc/grafana-dashboards-kubernetes/pulls) if you want to share code or anything useful to this project. 396 | -------------------------------------------------------------------------------- /dashboards/k8s-system-api-server.json: -------------------------------------------------------------------------------- 1 | { 2 | "__inputs": [ 3 | { 4 | "name": "DS_PROMETHEUS", 5 | "label": "Prometheus", 6 | "description": "", 7 | "type": "datasource", 8 | "pluginId": "prometheus", 9 | "pluginName": "Prometheus" 10 | } 11 | ], 12 | "__elements": [], 13 | "__requires": [ 14 | { 15 | "type": "grafana", 16 | "id": "grafana", 17 | "name": "Grafana", 18 | "version": "8.4.4" 19 | }, 20 | { 21 | "type": "datasource", 22 | "id": "prometheus", 23 | "name": "Prometheus", 24 | "version": "5.0.0" 25 | }, 26 | { 27 | "type": "panel", 28 | "id": "timeseries", 29 | "name": "Time series", 30 | "version": "" 31 | }, 32 | { 33 | "type": "panel", 34 | "id": "stat", 35 | "name": "Stat", 36 | "version": "" 37 | } 38 | ], 39 | "annotations": { 40 | "list": [ 41 | { 42 | "builtIn": 1, 43 | "datasource": { 44 | "type": "datasource", 45 | "uid": "grafana" 46 | }, 47 | "enable": true, 48 | "hide": true, 49 | "iconColor": "rgba(0, 211, 255, 1)", 50 | "name": "Annotations & Alerts", 51 | "target": { 52 | "limit": 100, 53 | "matchAny": false, 54 | "tags": [], 55 | "type": "dashboard" 56 | }, 57 | "type": "dashboard" 58 | }, 59 | { 60 | "datasource": { 61 | "type": "datasource", 62 | "uid": "grafana" 63 | }, 64 | "enable": true, 65 | "hide": false, 66 | "iconColor": "#5c4ee5", 67 | "name": "terraform", 68 | "target": { 69 | "limit": 100, 70 | "matchAny": false, 71 | "tags": [ 72 | "terraform" 73 | ], 74 | "type": "tags" 75 | } 76 | }, 77 | { 78 | "datasource": { 79 | "type": "datasource", 80 | "uid": "grafana" 81 | }, 82 | "enable": true, 83 | "hide": false, 84 | "iconColor": "red", 85 | "name": "oncall", 86 | "target": { 87 | "limit": 100, 88 | "matchAny": false, 89 | "tags": [ 90 | "oncall" 91 | ], 92 | "type": "tags" 93 | } 94 | } 95 | ] 96 | }, 97 | "description": "This is a modern API Server dashboard for your Kubernetes cluster(s). Made for kube-prometheus-stack and take advantage of the latest Grafana features. GitHub repository: https://github.com/dotdc/grafana-dashboards-kubernetes", 98 | "editable": true, 99 | "fiscalYearStartMonth": 0, 100 | "graphTooltip": 1, 101 | "links": [], 102 | "liveNow": false, 103 | "panels": [ 104 | { 105 | "datasource": { 106 | "type": "prometheus", 107 | "uid": "${datasource}" 108 | }, 109 | "fieldConfig": { 110 | "defaults": { 111 | "mappings": [ 112 | { 113 | "options": { 114 | "0": { 115 | "text": "DOWN" 116 | }, 117 | "1": { 118 | "text": "UP" 119 | } 120 | }, 121 | "type": "value" 122 | } 123 | ], 124 | "thresholds": { 125 | "mode": "absolute", 126 | "steps": [ 127 | { 128 | "color": "red", 129 | "value": null 130 | }, 131 | { 132 | "color": "green", 133 | "value": 1 134 | } 135 | ] 136 | } 137 | }, 138 | "overrides": [] 139 | }, 140 | "gridPos": { 141 | "h": 8, 142 | "w": 12, 143 | "x": 0, 144 | "y": 0 145 | }, 146 | "id": 42, 147 | "options": { 148 | "colorMode": "background", 149 | "graphMode": "none", 150 | "justifyMode": "auto", 151 | "orientation": "horizontal", 152 | "reduceOptions": { 153 | "calcs": [ 154 | "lastNotNull" 155 | ], 156 | "fields": "", 157 | "values": false 158 | }, 159 | "textMode": "value_and_name" 160 | }, 161 | "pluginVersion": "10.0.1", 162 | "targets": [ 163 | { 164 | "datasource": { 165 | "type": "prometheus", 166 | "uid": "${datasource}" 167 | }, 168 | "exemplar": true, 169 | "expr": "up{cluster=~\"$cluster\", job=~\"$job\"}", 170 | "interval": "", 171 | "legendFormat": "{{ instance }}", 172 | "refId": "A" 173 | } 174 | ], 175 | "title": "API Server - Health Status", 176 | "type": "stat" 177 | }, 178 | { 179 | "datasource": { 180 | "type": "prometheus", 181 | "uid": "${datasource}" 182 | }, 183 | "fieldConfig": { 184 | "defaults": { 185 | "custom": { 186 | "align": "auto", 187 | "cellOptions": { 188 | "type": "auto" 189 | }, 190 | "inspect": false 191 | }, 192 | "mappings": [], 193 | "thresholds": { 194 | "mode": "absolute", 195 | "steps": [ 196 | { 197 | "color": "green", 198 | "value": null 199 | }, 200 | { 201 | "color": "red", 202 | "value": 80 203 | } 204 | ] 205 | } 206 | }, 207 | "overrides": [ 208 | { 209 | "matcher": { 210 | "id": "byName", 211 | "options": "__name__" 212 | }, 213 | "properties": [ 214 | { 215 | "id": "custom.width", 216 | "value": 188 217 | } 218 | ] 219 | } 220 | ] 221 | }, 222 | "gridPos": { 223 | "h": 8, 224 | "w": 12, 225 | "x": 12, 226 | "y": 0 227 | }, 228 | "id": 60, 229 | "options": { 230 | "cellHeight": "sm", 231 | "footer": { 232 | "countRows": false, 233 | "fields": "", 234 | "reducer": [ 235 | "sum" 236 | ], 237 | "show": false 238 | }, 239 | "showHeader": true, 240 | "sortBy": [ 241 | { 242 | "desc": false, 243 | "displayName": "removed_release" 244 | } 245 | ] 246 | }, 247 | "pluginVersion": "10.0.1", 248 | "targets": [ 249 | { 250 | "datasource": { 251 | "type": "prometheus", 252 | "uid": "${datasource}" 253 | }, 254 | "exemplar": true, 255 | "expr": "apiserver_requested_deprecated_apis{cluster=~\"$cluster\"}", 256 | "interval": "", 257 | "legendFormat": "", 258 | "refId": "A" 259 | } 260 | ], 261 | "title": "Deprecated Kubernetes Resources", 262 | "transformations": [ 263 | { 264 | "id": "labelsToFields", 265 | "options": { 266 | "keepLabels": [ 267 | "group", 268 | "job", 269 | "removed_release", 270 | "resource", 271 | "version", 272 | "name" 273 | ], 274 | "mode": "columns" 275 | } 276 | }, 277 | { 278 | "id": "merge", 279 | "options": {} 280 | }, 281 | { 282 | "id": "organize", 283 | "options": { 284 | "excludeByName": { 285 | "Time": true, 286 | "Value": true, 287 | "job": true 288 | }, 289 | "indexByName": { 290 | "Time": 6, 291 | "Value": 7, 292 | "group": 1, 293 | "job": 5, 294 | "namespace": 0, 295 | "removed_release": 4, 296 | "resource": 3, 297 | "version": 2 298 | }, 299 | "renameByName": {} 300 | } 301 | }, 302 | { 303 | "id": "groupBy", 304 | "options": { 305 | "fields": { 306 | "group": { 307 | "aggregations": [ 308 | "lastNotNull" 309 | ], 310 | "operation": "groupby" 311 | }, 312 | "job": { 313 | "aggregations": [], 314 | "operation": "groupby" 315 | }, 316 | "namespace": { 317 | "aggregations": [ 318 | "lastNotNull" 319 | ], 320 | "operation": "groupby" 321 | }, 322 | "removed_release": { 323 | "aggregations": [], 324 | "operation": "groupby" 325 | }, 326 | "resource": { 327 | "aggregations": [ 328 | "lastNotNull" 329 | ], 330 | "operation": "groupby" 331 | }, 332 | "version": { 333 | "aggregations": [], 334 | "operation": "groupby" 335 | } 336 | } 337 | } 338 | } 339 | ], 340 | "type": "table" 341 | }, 342 | { 343 | "datasource": { 344 | "type": "prometheus", 345 | "uid": "${datasource}" 346 | }, 347 | "fieldConfig": { 348 | "defaults": { 349 | "color": { 350 | "mode": "palette-classic" 351 | }, 352 | "custom": { 353 | "axisCenteredZero": false, 354 | "axisColorMode": "text", 355 | "axisLabel": "", 356 | "axisPlacement": "auto", 357 | "barAlignment": 0, 358 | "drawStyle": "line", 359 | "fillOpacity": 25, 360 | "gradientMode": "opacity", 361 | "hideFrom": { 362 | "legend": false, 363 | "tooltip": false, 364 | "viz": false 365 | }, 366 | "lineInterpolation": "smooth", 367 | "lineWidth": 2, 368 | "pointSize": 5, 369 | "scaleDistribution": { 370 | "type": "linear" 371 | }, 372 | "showPoints": "never", 373 | "spanNulls": false, 374 | "stacking": { 375 | "group": "A", 376 | "mode": "none" 377 | }, 378 | "thresholdsStyle": { 379 | "mode": "off" 380 | } 381 | }, 382 | "mappings": [], 383 | "thresholds": { 384 | "mode": "absolute", 385 | "steps": [ 386 | { 387 | "color": "green", 388 | "value": null 389 | }, 390 | { 391 | "color": "red", 392 | "value": 80 393 | } 394 | ] 395 | }, 396 | "unit": "short" 397 | }, 398 | "overrides": [] 399 | }, 400 | "gridPos": { 401 | "h": 8, 402 | "w": 12, 403 | "x": 0, 404 | "y": 8 405 | }, 406 | "id": 38, 407 | "options": { 408 | "legend": { 409 | "calcs": [], 410 | "displayMode": "list", 411 | "placement": "bottom", 412 | "showLegend": true 413 | }, 414 | "tooltip": { 415 | "mode": "multi", 416 | "sort": "desc" 417 | } 418 | }, 419 | "pluginVersion": "8.3.3", 420 | "targets": [ 421 | { 422 | "datasource": { 423 | "type": "prometheus", 424 | "uid": "${datasource}" 425 | }, 426 | "exemplar": true, 427 | "expr": "sum by (code) (rate(apiserver_request_total{cluster=~\"$cluster\"}[$__rate_interval]))", 428 | "interval": "$resolution", 429 | "legendFormat": "{{ code }}", 430 | "refId": "A" 431 | } 432 | ], 433 | "title": "API Server - HTTP Requests by code", 434 | "type": "timeseries" 435 | }, 436 | { 437 | "datasource": { 438 | "type": "prometheus", 439 | "uid": "${datasource}" 440 | }, 441 | "fieldConfig": { 442 | "defaults": { 443 | "color": { 444 | "mode": "palette-classic" 445 | }, 446 | "custom": { 447 | "axisCenteredZero": false, 448 | "axisColorMode": "text", 449 | "axisLabel": "", 450 | "axisPlacement": "auto", 451 | "barAlignment": 0, 452 | "drawStyle": "line", 453 | "fillOpacity": 25, 454 | "gradientMode": "opacity", 455 | "hideFrom": { 456 | "legend": false, 457 | "tooltip": false, 458 | "viz": false 459 | }, 460 | "lineInterpolation": "smooth", 461 | "lineWidth": 2, 462 | "pointSize": 5, 463 | "scaleDistribution": { 464 | "type": "linear" 465 | }, 466 | "showPoints": "never", 467 | "spanNulls": false, 468 | "stacking": { 469 | "group": "A", 470 | "mode": "none" 471 | }, 472 | "thresholdsStyle": { 473 | "mode": "off" 474 | } 475 | }, 476 | "mappings": [], 477 | "thresholds": { 478 | "mode": "absolute", 479 | "steps": [ 480 | { 481 | "color": "green", 482 | "value": null 483 | }, 484 | { 485 | "color": "red", 486 | "value": 80 487 | } 488 | ] 489 | }, 490 | "unit": "short" 491 | }, 492 | "overrides": [] 493 | }, 494 | "gridPos": { 495 | "h": 8, 496 | "w": 12, 497 | "x": 12, 498 | "y": 8 499 | }, 500 | "id": 39, 501 | "options": { 502 | "legend": { 503 | "calcs": [], 504 | "displayMode": "list", 505 | "placement": "bottom", 506 | "showLegend": true 507 | }, 508 | "tooltip": { 509 | "mode": "multi", 510 | "sort": "desc" 511 | } 512 | }, 513 | "pluginVersion": "8.3.3", 514 | "targets": [ 515 | { 516 | "datasource": { 517 | "type": "prometheus", 518 | "uid": "${datasource}" 519 | }, 520 | "exemplar": true, 521 | "expr": "sum by (verb) (rate(apiserver_request_total{cluster=~\"$cluster\"}[$__rate_interval]))", 522 | "interval": "$resolution", 523 | "legendFormat": "{{ verb}}", 524 | "refId": "A" 525 | } 526 | ], 527 | "title": "API Server - HTTP Requests by verb", 528 | "type": "timeseries" 529 | }, 530 | { 531 | "datasource": { 532 | "type": "prometheus", 533 | "uid": "${datasource}" 534 | }, 535 | "fieldConfig": { 536 | "defaults": { 537 | "color": { 538 | "mode": "palette-classic" 539 | }, 540 | "custom": { 541 | "axisCenteredZero": false, 542 | "axisColorMode": "text", 543 | "axisLabel": "", 544 | "axisPlacement": "auto", 545 | "barAlignment": 0, 546 | "drawStyle": "line", 547 | "fillOpacity": 25, 548 | "gradientMode": "opacity", 549 | "hideFrom": { 550 | "legend": false, 551 | "tooltip": false, 552 | "viz": false 553 | }, 554 | "lineInterpolation": "smooth", 555 | "lineWidth": 2, 556 | "pointSize": 5, 557 | "scaleDistribution": { 558 | "type": "linear" 559 | }, 560 | "showPoints": "never", 561 | "spanNulls": false, 562 | "stacking": { 563 | "group": "A", 564 | "mode": "none" 565 | }, 566 | "thresholdsStyle": { 567 | "mode": "off" 568 | } 569 | }, 570 | "mappings": [], 571 | "thresholds": { 572 | "mode": "absolute", 573 | "steps": [ 574 | { 575 | "color": "green", 576 | "value": null 577 | }, 578 | { 579 | "color": "red", 580 | "value": 80 581 | } 582 | ] 583 | }, 584 | "unit": "ms" 585 | }, 586 | "overrides": [] 587 | }, 588 | "gridPos": { 589 | "h": 8, 590 | "w": 12, 591 | "x": 0, 592 | "y": 16 593 | }, 594 | "id": 53, 595 | "options": { 596 | "legend": { 597 | "calcs": [], 598 | "displayMode": "list", 599 | "placement": "bottom", 600 | "showLegend": true 601 | }, 602 | "tooltip": { 603 | "mode": "single", 604 | "sort": "none" 605 | } 606 | }, 607 | "pluginVersion": "8.3.3", 608 | "targets": [ 609 | { 610 | "datasource": { 611 | "type": "prometheus", 612 | "uid": "${datasource}" 613 | }, 614 | "exemplar": true, 615 | "expr": "sum(rate(apiserver_request_duration_seconds_sum{cluster=~\"$cluster\", job=~\"$job\"}[$__rate_interval])) by (instance)\n/\nsum(rate(apiserver_request_duration_seconds_count{cluster=~\"$cluster\", job=~\"$job\"}[$__rate_interval])) by (instance)", 616 | "interval": "$resolution", 617 | "legendFormat": "{{ instance }}", 618 | "refId": "A" 619 | } 620 | ], 621 | "title": "API Server - HTTP Requests Latency by instance", 622 | "type": "timeseries" 623 | }, 624 | { 625 | "datasource": { 626 | "type": "prometheus", 627 | "uid": "${datasource}" 628 | }, 629 | "fieldConfig": { 630 | "defaults": { 631 | "color": { 632 | "mode": "palette-classic" 633 | }, 634 | "custom": { 635 | "axisCenteredZero": false, 636 | "axisColorMode": "text", 637 | "axisLabel": "", 638 | "axisPlacement": "auto", 639 | "barAlignment": 0, 640 | "drawStyle": "line", 641 | "fillOpacity": 25, 642 | "gradientMode": "opacity", 643 | "hideFrom": { 644 | "legend": false, 645 | "tooltip": false, 646 | "viz": false 647 | }, 648 | "lineInterpolation": "smooth", 649 | "lineWidth": 2, 650 | "pointSize": 5, 651 | "scaleDistribution": { 652 | "type": "linear" 653 | }, 654 | "showPoints": "never", 655 | "spanNulls": false, 656 | "stacking": { 657 | "group": "A", 658 | "mode": "none" 659 | }, 660 | "thresholdsStyle": { 661 | "mode": "off" 662 | } 663 | }, 664 | "mappings": [], 665 | "thresholds": { 666 | "mode": "absolute", 667 | "steps": [ 668 | { 669 | "color": "green", 670 | "value": null 671 | }, 672 | { 673 | "color": "red", 674 | "value": 80 675 | } 676 | ] 677 | }, 678 | "unit": "ms" 679 | }, 680 | "overrides": [] 681 | }, 682 | "gridPos": { 683 | "h": 8, 684 | "w": 12, 685 | "x": 12, 686 | "y": 16 687 | }, 688 | "id": 54, 689 | "options": { 690 | "legend": { 691 | "calcs": [], 692 | "displayMode": "list", 693 | "placement": "bottom", 694 | "showLegend": true 695 | }, 696 | "tooltip": { 697 | "mode": "multi", 698 | "sort": "desc" 699 | } 700 | }, 701 | "pluginVersion": "8.3.3", 702 | "targets": [ 703 | { 704 | "datasource": { 705 | "type": "prometheus", 706 | "uid": "${datasource}" 707 | }, 708 | "exemplar": true, 709 | "expr": "sum(rate(apiserver_request_duration_seconds_sum{cluster=~\"$cluster\", job=~\"$job\"}[$__rate_interval])) by (verb)\n/\nsum(rate(apiserver_request_duration_seconds_count{cluster=~\"$cluster\", job=~\"$job\"}[$__rate_interval])) by (verb)", 710 | "interval": "$resolution", 711 | "legendFormat": "{{ verb }}", 712 | "refId": "A" 713 | } 714 | ], 715 | "title": "API Server - HTTP Requests Latency by verb", 716 | "type": "timeseries" 717 | }, 718 | { 719 | "datasource": { 720 | "type": "prometheus", 721 | "uid": "${datasource}" 722 | }, 723 | "fieldConfig": { 724 | "defaults": { 725 | "color": { 726 | "mode": "palette-classic" 727 | }, 728 | "custom": { 729 | "axisCenteredZero": false, 730 | "axisColorMode": "text", 731 | "axisLabel": "", 732 | "axisPlacement": "auto", 733 | "barAlignment": 0, 734 | "drawStyle": "line", 735 | "fillOpacity": 25, 736 | "gradientMode": "opacity", 737 | "hideFrom": { 738 | "legend": false, 739 | "tooltip": false, 740 | "viz": false 741 | }, 742 | "lineInterpolation": "smooth", 743 | "lineWidth": 2, 744 | "pointSize": 5, 745 | "scaleDistribution": { 746 | "type": "linear" 747 | }, 748 | "showPoints": "never", 749 | "spanNulls": false, 750 | "stacking": { 751 | "group": "A", 752 | "mode": "none" 753 | }, 754 | "thresholdsStyle": { 755 | "mode": "off" 756 | } 757 | }, 758 | "mappings": [], 759 | "thresholds": { 760 | "mode": "absolute", 761 | "steps": [ 762 | { 763 | "color": "green", 764 | "value": null 765 | }, 766 | { 767 | "color": "red", 768 | "value": 80 769 | } 770 | ] 771 | }, 772 | "unit": "short" 773 | }, 774 | "overrides": [] 775 | }, 776 | "gridPos": { 777 | "h": 8, 778 | "w": 12, 779 | "x": 0, 780 | "y": 24 781 | }, 782 | "id": 50, 783 | "options": { 784 | "legend": { 785 | "calcs": [], 786 | "displayMode": "list", 787 | "placement": "bottom", 788 | "showLegend": true 789 | }, 790 | "tooltip": { 791 | "mode": "single", 792 | "sort": "none" 793 | } 794 | }, 795 | "pluginVersion": "8.3.3", 796 | "targets": [ 797 | { 798 | "datasource": { 799 | "type": "prometheus", 800 | "uid": "${datasource}" 801 | }, 802 | "exemplar": true, 803 | "expr": "sum by(instance) (rate(apiserver_request_total{code=~\"5..\", cluster=~\"$cluster\", job=~\"$job\"}[$__rate_interval]))\n / sum by(instance) (rate(apiserver_request_total{cluster=~\"$cluster\", job=~\"$job\"}[$__rate_interval]))", 804 | "interval": "$resolution", 805 | "legendFormat": "{{ instance }}", 806 | "refId": "A" 807 | } 808 | ], 809 | "title": "API Server - Errors by Instance", 810 | "type": "timeseries" 811 | }, 812 | { 813 | "datasource": { 814 | "type": "prometheus", 815 | "uid": "${datasource}" 816 | }, 817 | "fieldConfig": { 818 | "defaults": { 819 | "color": { 820 | "mode": "palette-classic" 821 | }, 822 | "custom": { 823 | "axisCenteredZero": false, 824 | "axisColorMode": "text", 825 | "axisLabel": "", 826 | "axisPlacement": "auto", 827 | "barAlignment": 0, 828 | "drawStyle": "line", 829 | "fillOpacity": 25, 830 | "gradientMode": "opacity", 831 | "hideFrom": { 832 | "legend": false, 833 | "tooltip": false, 834 | "viz": false 835 | }, 836 | "lineInterpolation": "smooth", 837 | "lineWidth": 2, 838 | "pointSize": 5, 839 | "scaleDistribution": { 840 | "type": "linear" 841 | }, 842 | "showPoints": "never", 843 | "spanNulls": false, 844 | "stacking": { 845 | "group": "A", 846 | "mode": "none" 847 | }, 848 | "thresholdsStyle": { 849 | "mode": "off" 850 | } 851 | }, 852 | "mappings": [], 853 | "thresholds": { 854 | "mode": "absolute", 855 | "steps": [ 856 | { 857 | "color": "green", 858 | "value": null 859 | }, 860 | { 861 | "color": "red", 862 | "value": 80 863 | } 864 | ] 865 | }, 866 | "unit": "short" 867 | }, 868 | "overrides": [] 869 | }, 870 | "gridPos": { 871 | "h": 8, 872 | "w": 12, 873 | "x": 12, 874 | "y": 24 875 | }, 876 | "id": 51, 877 | "options": { 878 | "legend": { 879 | "calcs": [], 880 | "displayMode": "list", 881 | "placement": "bottom", 882 | "showLegend": true 883 | }, 884 | "tooltip": { 885 | "mode": "multi", 886 | "sort": "none" 887 | } 888 | }, 889 | "pluginVersion": "8.3.3", 890 | "targets": [ 891 | { 892 | "datasource": { 893 | "type": "prometheus", 894 | "uid": "${datasource}" 895 | }, 896 | "exemplar": true, 897 | "expr": "sum by(verb) (rate(apiserver_request_total{code=~\"5..\", cluster=~\"$cluster\", job=~\"$job\"}[$__rate_interval]))\n / sum by(verb) (rate(apiserver_request_total{cluster=~\"$cluster\", job=~\"$job\"}[$__rate_interval]))", 898 | "interval": "$resolution", 899 | "legendFormat": "{{ verb }}", 900 | "refId": "A" 901 | } 902 | ], 903 | "title": "API Server - Errors by verb", 904 | "type": "timeseries" 905 | }, 906 | { 907 | "datasource": { 908 | "type": "prometheus", 909 | "uid": "${datasource}" 910 | }, 911 | "fieldConfig": { 912 | "defaults": { 913 | "color": { 914 | "mode": "palette-classic" 915 | }, 916 | "custom": { 917 | "axisCenteredZero": false, 918 | "axisColorMode": "text", 919 | "axisLabel": "", 920 | "axisPlacement": "auto", 921 | "barAlignment": 0, 922 | "drawStyle": "line", 923 | "fillOpacity": 25, 924 | "gradientMode": "opacity", 925 | "hideFrom": { 926 | "legend": false, 927 | "tooltip": false, 928 | "viz": false 929 | }, 930 | "lineInterpolation": "smooth", 931 | "lineWidth": 2, 932 | "pointSize": 5, 933 | "scaleDistribution": { 934 | "type": "linear" 935 | }, 936 | "showPoints": "never", 937 | "spanNulls": false, 938 | "stacking": { 939 | "group": "A", 940 | "mode": "normal" 941 | }, 942 | "thresholdsStyle": { 943 | "mode": "off" 944 | } 945 | }, 946 | "mappings": [], 947 | "thresholds": { 948 | "mode": "absolute", 949 | "steps": [ 950 | { 951 | "color": "green", 952 | "value": null 953 | }, 954 | { 955 | "color": "red", 956 | "value": 80 957 | } 958 | ] 959 | }, 960 | "unit": "short" 961 | }, 962 | "overrides": [] 963 | }, 964 | "gridPos": { 965 | "h": 8, 966 | "w": 12, 967 | "x": 0, 968 | "y": 32 969 | }, 970 | "id": 40, 971 | "options": { 972 | "legend": { 973 | "calcs": [], 974 | "displayMode": "list", 975 | "placement": "bottom", 976 | "showLegend": true 977 | }, 978 | "tooltip": { 979 | "mode": "single", 980 | "sort": "none" 981 | } 982 | }, 983 | "pluginVersion": "8.3.3", 984 | "targets": [ 985 | { 986 | "datasource": { 987 | "type": "prometheus", 988 | "uid": "${datasource}" 989 | }, 990 | "exemplar": true, 991 | "expr": "sum(rate(apiserver_request_total{cluster=~\"$cluster\"}[$__rate_interval])) by (instance)", 992 | "interval": "$resolution", 993 | "legendFormat": "{{ instance }}", 994 | "refId": "A" 995 | } 996 | ], 997 | "title": "API Server - Stacked HTTP Requests by instance", 998 | "type": "timeseries" 999 | }, 1000 | { 1001 | "datasource": { 1002 | "type": "prometheus", 1003 | "uid": "${datasource}" 1004 | }, 1005 | "fieldConfig": { 1006 | "defaults": { 1007 | "color": { 1008 | "mode": "palette-classic" 1009 | }, 1010 | "custom": { 1011 | "axisCenteredZero": false, 1012 | "axisColorMode": "text", 1013 | "axisLabel": "", 1014 | "axisPlacement": "auto", 1015 | "barAlignment": 0, 1016 | "drawStyle": "line", 1017 | "fillOpacity": 25, 1018 | "gradientMode": "opacity", 1019 | "hideFrom": { 1020 | "legend": false, 1021 | "tooltip": false, 1022 | "viz": false 1023 | }, 1024 | "lineInterpolation": "smooth", 1025 | "lineWidth": 2, 1026 | "pointSize": 5, 1027 | "scaleDistribution": { 1028 | "type": "linear" 1029 | }, 1030 | "showPoints": "never", 1031 | "spanNulls": false, 1032 | "stacking": { 1033 | "group": "A", 1034 | "mode": "none" 1035 | }, 1036 | "thresholdsStyle": { 1037 | "mode": "off" 1038 | } 1039 | }, 1040 | "mappings": [], 1041 | "thresholds": { 1042 | "mode": "absolute", 1043 | "steps": [ 1044 | { 1045 | "color": "green", 1046 | "value": null 1047 | }, 1048 | { 1049 | "color": "red", 1050 | "value": 80 1051 | } 1052 | ] 1053 | }, 1054 | "unit": "short" 1055 | }, 1056 | "overrides": [] 1057 | }, 1058 | "gridPos": { 1059 | "h": 8, 1060 | "w": 12, 1061 | "x": 12, 1062 | "y": 32 1063 | }, 1064 | "id": 56, 1065 | "options": { 1066 | "legend": { 1067 | "calcs": [], 1068 | "displayMode": "list", 1069 | "placement": "bottom", 1070 | "showLegend": true 1071 | }, 1072 | "tooltip": { 1073 | "mode": "single", 1074 | "sort": "none" 1075 | } 1076 | }, 1077 | "pluginVersion": "8.3.3", 1078 | "targets": [ 1079 | { 1080 | "datasource": { 1081 | "type": "prometheus", 1082 | "uid": "${datasource}" 1083 | }, 1084 | "exemplar": true, 1085 | "expr": "sum(rate(workqueue_depth{cluster=~\"$cluster\", job=~\"$job\"}[$__rate_interval])) by (instance)", 1086 | "interval": "$resolution", 1087 | "legendFormat": "{{ instance }}", 1088 | "refId": "A" 1089 | } 1090 | ], 1091 | "title": "API Server - Work Queue by instance", 1092 | "type": "timeseries" 1093 | }, 1094 | { 1095 | "datasource": { 1096 | "type": "prometheus", 1097 | "uid": "${datasource}" 1098 | }, 1099 | "fieldConfig": { 1100 | "defaults": { 1101 | "color": { 1102 | "mode": "palette-classic" 1103 | }, 1104 | "custom": { 1105 | "axisCenteredZero": false, 1106 | "axisColorMode": "text", 1107 | "axisLabel": "", 1108 | "axisPlacement": "auto", 1109 | "barAlignment": 0, 1110 | "drawStyle": "line", 1111 | "fillOpacity": 25, 1112 | "gradientMode": "opacity", 1113 | "hideFrom": { 1114 | "legend": false, 1115 | "tooltip": false, 1116 | "viz": false 1117 | }, 1118 | "lineInterpolation": "smooth", 1119 | "lineWidth": 2, 1120 | "pointSize": 5, 1121 | "scaleDistribution": { 1122 | "type": "linear" 1123 | }, 1124 | "showPoints": "never", 1125 | "spanNulls": false, 1126 | "stacking": { 1127 | "group": "A", 1128 | "mode": "none" 1129 | }, 1130 | "thresholdsStyle": { 1131 | "mode": "off" 1132 | } 1133 | }, 1134 | "decimals": 2, 1135 | "mappings": [], 1136 | "thresholds": { 1137 | "mode": "absolute", 1138 | "steps": [ 1139 | { 1140 | "color": "green", 1141 | "value": null 1142 | }, 1143 | { 1144 | "color": "red", 1145 | "value": 80 1146 | } 1147 | ] 1148 | }, 1149 | "unit": "percent" 1150 | }, 1151 | "overrides": [] 1152 | }, 1153 | "gridPos": { 1154 | "h": 8, 1155 | "w": 12, 1156 | "x": 0, 1157 | "y": 40 1158 | }, 1159 | "id": 47, 1160 | "options": { 1161 | "legend": { 1162 | "calcs": [], 1163 | "displayMode": "list", 1164 | "placement": "bottom", 1165 | "showLegend": true 1166 | }, 1167 | "tooltip": { 1168 | "mode": "single", 1169 | "sort": "none" 1170 | } 1171 | }, 1172 | "pluginVersion": "8.3.3", 1173 | "targets": [ 1174 | { 1175 | "datasource": { 1176 | "type": "prometheus", 1177 | "uid": "${datasource}" 1178 | }, 1179 | "exemplar": true, 1180 | "expr": "rate(process_cpu_seconds_total{cluster=~\"$cluster\", job=~\"$job\"}[$__rate_interval])", 1181 | "interval": "$resolution", 1182 | "legendFormat": "{{ instance }}", 1183 | "refId": "A" 1184 | } 1185 | ], 1186 | "title": "API Server - CPU Usage by instance", 1187 | "type": "timeseries" 1188 | }, 1189 | { 1190 | "datasource": { 1191 | "type": "prometheus", 1192 | "uid": "${datasource}" 1193 | }, 1194 | "fieldConfig": { 1195 | "defaults": { 1196 | "color": { 1197 | "mode": "palette-classic" 1198 | }, 1199 | "custom": { 1200 | "axisCenteredZero": false, 1201 | "axisColorMode": "text", 1202 | "axisLabel": "", 1203 | "axisPlacement": "auto", 1204 | "barAlignment": 0, 1205 | "drawStyle": "line", 1206 | "fillOpacity": 25, 1207 | "gradientMode": "opacity", 1208 | "hideFrom": { 1209 | "legend": false, 1210 | "tooltip": false, 1211 | "viz": false 1212 | }, 1213 | "lineInterpolation": "smooth", 1214 | "lineWidth": 2, 1215 | "pointSize": 5, 1216 | "scaleDistribution": { 1217 | "type": "linear" 1218 | }, 1219 | "showPoints": "never", 1220 | "spanNulls": false, 1221 | "stacking": { 1222 | "group": "A", 1223 | "mode": "none" 1224 | }, 1225 | "thresholdsStyle": { 1226 | "mode": "off" 1227 | } 1228 | }, 1229 | "mappings": [], 1230 | "thresholds": { 1231 | "mode": "absolute", 1232 | "steps": [ 1233 | { 1234 | "color": "green", 1235 | "value": null 1236 | }, 1237 | { 1238 | "color": "red", 1239 | "value": 80 1240 | } 1241 | ] 1242 | }, 1243 | "unit": "bytes" 1244 | }, 1245 | "overrides": [] 1246 | }, 1247 | "gridPos": { 1248 | "h": 8, 1249 | "w": 12, 1250 | "x": 12, 1251 | "y": 40 1252 | }, 1253 | "id": 48, 1254 | "options": { 1255 | "legend": { 1256 | "calcs": [], 1257 | "displayMode": "list", 1258 | "placement": "bottom", 1259 | "showLegend": true 1260 | }, 1261 | "tooltip": { 1262 | "mode": "single", 1263 | "sort": "none" 1264 | } 1265 | }, 1266 | "pluginVersion": "8.3.3", 1267 | "targets": [ 1268 | { 1269 | "datasource": { 1270 | "type": "prometheus", 1271 | "uid": "${datasource}" 1272 | }, 1273 | "exemplar": true, 1274 | "expr": "process_resident_memory_bytes{cluster=~\"$cluster\", job=~\"$job\"}", 1275 | "interval": "$resolution", 1276 | "legendFormat": "{{ instance }}", 1277 | "refId": "A" 1278 | } 1279 | ], 1280 | "title": "API Server - Memory Usage by instance", 1281 | "type": "timeseries" 1282 | } 1283 | ], 1284 | "refresh": "30s", 1285 | "schemaVersion": 38, 1286 | "style": "dark", 1287 | "tags": [ 1288 | "Kubernetes", 1289 | "Prometheus" 1290 | ], 1291 | "templating": { 1292 | "list": [ 1293 | { 1294 | "current": { 1295 | "selected": false, 1296 | "text": "Prometheus", 1297 | "value": "Prometheus" 1298 | }, 1299 | "hide": 0, 1300 | "includeAll": false, 1301 | "label": "", 1302 | "multi": false, 1303 | "name": "datasource", 1304 | "options": [], 1305 | "query": "prometheus", 1306 | "queryValue": "", 1307 | "refresh": 1, 1308 | "regex": "", 1309 | "skipUrlSync": false, 1310 | "type": "datasource" 1311 | }, 1312 | { 1313 | "current": { 1314 | "isNone": true, 1315 | "selected": false, 1316 | "text": "None", 1317 | "value": "" 1318 | }, 1319 | "datasource": { 1320 | "type": "prometheus", 1321 | "uid": "${datasource}" 1322 | }, 1323 | "definition": "label_values(kube_node_info,cluster)", 1324 | "hide": 0, 1325 | "includeAll": false, 1326 | "multi": false, 1327 | "name": "cluster", 1328 | "options": [], 1329 | "query": { 1330 | "qryType": 1, 1331 | "query": "label_values(kube_node_info,cluster)", 1332 | "refId": "PrometheusVariableQueryEditor-VariableQuery" 1333 | }, 1334 | "refresh": 1, 1335 | "regex": "", 1336 | "skipUrlSync": false, 1337 | "sort": 1, 1338 | "type": "query" 1339 | }, 1340 | { 1341 | "current": { 1342 | "selected": true, 1343 | "text": "30s", 1344 | "value": "30s" 1345 | }, 1346 | "hide": 0, 1347 | "includeAll": false, 1348 | "multi": false, 1349 | "name": "resolution", 1350 | "options": [ 1351 | { 1352 | "selected": false, 1353 | "text": "1s", 1354 | "value": "1s" 1355 | }, 1356 | { 1357 | "selected": false, 1358 | "text": "15s", 1359 | "value": "15s" 1360 | }, 1361 | { 1362 | "selected": true, 1363 | "text": "30s", 1364 | "value": "30s" 1365 | }, 1366 | { 1367 | "selected": false, 1368 | "text": "1m", 1369 | "value": "1m" 1370 | }, 1371 | { 1372 | "selected": false, 1373 | "text": "3m", 1374 | "value": "3m" 1375 | }, 1376 | { 1377 | "selected": false, 1378 | "text": "5m", 1379 | "value": "5m" 1380 | } 1381 | ], 1382 | "query": "1s, 15s, 30s, 1m, 3m, 5m", 1383 | "queryValue": "", 1384 | "skipUrlSync": false, 1385 | "type": "custom" 1386 | }, 1387 | { 1388 | "current": {}, 1389 | "datasource": { 1390 | "type": "prometheus", 1391 | "uid": "${datasource}" 1392 | }, 1393 | "definition": "label_values(apiserver_request_total{cluster=\"$cluster\"}, job)", 1394 | "hide": 0, 1395 | "includeAll": false, 1396 | "multi": true, 1397 | "name": "job", 1398 | "options": [], 1399 | "query": { 1400 | "qryType": 1, 1401 | "query": "label_values(apiserver_request_total{cluster=\"$cluster\"}, job)", 1402 | "refId": "PrometheusVariableQueryEditor-VariableQuery" 1403 | }, 1404 | "refresh": 1, 1405 | "regex": "", 1406 | "skipUrlSync": false, 1407 | "sort": 1, 1408 | "type": "query" 1409 | } 1410 | ] 1411 | }, 1412 | "time": { 1413 | "from": "now-1h", 1414 | "to": "now" 1415 | }, 1416 | "timepicker": {}, 1417 | "timezone": "", 1418 | "title": "Kubernetes / System / API Server", 1419 | "uid": "k8s_system_apisrv", 1420 | "version": 20, 1421 | "weekStart": "" 1422 | } 1423 | -------------------------------------------------------------------------------- /dashboards/k8s-system-coredns.json: -------------------------------------------------------------------------------- 1 | { 2 | "__inputs": [ 3 | { 4 | "name": "DS_PROMETHEUS", 5 | "label": "Prometheus", 6 | "description": "", 7 | "type": "datasource", 8 | "pluginId": "prometheus", 9 | "pluginName": "Prometheus" 10 | } 11 | ], 12 | "__elements": [], 13 | "__requires": [ 14 | { 15 | "type": "grafana", 16 | "id": "grafana", 17 | "name": "Grafana", 18 | "version": "8.4.4" 19 | }, 20 | { 21 | "type": "datasource", 22 | "id": "prometheus", 23 | "name": "Prometheus", 24 | "version": "5.0.0" 25 | }, 26 | { 27 | "type": "panel", 28 | "id": "timeseries", 29 | "name": "Time series", 30 | "version": "" 31 | }, 32 | { 33 | "type": "panel", 34 | "id": "stat", 35 | "name": "Stat", 36 | "version": "" 37 | } 38 | ], 39 | "annotations": { 40 | "list": [ 41 | { 42 | "builtIn": 1, 43 | "datasource": { 44 | "type": "datasource", 45 | "uid": "grafana" 46 | }, 47 | "enable": true, 48 | "hide": true, 49 | "iconColor": "rgba(0, 211, 255, 1)", 50 | "name": "Annotations & Alerts", 51 | "target": { 52 | "limit": 100, 53 | "matchAny": false, 54 | "tags": [], 55 | "type": "dashboard" 56 | }, 57 | "type": "dashboard" 58 | }, 59 | { 60 | "datasource": { 61 | "type": "datasource", 62 | "uid": "grafana" 63 | }, 64 | "enable": true, 65 | "hide": false, 66 | "iconColor": "#5c4ee5", 67 | "name": "terraform", 68 | "target": { 69 | "limit": 100, 70 | "matchAny": false, 71 | "tags": [ 72 | "terraform" 73 | ], 74 | "type": "tags" 75 | } 76 | }, 77 | { 78 | "datasource": { 79 | "type": "datasource", 80 | "uid": "grafana" 81 | }, 82 | "enable": true, 83 | "hide": false, 84 | "iconColor": "red", 85 | "name": "oncall", 86 | "target": { 87 | "limit": 100, 88 | "matchAny": false, 89 | "tags": [ 90 | "oncall" 91 | ], 92 | "type": "tags" 93 | } 94 | } 95 | ] 96 | }, 97 | "description": "This is a modern CoreDNS dashboard for your Kubernetes cluster(s). Made for kube-prometheus-stack and take advantage of the latest Grafana features. GitHub repository: https://github.com/dotdc/grafana-dashboards-kubernetes", 98 | "editable": true, 99 | "fiscalYearStartMonth": 0, 100 | "graphTooltip": 1, 101 | "links": [], 102 | "liveNow": false, 103 | "panels": [ 104 | { 105 | "datasource": { 106 | "type": "prometheus", 107 | "uid": "${datasource}" 108 | }, 109 | "fieldConfig": { 110 | "defaults": { 111 | "mappings": [ 112 | { 113 | "options": { 114 | "0": { 115 | "text": "DOWN" 116 | }, 117 | "1": { 118 | "text": "UP" 119 | } 120 | }, 121 | "type": "value" 122 | } 123 | ], 124 | "thresholds": { 125 | "mode": "absolute", 126 | "steps": [ 127 | { 128 | "color": "red", 129 | "value": null 130 | }, 131 | { 132 | "color": "green", 133 | "value": 1 134 | } 135 | ] 136 | } 137 | }, 138 | "overrides": [] 139 | }, 140 | "gridPos": { 141 | "h": 3, 142 | "w": 24, 143 | "x": 0, 144 | "y": 0 145 | }, 146 | "id": 25, 147 | "options": { 148 | "colorMode": "background", 149 | "graphMode": "none", 150 | "justifyMode": "auto", 151 | "orientation": "vertical", 152 | "reduceOptions": { 153 | "calcs": [ 154 | "lastNotNull" 155 | ], 156 | "fields": "", 157 | "values": false 158 | }, 159 | "showPercentChange": false, 160 | "textMode": "value_and_name", 161 | "wideLayout": true 162 | }, 163 | "pluginVersion": "10.4.1", 164 | "targets": [ 165 | { 166 | "datasource": { 167 | "type": "prometheus", 168 | "uid": "${datasource}" 169 | }, 170 | "exemplar": true, 171 | "expr": "up{job=~\"$job\", instance=~\"$instance\", cluster=~\"$cluster\"}", 172 | "interval": "", 173 | "legendFormat": "{{ instance }}", 174 | "refId": "A" 175 | } 176 | ], 177 | "title": "CoreDNS - Health Status", 178 | "type": "stat" 179 | }, 180 | { 181 | "datasource": { 182 | "type": "prometheus", 183 | "uid": "${datasource}" 184 | }, 185 | "fieldConfig": { 186 | "defaults": { 187 | "color": { 188 | "mode": "palette-classic" 189 | }, 190 | "custom": { 191 | "axisBorderShow": false, 192 | "axisCenteredZero": false, 193 | "axisColorMode": "text", 194 | "axisLabel": "", 195 | "axisPlacement": "auto", 196 | "barAlignment": 0, 197 | "drawStyle": "line", 198 | "fillOpacity": 25, 199 | "gradientMode": "opacity", 200 | "hideFrom": { 201 | "legend": false, 202 | "tooltip": false, 203 | "viz": false 204 | }, 205 | "insertNulls": false, 206 | "lineInterpolation": "smooth", 207 | "lineWidth": 2, 208 | "pointSize": 5, 209 | "scaleDistribution": { 210 | "type": "linear" 211 | }, 212 | "showPoints": "never", 213 | "spanNulls": false, 214 | "stacking": { 215 | "group": "A", 216 | "mode": "none" 217 | }, 218 | "thresholdsStyle": { 219 | "mode": "off" 220 | } 221 | }, 222 | "decimals": 2, 223 | "mappings": [], 224 | "thresholds": { 225 | "mode": "absolute", 226 | "steps": [ 227 | { 228 | "color": "green", 229 | "value": null 230 | }, 231 | { 232 | "color": "red", 233 | "value": 80 234 | } 235 | ] 236 | }, 237 | "unit": "percentunit" 238 | }, 239 | "overrides": [] 240 | }, 241 | "gridPos": { 242 | "h": 8, 243 | "w": 12, 244 | "x": 0, 245 | "y": 3 246 | }, 247 | "id": 19, 248 | "options": { 249 | "legend": { 250 | "calcs": [], 251 | "displayMode": "list", 252 | "placement": "bottom", 253 | "showLegend": true 254 | }, 255 | "tooltip": { 256 | "mode": "single", 257 | "sort": "none" 258 | } 259 | }, 260 | "pluginVersion": "8.3.3", 261 | "targets": [ 262 | { 263 | "datasource": { 264 | "type": "prometheus", 265 | "uid": "${datasource}" 266 | }, 267 | "exemplar": true, 268 | "expr": "rate(process_cpu_seconds_total{job=~\"$job\", instance=~\"$instance\", cluster=~\"$cluster\"}[$__rate_interval])", 269 | "interval": "$resolution", 270 | "legendFormat": "{{ instance }}", 271 | "refId": "A" 272 | } 273 | ], 274 | "title": "CoreDNS - CPU Usage by instance", 275 | "type": "timeseries" 276 | }, 277 | { 278 | "datasource": { 279 | "type": "prometheus", 280 | "uid": "${datasource}" 281 | }, 282 | "fieldConfig": { 283 | "defaults": { 284 | "color": { 285 | "mode": "palette-classic" 286 | }, 287 | "custom": { 288 | "axisBorderShow": false, 289 | "axisCenteredZero": false, 290 | "axisColorMode": "text", 291 | "axisLabel": "", 292 | "axisPlacement": "auto", 293 | "barAlignment": 0, 294 | "drawStyle": "line", 295 | "fillOpacity": 25, 296 | "gradientMode": "opacity", 297 | "hideFrom": { 298 | "legend": false, 299 | "tooltip": false, 300 | "viz": false 301 | }, 302 | "insertNulls": false, 303 | "lineInterpolation": "smooth", 304 | "lineWidth": 2, 305 | "pointSize": 5, 306 | "scaleDistribution": { 307 | "type": "linear" 308 | }, 309 | "showPoints": "never", 310 | "spanNulls": false, 311 | "stacking": { 312 | "group": "A", 313 | "mode": "none" 314 | }, 315 | "thresholdsStyle": { 316 | "mode": "off" 317 | } 318 | }, 319 | "mappings": [], 320 | "thresholds": { 321 | "mode": "absolute", 322 | "steps": [ 323 | { 324 | "color": "green", 325 | "value": null 326 | }, 327 | { 328 | "color": "red", 329 | "value": 80 330 | } 331 | ] 332 | }, 333 | "unit": "bytes" 334 | }, 335 | "overrides": [] 336 | }, 337 | "gridPos": { 338 | "h": 8, 339 | "w": 12, 340 | "x": 12, 341 | "y": 3 342 | }, 343 | "id": 21, 344 | "options": { 345 | "legend": { 346 | "calcs": [], 347 | "displayMode": "list", 348 | "placement": "bottom", 349 | "showLegend": true 350 | }, 351 | "tooltip": { 352 | "mode": "single", 353 | "sort": "none" 354 | } 355 | }, 356 | "pluginVersion": "8.3.3", 357 | "targets": [ 358 | { 359 | "datasource": { 360 | "type": "prometheus", 361 | "uid": "${datasource}" 362 | }, 363 | "exemplar": true, 364 | "expr": "process_resident_memory_bytes{job=~\"$job\", instance=~\"$instance\", cluster=~\"$cluster\"}", 365 | "interval": "", 366 | "legendFormat": "{{ instance }}", 367 | "refId": "A" 368 | } 369 | ], 370 | "title": "CoreDNS - Memory Usage by instance", 371 | "type": "timeseries" 372 | }, 373 | { 374 | "datasource": { 375 | "type": "prometheus", 376 | "uid": "${datasource}" 377 | }, 378 | "fieldConfig": { 379 | "defaults": { 380 | "color": { 381 | "mode": "palette-classic" 382 | }, 383 | "custom": { 384 | "axisBorderShow": false, 385 | "axisCenteredZero": false, 386 | "axisColorMode": "text", 387 | "axisLabel": "", 388 | "axisPlacement": "auto", 389 | "barAlignment": 0, 390 | "drawStyle": "line", 391 | "fillOpacity": 25, 392 | "gradientMode": "opacity", 393 | "hideFrom": { 394 | "legend": false, 395 | "tooltip": false, 396 | "viz": false 397 | }, 398 | "insertNulls": false, 399 | "lineInterpolation": "smooth", 400 | "lineWidth": 2, 401 | "pointSize": 5, 402 | "scaleDistribution": { 403 | "type": "linear" 404 | }, 405 | "showPoints": "never", 406 | "spanNulls": false, 407 | "stacking": { 408 | "group": "A", 409 | "mode": "none" 410 | }, 411 | "thresholdsStyle": { 412 | "mode": "off" 413 | } 414 | }, 415 | "mappings": [], 416 | "thresholds": { 417 | "mode": "absolute", 418 | "steps": [ 419 | { 420 | "color": "green", 421 | "value": null 422 | }, 423 | { 424 | "color": "red", 425 | "value": 80 426 | } 427 | ] 428 | }, 429 | "unit": "short" 430 | }, 431 | "overrides": [] 432 | }, 433 | "gridPos": { 434 | "h": 8, 435 | "w": 12, 436 | "x": 0, 437 | "y": 11 438 | }, 439 | "id": 9, 440 | "options": { 441 | "legend": { 442 | "calcs": [], 443 | "displayMode": "list", 444 | "placement": "bottom", 445 | "showLegend": false 446 | }, 447 | "tooltip": { 448 | "mode": "multi", 449 | "sort": "none" 450 | } 451 | }, 452 | "pluginVersion": "8.3.3", 453 | "targets": [ 454 | { 455 | "datasource": { 456 | "type": "prometheus", 457 | "uid": "${datasource}" 458 | }, 459 | "exemplar": true, 460 | "expr": "sum(rate(coredns_dns_requests_total{instance=~\"$instance\",proto=\"$protocol\", cluster=~\"$cluster\", job=~\"$job\"}[$__rate_interval]))", 461 | "interval": "$resolution", 462 | "legendFormat": "total $protocol requests", 463 | "refId": "A" 464 | } 465 | ], 466 | "title": "CoreDNS - Total DNS Requests ($protocol)", 467 | "type": "timeseries" 468 | }, 469 | { 470 | "datasource": { 471 | "type": "prometheus", 472 | "uid": "${datasource}" 473 | }, 474 | "fieldConfig": { 475 | "defaults": { 476 | "color": { 477 | "mode": "palette-classic" 478 | }, 479 | "custom": { 480 | "axisBorderShow": false, 481 | "axisCenteredZero": false, 482 | "axisColorMode": "text", 483 | "axisLabel": "", 484 | "axisPlacement": "auto", 485 | "barAlignment": 0, 486 | "drawStyle": "line", 487 | "fillOpacity": 25, 488 | "gradientMode": "opacity", 489 | "hideFrom": { 490 | "legend": false, 491 | "tooltip": false, 492 | "viz": false 493 | }, 494 | "insertNulls": false, 495 | "lineInterpolation": "smooth", 496 | "lineWidth": 2, 497 | "pointSize": 5, 498 | "scaleDistribution": { 499 | "type": "linear" 500 | }, 501 | "showPoints": "never", 502 | "spanNulls": false, 503 | "stacking": { 504 | "group": "A", 505 | "mode": "none" 506 | }, 507 | "thresholdsStyle": { 508 | "mode": "off" 509 | } 510 | }, 511 | "mappings": [], 512 | "thresholds": { 513 | "mode": "absolute", 514 | "steps": [ 515 | { 516 | "color": "green", 517 | "value": null 518 | }, 519 | { 520 | "color": "red", 521 | "value": 80 522 | } 523 | ] 524 | }, 525 | "unit": "bytes" 526 | }, 527 | "overrides": [] 528 | }, 529 | "gridPos": { 530 | "h": 8, 531 | "w": 12, 532 | "x": 12, 533 | "y": 11 534 | }, 535 | "id": 7, 536 | "options": { 537 | "legend": { 538 | "calcs": [], 539 | "displayMode": "list", 540 | "placement": "bottom", 541 | "showLegend": false 542 | }, 543 | "tooltip": { 544 | "mode": "multi", 545 | "sort": "none" 546 | } 547 | }, 548 | "pluginVersion": "8.3.3", 549 | "targets": [ 550 | { 551 | "datasource": { 552 | "type": "prometheus", 553 | "uid": "${datasource}" 554 | }, 555 | "exemplar": true, 556 | "expr": "sum(rate(coredns_dns_request_size_bytes_sum{instance=~\"$instance\",proto=\"$protocol\", cluster=~\"$cluster\", job=~\"$job\"}[$__rate_interval])) by (proto) / sum(rate(coredns_dns_request_size_bytes_count{instance=~\"$instance\",proto=\"$protocol\", cluster=~\"$cluster\", job=~\"$job\"}[$__rate_interval])) by (proto)", 557 | "interval": "$resolution", 558 | "legendFormat": "average $protocol packet size", 559 | "refId": "A" 560 | } 561 | ], 562 | "title": "CoreDNS - Average Packet Size ($protocol)", 563 | "type": "timeseries" 564 | }, 565 | { 566 | "datasource": { 567 | "type": "prometheus", 568 | "uid": "${datasource}" 569 | }, 570 | "fieldConfig": { 571 | "defaults": { 572 | "color": { 573 | "mode": "palette-classic" 574 | }, 575 | "custom": { 576 | "axisBorderShow": false, 577 | "axisCenteredZero": false, 578 | "axisColorMode": "text", 579 | "axisLabel": "", 580 | "axisPlacement": "auto", 581 | "barAlignment": 0, 582 | "drawStyle": "line", 583 | "fillOpacity": 25, 584 | "gradientMode": "opacity", 585 | "hideFrom": { 586 | "legend": false, 587 | "tooltip": false, 588 | "viz": false 589 | }, 590 | "insertNulls": false, 591 | "lineInterpolation": "smooth", 592 | "lineWidth": 2, 593 | "pointSize": 5, 594 | "scaleDistribution": { 595 | "type": "linear" 596 | }, 597 | "showPoints": "never", 598 | "spanNulls": false, 599 | "stacking": { 600 | "group": "A", 601 | "mode": "none" 602 | }, 603 | "thresholdsStyle": { 604 | "mode": "off" 605 | } 606 | }, 607 | "mappings": [], 608 | "thresholds": { 609 | "mode": "absolute", 610 | "steps": [ 611 | { 612 | "color": "green", 613 | "value": null 614 | }, 615 | { 616 | "color": "red", 617 | "value": 80 618 | } 619 | ] 620 | }, 621 | "unit": "short" 622 | }, 623 | "overrides": [] 624 | }, 625 | "gridPos": { 626 | "h": 8, 627 | "w": 12, 628 | "x": 0, 629 | "y": 19 630 | }, 631 | "id": 2, 632 | "options": { 633 | "legend": { 634 | "calcs": [], 635 | "displayMode": "list", 636 | "placement": "bottom", 637 | "showLegend": true 638 | }, 639 | "tooltip": { 640 | "mode": "multi", 641 | "sort": "desc" 642 | } 643 | }, 644 | "pluginVersion": "8.3.3", 645 | "targets": [ 646 | { 647 | "datasource": { 648 | "type": "prometheus", 649 | "uid": "${datasource}" 650 | }, 651 | "exemplar": true, 652 | "expr": "sum(rate(coredns_dns_requests_total{instance=~\"$instance\", cluster=~\"$cluster\", job=~\"$job\"}[$__rate_interval])) by (type)", 653 | "interval": "$resolution", 654 | "legendFormat": "{{ type }}", 655 | "refId": "A" 656 | } 657 | ], 658 | "title": "CoreDNS - Requests by type", 659 | "type": "timeseries" 660 | }, 661 | { 662 | "datasource": { 663 | "type": "prometheus", 664 | "uid": "${datasource}" 665 | }, 666 | "fieldConfig": { 667 | "defaults": { 668 | "color": { 669 | "mode": "palette-classic" 670 | }, 671 | "custom": { 672 | "axisBorderShow": false, 673 | "axisCenteredZero": false, 674 | "axisColorMode": "text", 675 | "axisLabel": "", 676 | "axisPlacement": "auto", 677 | "barAlignment": 0, 678 | "drawStyle": "line", 679 | "fillOpacity": 25, 680 | "gradientMode": "opacity", 681 | "hideFrom": { 682 | "legend": false, 683 | "tooltip": false, 684 | "viz": false 685 | }, 686 | "insertNulls": false, 687 | "lineInterpolation": "smooth", 688 | "lineWidth": 2, 689 | "pointSize": 5, 690 | "scaleDistribution": { 691 | "type": "linear" 692 | }, 693 | "showPoints": "never", 694 | "spanNulls": false, 695 | "stacking": { 696 | "group": "A", 697 | "mode": "none" 698 | }, 699 | "thresholdsStyle": { 700 | "mode": "off" 701 | } 702 | }, 703 | "mappings": [], 704 | "thresholds": { 705 | "mode": "absolute", 706 | "steps": [ 707 | { 708 | "color": "green", 709 | "value": null 710 | }, 711 | { 712 | "color": "red", 713 | "value": 80 714 | } 715 | ] 716 | }, 717 | "unit": "short" 718 | }, 719 | "overrides": [] 720 | }, 721 | "gridPos": { 722 | "h": 8, 723 | "w": 12, 724 | "x": 12, 725 | "y": 19 726 | }, 727 | "id": 4, 728 | "options": { 729 | "legend": { 730 | "calcs": [], 731 | "displayMode": "list", 732 | "placement": "bottom", 733 | "showLegend": true 734 | }, 735 | "tooltip": { 736 | "mode": "multi", 737 | "sort": "desc" 738 | } 739 | }, 740 | "pluginVersion": "8.3.3", 741 | "targets": [ 742 | { 743 | "datasource": { 744 | "type": "prometheus", 745 | "uid": "${datasource}" 746 | }, 747 | "exemplar": true, 748 | "expr": "sum(rate(coredns_dns_responses_total{instance=~\"$instance\", cluster=~\"$cluster\", job=~\"$job\"}[$__rate_interval])) by (rcode)", 749 | "interval": "$resolution", 750 | "legendFormat": "{{ rcode }}", 751 | "refId": "A" 752 | } 753 | ], 754 | "title": "CoreDNS - Requests by return code", 755 | "type": "timeseries" 756 | }, 757 | { 758 | "datasource": { 759 | "type": "prometheus", 760 | "uid": "${datasource}" 761 | }, 762 | "fieldConfig": { 763 | "defaults": { 764 | "color": { 765 | "mode": "palette-classic" 766 | }, 767 | "custom": { 768 | "axisBorderShow": false, 769 | "axisCenteredZero": false, 770 | "axisColorMode": "text", 771 | "axisLabel": "", 772 | "axisPlacement": "auto", 773 | "barAlignment": 0, 774 | "drawStyle": "line", 775 | "fillOpacity": 25, 776 | "gradientMode": "opacity", 777 | "hideFrom": { 778 | "legend": false, 779 | "tooltip": false, 780 | "viz": false 781 | }, 782 | "insertNulls": false, 783 | "lineInterpolation": "smooth", 784 | "lineWidth": 2, 785 | "pointSize": 5, 786 | "scaleDistribution": { 787 | "type": "linear" 788 | }, 789 | "showPoints": "never", 790 | "spanNulls": false, 791 | "stacking": { 792 | "group": "A", 793 | "mode": "none" 794 | }, 795 | "thresholdsStyle": { 796 | "mode": "off" 797 | } 798 | }, 799 | "mappings": [], 800 | "thresholds": { 801 | "mode": "absolute", 802 | "steps": [ 803 | { 804 | "color": "green", 805 | "value": null 806 | }, 807 | { 808 | "color": "red", 809 | "value": 80 810 | } 811 | ] 812 | }, 813 | "unit": "short" 814 | }, 815 | "overrides": [] 816 | }, 817 | "gridPos": { 818 | "h": 8, 819 | "w": 12, 820 | "x": 0, 821 | "y": 27 822 | }, 823 | "id": 23, 824 | "options": { 825 | "legend": { 826 | "calcs": [], 827 | "displayMode": "list", 828 | "placement": "bottom", 829 | "showLegend": false 830 | }, 831 | "tooltip": { 832 | "mode": "multi", 833 | "sort": "none" 834 | } 835 | }, 836 | "pluginVersion": "8.3.3", 837 | "targets": [ 838 | { 839 | "datasource": { 840 | "type": "prometheus", 841 | "uid": "${datasource}" 842 | }, 843 | "exemplar": true, 844 | "expr": "sum(rate(coredns_proxy_request_duration_seconds_count{proxy_name=\"forward\", cluster=~\"$cluster\", job=~\"$job\"}[$__rate_interval]))", 845 | "interval": "$resolution", 846 | "legendFormat": "total forward requests", 847 | "refId": "A" 848 | } 849 | ], 850 | "title": "CoreDNS - Total Forward Requests", 851 | "type": "timeseries" 852 | }, 853 | { 854 | "datasource": { 855 | "type": "prometheus", 856 | "uid": "${datasource}" 857 | }, 858 | "fieldConfig": { 859 | "defaults": { 860 | "color": { 861 | "mode": "palette-classic" 862 | }, 863 | "custom": { 864 | "axisBorderShow": false, 865 | "axisCenteredZero": false, 866 | "axisColorMode": "text", 867 | "axisLabel": "", 868 | "axisPlacement": "auto", 869 | "barAlignment": 0, 870 | "drawStyle": "line", 871 | "fillOpacity": 25, 872 | "gradientMode": "opacity", 873 | "hideFrom": { 874 | "legend": false, 875 | "tooltip": false, 876 | "viz": false 877 | }, 878 | "insertNulls": false, 879 | "lineInterpolation": "smooth", 880 | "lineWidth": 2, 881 | "pointSize": 5, 882 | "scaleDistribution": { 883 | "type": "linear" 884 | }, 885 | "showPoints": "never", 886 | "spanNulls": false, 887 | "stacking": { 888 | "group": "A", 889 | "mode": "none" 890 | }, 891 | "thresholdsStyle": { 892 | "mode": "off" 893 | } 894 | }, 895 | "mappings": [], 896 | "thresholds": { 897 | "mode": "absolute", 898 | "steps": [ 899 | { 900 | "color": "green", 901 | "value": null 902 | }, 903 | { 904 | "color": "red", 905 | "value": 80 906 | } 907 | ] 908 | }, 909 | "unit": "short" 910 | }, 911 | "overrides": [] 912 | }, 913 | "gridPos": { 914 | "h": 8, 915 | "w": 12, 916 | "x": 12, 917 | "y": 27 918 | }, 919 | "id": 13, 920 | "options": { 921 | "legend": { 922 | "calcs": [], 923 | "displayMode": "list", 924 | "placement": "bottom", 925 | "showLegend": true 926 | }, 927 | "tooltip": { 928 | "mode": "multi", 929 | "sort": "none" 930 | } 931 | }, 932 | "pluginVersion": "8.3.3", 933 | "targets": [ 934 | { 935 | "datasource": { 936 | "type": "prometheus", 937 | "uid": "${datasource}" 938 | }, 939 | "exemplar": true, 940 | "expr": "sum(rate(coredns_proxy_request_duration_seconds_count{proxy_name=\"forward\", rcode=~\"SERVFAIL|REFUSED\", cluster=~\"$cluster\", job=~\"$job\"}[$__rate_interval])) by (rcode)", 941 | "interval": "$resolution", 942 | "legendFormat": "{{ rcode }}", 943 | "refId": "A" 944 | } 945 | ], 946 | "title": "CoreDNS - DNS Errors", 947 | "type": "timeseries" 948 | }, 949 | { 950 | "datasource": { 951 | "type": "prometheus", 952 | "uid": "${datasource}" 953 | }, 954 | "fieldConfig": { 955 | "defaults": { 956 | "color": { 957 | "mode": "palette-classic" 958 | }, 959 | "custom": { 960 | "axisBorderShow": false, 961 | "axisCenteredZero": false, 962 | "axisColorMode": "text", 963 | "axisLabel": "", 964 | "axisPlacement": "auto", 965 | "barAlignment": 0, 966 | "drawStyle": "line", 967 | "fillOpacity": 25, 968 | "gradientMode": "opacity", 969 | "hideFrom": { 970 | "legend": false, 971 | "tooltip": false, 972 | "viz": false 973 | }, 974 | "insertNulls": false, 975 | "lineInterpolation": "smooth", 976 | "lineWidth": 2, 977 | "pointSize": 5, 978 | "scaleDistribution": { 979 | "type": "linear" 980 | }, 981 | "showPoints": "never", 982 | "spanNulls": false, 983 | "stacking": { 984 | "group": "A", 985 | "mode": "none" 986 | }, 987 | "thresholdsStyle": { 988 | "mode": "off" 989 | } 990 | }, 991 | "mappings": [], 992 | "thresholds": { 993 | "mode": "absolute", 994 | "steps": [ 995 | { 996 | "color": "green", 997 | "value": null 998 | }, 999 | { 1000 | "color": "red", 1001 | "value": 80 1002 | } 1003 | ] 1004 | }, 1005 | "unit": "short" 1006 | }, 1007 | "overrides": [] 1008 | }, 1009 | "gridPos": { 1010 | "h": 8, 1011 | "w": 12, 1012 | "x": 0, 1013 | "y": 35 1014 | }, 1015 | "id": 17, 1016 | "options": { 1017 | "legend": { 1018 | "calcs": [], 1019 | "displayMode": "list", 1020 | "placement": "bottom", 1021 | "showLegend": true 1022 | }, 1023 | "tooltip": { 1024 | "mode": "multi", 1025 | "sort": "desc" 1026 | } 1027 | }, 1028 | "pluginVersion": "8.3.3", 1029 | "targets": [ 1030 | { 1031 | "datasource": { 1032 | "type": "prometheus", 1033 | "uid": "${datasource}" 1034 | }, 1035 | "exemplar": true, 1036 | "expr": "sum(rate(coredns_cache_hits_total{instance=~\"$instance\", cluster=~\"$cluster\", job=~\"$job\"}[$__rate_interval])) by (type)", 1037 | "interval": "$resolution", 1038 | "legendFormat": "{{ type }}", 1039 | "refId": "A" 1040 | }, 1041 | { 1042 | "datasource": { 1043 | "type": "prometheus", 1044 | "uid": "${datasource}" 1045 | }, 1046 | "exemplar": true, 1047 | "expr": "sum(rate(coredns_cache_misses_total{instance=~\"$instance\", cluster=~\"$cluster\", job=~\"$job\"}[$__rate_interval])) by (type)", 1048 | "interval": "$resolution", 1049 | "legendFormat": "misses", 1050 | "refId": "B" 1051 | } 1052 | ], 1053 | "title": "CoreDNS - Cache Hits / Misses", 1054 | "type": "timeseries" 1055 | }, 1056 | { 1057 | "datasource": { 1058 | "type": "prometheus", 1059 | "uid": "${datasource}" 1060 | }, 1061 | "fieldConfig": { 1062 | "defaults": { 1063 | "color": { 1064 | "mode": "palette-classic" 1065 | }, 1066 | "custom": { 1067 | "axisBorderShow": false, 1068 | "axisCenteredZero": false, 1069 | "axisColorMode": "text", 1070 | "axisLabel": "", 1071 | "axisPlacement": "auto", 1072 | "barAlignment": 0, 1073 | "drawStyle": "line", 1074 | "fillOpacity": 25, 1075 | "gradientMode": "opacity", 1076 | "hideFrom": { 1077 | "legend": false, 1078 | "tooltip": false, 1079 | "viz": false 1080 | }, 1081 | "insertNulls": false, 1082 | "lineInterpolation": "smooth", 1083 | "lineWidth": 2, 1084 | "pointSize": 5, 1085 | "scaleDistribution": { 1086 | "type": "linear" 1087 | }, 1088 | "showPoints": "never", 1089 | "spanNulls": false, 1090 | "stacking": { 1091 | "group": "A", 1092 | "mode": "none" 1093 | }, 1094 | "thresholdsStyle": { 1095 | "mode": "off" 1096 | } 1097 | }, 1098 | "mappings": [], 1099 | "thresholds": { 1100 | "mode": "absolute", 1101 | "steps": [ 1102 | { 1103 | "color": "green", 1104 | "value": null 1105 | }, 1106 | { 1107 | "color": "red", 1108 | "value": 80 1109 | } 1110 | ] 1111 | }, 1112 | "unit": "bytes" 1113 | }, 1114 | "overrides": [] 1115 | }, 1116 | "gridPos": { 1117 | "h": 8, 1118 | "w": 12, 1119 | "x": 12, 1120 | "y": 35 1121 | }, 1122 | "id": 15, 1123 | "options": { 1124 | "legend": { 1125 | "calcs": [], 1126 | "displayMode": "list", 1127 | "placement": "bottom", 1128 | "showLegend": true 1129 | }, 1130 | "tooltip": { 1131 | "mode": "multi", 1132 | "sort": "desc" 1133 | } 1134 | }, 1135 | "pluginVersion": "8.3.3", 1136 | "targets": [ 1137 | { 1138 | "datasource": { 1139 | "type": "prometheus", 1140 | "uid": "${datasource}" 1141 | }, 1142 | "exemplar": true, 1143 | "expr": "sum(coredns_cache_entries{cluster=~\"$cluster\", job=~\"$job\"}) by (type)", 1144 | "interval": "", 1145 | "legendFormat": "{{ type }}", 1146 | "refId": "A" 1147 | } 1148 | ], 1149 | "title": "CoreDNS - Cache Size", 1150 | "type": "timeseries" 1151 | }, 1152 | { 1153 | "datasource": { 1154 | "type": "prometheus", 1155 | "uid": "${datasource}" 1156 | }, 1157 | "fieldConfig": { 1158 | "defaults": { 1159 | "custom": { 1160 | "hideFrom": { 1161 | "legend": false, 1162 | "tooltip": false, 1163 | "viz": false 1164 | }, 1165 | "scaleDistribution": { 1166 | "type": "linear" 1167 | } 1168 | } 1169 | }, 1170 | "overrides": [] 1171 | }, 1172 | "gridPos": { 1173 | "h": 10, 1174 | "w": 12, 1175 | "x": 0, 1176 | "y": 43 1177 | }, 1178 | "id": 27, 1179 | "options": { 1180 | "calculate": false, 1181 | "cellGap": 1, 1182 | "color": { 1183 | "exponent": 0.5, 1184 | "fill": "dark-orange", 1185 | "mode": "scheme", 1186 | "reverse": false, 1187 | "scale": "exponential", 1188 | "scheme": "RdYlBu", 1189 | "steps": 64 1190 | }, 1191 | "exemplars": { 1192 | "color": "rgba(255,0,255,0.7)" 1193 | }, 1194 | "filterValues": { 1195 | "le": 1e-9 1196 | }, 1197 | "legend": { 1198 | "show": true 1199 | }, 1200 | "rowsFrame": { 1201 | "layout": "auto" 1202 | }, 1203 | "tooltip": { 1204 | "mode": "single", 1205 | "showColorScale": false, 1206 | "yHistogram": false 1207 | }, 1208 | "yAxis": { 1209 | "axisPlacement": "left", 1210 | "reverse": false, 1211 | "unit": "s" 1212 | } 1213 | }, 1214 | "pluginVersion": "10.4.1", 1215 | "targets": [ 1216 | { 1217 | "datasource": { 1218 | "type": "prometheus", 1219 | "uid": "${datasource}" 1220 | }, 1221 | "editorMode": "code", 1222 | "expr": "sum(increase(coredns_dns_request_duration_seconds_bucket{instance=~\"$instance\", cluster=~\"$cluster\", job=~\"$job\"}[$__rate_interval])) by (le)", 1223 | "format": "heatmap", 1224 | "legendFormat": "{{le}}", 1225 | "range": true, 1226 | "refId": "A" 1227 | } 1228 | ], 1229 | "title": "CoreDNS - DNS request duration", 1230 | "type": "heatmap" 1231 | }, 1232 | { 1233 | "datasource": { 1234 | "type": "prometheus", 1235 | "uid": "${datasource}" 1236 | }, 1237 | "fieldConfig": { 1238 | "defaults": { 1239 | "custom": { 1240 | "hideFrom": { 1241 | "legend": false, 1242 | "tooltip": false, 1243 | "viz": false 1244 | }, 1245 | "scaleDistribution": { 1246 | "type": "linear" 1247 | } 1248 | } 1249 | }, 1250 | "overrides": [] 1251 | }, 1252 | "gridPos": { 1253 | "h": 10, 1254 | "w": 12, 1255 | "x": 12, 1256 | "y": 43 1257 | }, 1258 | "id": 28, 1259 | "options": { 1260 | "calculate": false, 1261 | "cellGap": 1, 1262 | "color": { 1263 | "exponent": 0.5, 1264 | "fill": "dark-orange", 1265 | "mode": "scheme", 1266 | "reverse": false, 1267 | "scale": "exponential", 1268 | "scheme": "RdYlBu", 1269 | "steps": 64 1270 | }, 1271 | "exemplars": { 1272 | "color": "rgba(255,0,255,0.7)" 1273 | }, 1274 | "filterValues": { 1275 | "le": 1e-9 1276 | }, 1277 | "legend": { 1278 | "show": true 1279 | }, 1280 | "rowsFrame": { 1281 | "layout": "auto" 1282 | }, 1283 | "tooltip": { 1284 | "mode": "single", 1285 | "showColorScale": false, 1286 | "yHistogram": false 1287 | }, 1288 | "yAxis": { 1289 | "axisPlacement": "left", 1290 | "reverse": false, 1291 | "unit": "decbytes" 1292 | } 1293 | }, 1294 | "pluginVersion": "10.4.1", 1295 | "targets": [ 1296 | { 1297 | "datasource": { 1298 | "type": "prometheus", 1299 | "uid": "${datasource}" 1300 | }, 1301 | "editorMode": "code", 1302 | "expr": "sum(increase(coredns_dns_request_size_bytes_bucket{instance=~\"$instance\", le!=\"0\", cluster=~\"$cluster\", job=~\"$job\"}[$__rate_interval])) by (le)", 1303 | "format": "heatmap", 1304 | "legendFormat": "{{le}}", 1305 | "range": true, 1306 | "refId": "A" 1307 | } 1308 | ], 1309 | "title": "CoreDNS - DNS request size", 1310 | "type": "heatmap" 1311 | }, 1312 | { 1313 | "datasource": { 1314 | "type": "prometheus", 1315 | "uid": "${datasource}" 1316 | }, 1317 | "fieldConfig": { 1318 | "defaults": { 1319 | "custom": { 1320 | "hideFrom": { 1321 | "legend": false, 1322 | "tooltip": false, 1323 | "viz": false 1324 | }, 1325 | "scaleDistribution": { 1326 | "type": "linear" 1327 | } 1328 | } 1329 | }, 1330 | "overrides": [] 1331 | }, 1332 | "gridPos": { 1333 | "h": 10, 1334 | "w": 12, 1335 | "x": 0, 1336 | "y": 53 1337 | }, 1338 | "id": 29, 1339 | "options": { 1340 | "calculate": false, 1341 | "cellGap": 1, 1342 | "color": { 1343 | "exponent": 0.5, 1344 | "fill": "dark-orange", 1345 | "mode": "scheme", 1346 | "reverse": false, 1347 | "scale": "exponential", 1348 | "scheme": "RdYlBu", 1349 | "steps": 64 1350 | }, 1351 | "exemplars": { 1352 | "color": "rgba(255,0,255,0.7)" 1353 | }, 1354 | "filterValues": { 1355 | "le": 1e-9 1356 | }, 1357 | "legend": { 1358 | "show": true 1359 | }, 1360 | "rowsFrame": { 1361 | "layout": "auto" 1362 | }, 1363 | "tooltip": { 1364 | "mode": "single", 1365 | "showColorScale": false, 1366 | "yHistogram": false 1367 | }, 1368 | "yAxis": { 1369 | "axisPlacement": "left", 1370 | "reverse": false, 1371 | "unit": "decbytes" 1372 | } 1373 | }, 1374 | "pluginVersion": "10.4.1", 1375 | "targets": [ 1376 | { 1377 | "datasource": { 1378 | "type": "prometheus", 1379 | "uid": "${datasource}" 1380 | }, 1381 | "editorMode": "code", 1382 | "expr": "sum(increase(coredns_dns_response_size_bytes_bucket{instance=~\"$instance\", le!=\"0\", cluster=~\"$cluster\", job=~\"$job\"}[$__rate_interval])) by (le)", 1383 | "format": "heatmap", 1384 | "legendFormat": "{{le}}", 1385 | "range": true, 1386 | "refId": "A" 1387 | } 1388 | ], 1389 | "title": "CoreDNS - DNS response size", 1390 | "type": "heatmap" 1391 | } 1392 | ], 1393 | "refresh": "30s", 1394 | "schemaVersion": 39, 1395 | "tags": [ 1396 | "Kubernetes", 1397 | "Prometheus" 1398 | ], 1399 | "templating": { 1400 | "list": [ 1401 | { 1402 | "current": { 1403 | "selected": false, 1404 | "text": "Prometheus", 1405 | "value": "Prometheus" 1406 | }, 1407 | "hide": 0, 1408 | "includeAll": false, 1409 | "multi": false, 1410 | "name": "datasource", 1411 | "options": [], 1412 | "query": "prometheus", 1413 | "queryValue": "", 1414 | "refresh": 1, 1415 | "regex": "", 1416 | "skipUrlSync": false, 1417 | "type": "datasource" 1418 | }, 1419 | { 1420 | "current": { 1421 | "isNone": true, 1422 | "selected": false, 1423 | "text": "None", 1424 | "value": "" 1425 | }, 1426 | "datasource": { 1427 | "type": "prometheus", 1428 | "uid": "${datasource}" 1429 | }, 1430 | "definition": "label_values(kube_node_info,cluster)", 1431 | "hide": 0, 1432 | "includeAll": false, 1433 | "multi": false, 1434 | "name": "cluster", 1435 | "options": [], 1436 | "query": { 1437 | "qryType": 1, 1438 | "query": "label_values(kube_node_info,cluster)", 1439 | "refId": "PrometheusVariableQueryEditor-VariableQuery" 1440 | }, 1441 | "refresh": 1, 1442 | "regex": "", 1443 | "skipUrlSync": false, 1444 | "sort": 1, 1445 | "type": "query" 1446 | }, 1447 | { 1448 | "allValue": ".*", 1449 | "current": { 1450 | "selected": false, 1451 | "text": "All", 1452 | "value": "$__all" 1453 | }, 1454 | "datasource": { 1455 | "type": "prometheus", 1456 | "uid": "${datasource}" 1457 | }, 1458 | "definition": "label_values(up{job=\"$job\", cluster=\"$cluster\"},instance)", 1459 | "hide": 0, 1460 | "includeAll": true, 1461 | "label": "", 1462 | "multi": false, 1463 | "name": "instance", 1464 | "options": [], 1465 | "query": { 1466 | "qryType": 1, 1467 | "query": "label_values(up{job=\"$job\", cluster=\"$cluster\"},instance)", 1468 | "refId": "PrometheusVariableQueryEditor-VariableQuery" 1469 | }, 1470 | "refresh": 1, 1471 | "regex": "", 1472 | "skipUrlSync": false, 1473 | "sort": 1, 1474 | "tagValuesQuery": "", 1475 | "tagsQuery": "", 1476 | "type": "query", 1477 | "useTags": false 1478 | }, 1479 | { 1480 | "allValue": "udp,tcp", 1481 | "current": { 1482 | "selected": false, 1483 | "text": "udp", 1484 | "value": "udp" 1485 | }, 1486 | "datasource": { 1487 | "type": "prometheus", 1488 | "uid": "${datasource}" 1489 | }, 1490 | "definition": "label_values(coredns_dns_requests_total{cluster=\"$cluster\"}, proto)", 1491 | "hide": 0, 1492 | "includeAll": false, 1493 | "label": "", 1494 | "multi": false, 1495 | "name": "protocol", 1496 | "options": [], 1497 | "query": { 1498 | "query": "label_values(coredns_dns_requests_total{cluster=\"$cluster\"}, proto)", 1499 | "refId": "StandardVariableQuery" 1500 | }, 1501 | "refresh": 1, 1502 | "regex": "", 1503 | "skipUrlSync": false, 1504 | "sort": 1, 1505 | "tagValuesQuery": "", 1506 | "tagsQuery": "", 1507 | "type": "query", 1508 | "useTags": false 1509 | }, 1510 | { 1511 | "current": { 1512 | "selected": false, 1513 | "text": "30s", 1514 | "value": "30s" 1515 | }, 1516 | "hide": 0, 1517 | "includeAll": false, 1518 | "multi": false, 1519 | "name": "resolution", 1520 | "options": [ 1521 | { 1522 | "selected": false, 1523 | "text": "1s", 1524 | "value": "1s" 1525 | }, 1526 | { 1527 | "selected": false, 1528 | "text": "15s", 1529 | "value": "15s" 1530 | }, 1531 | { 1532 | "selected": true, 1533 | "text": "30s", 1534 | "value": "30s" 1535 | }, 1536 | { 1537 | "selected": false, 1538 | "text": "1m", 1539 | "value": "1m" 1540 | }, 1541 | { 1542 | "selected": false, 1543 | "text": "3m", 1544 | "value": "3m" 1545 | }, 1546 | { 1547 | "selected": false, 1548 | "text": "5m", 1549 | "value": "5m" 1550 | } 1551 | ], 1552 | "query": "1s, 15s, 30s, 1m, 3m, 5m", 1553 | "queryValue": "", 1554 | "skipUrlSync": false, 1555 | "type": "custom" 1556 | }, 1557 | { 1558 | "current": { 1559 | "selected": true, 1560 | "text": [ 1561 | "coredns" 1562 | ], 1563 | "value": [ 1564 | "coredns" 1565 | ] 1566 | }, 1567 | "datasource": { 1568 | "type": "prometheus", 1569 | "uid": "${datasource}" 1570 | }, 1571 | "definition": "label_values(coredns_build_info{cluster=\"$cluster\"},job)", 1572 | "hide": 0, 1573 | "includeAll": false, 1574 | "multi": true, 1575 | "name": "job", 1576 | "options": [], 1577 | "query": { 1578 | "qryType": 1, 1579 | "query": "label_values(coredns_build_info{cluster=\"$cluster\"},job)", 1580 | "refId": "PrometheusVariableQueryEditor-VariableQuery" 1581 | }, 1582 | "refresh": 1, 1583 | "regex": "", 1584 | "skipUrlSync": false, 1585 | "sort": 1, 1586 | "type": "query" 1587 | } 1588 | ] 1589 | }, 1590 | "time": { 1591 | "from": "now-1h", 1592 | "to": "now" 1593 | }, 1594 | "timepicker": {}, 1595 | "timezone": "", 1596 | "title": "Kubernetes / System / CoreDNS", 1597 | "uid": "k8s_system_coredns", 1598 | "version": 22, 1599 | "weekStart": "" 1600 | } 1601 | -------------------------------------------------------------------------------- /dashboards/k8s-addons-trivy-operator.json: -------------------------------------------------------------------------------- 1 | { 2 | "__inputs": [ 3 | { 4 | "name": "DS_PROMETHEUS", 5 | "label": "Prometheus", 6 | "description": "", 7 | "type": "datasource", 8 | "pluginId": "prometheus", 9 | "pluginName": "Prometheus" 10 | } 11 | ], 12 | "__elements": [], 13 | "__requires": [ 14 | { 15 | "type": "grafana", 16 | "id": "grafana", 17 | "name": "Grafana", 18 | "version": "8.5.0" 19 | }, 20 | { 21 | "type": "datasource", 22 | "id": "prometheus", 23 | "name": "Prometheus", 24 | "version": "5.0.0" 25 | }, 26 | { 27 | "type": "panel", 28 | "id": "timeseries", 29 | "name": "Time series", 30 | "version": "" 31 | }, 32 | { 33 | "type": "panel", 34 | "id": "stat", 35 | "name": "Stat", 36 | "version": "" 37 | }, 38 | { 39 | "type": "panel", 40 | "id": "table", 41 | "name": "Table", 42 | "version": "" 43 | } 44 | ], 45 | "annotations": { 46 | "list": [ 47 | { 48 | "builtIn": 1, 49 | "datasource": { 50 | "type": "datasource", 51 | "uid": "grafana" 52 | }, 53 | "enable": true, 54 | "hide": true, 55 | "iconColor": "rgba(0, 211, 255, 1)", 56 | "name": "Annotations & Alerts", 57 | "target": { 58 | "limit": 100, 59 | "matchAny": false, 60 | "tags": [], 61 | "type": "dashboard" 62 | }, 63 | "type": "dashboard" 64 | }, 65 | { 66 | "datasource": { 67 | "type": "datasource", 68 | "uid": "grafana" 69 | }, 70 | "enable": true, 71 | "hide": false, 72 | "iconColor": "#5c4ee5", 73 | "name": "terraform", 74 | "target": { 75 | "limit": 100, 76 | "matchAny": false, 77 | "tags": [ 78 | "terraform" 79 | ], 80 | "type": "tags" 81 | } 82 | }, 83 | { 84 | "datasource": { 85 | "type": "datasource", 86 | "uid": "grafana" 87 | }, 88 | "enable": true, 89 | "hide": false, 90 | "iconColor": "red", 91 | "name": "oncall", 92 | "target": { 93 | "limit": 100, 94 | "matchAny": false, 95 | "tags": [ 96 | "oncall" 97 | ], 98 | "type": "tags" 99 | } 100 | } 101 | ] 102 | }, 103 | "description": "This is a modern dashboard for the Trivy Operator from Aqua Security. Made to take advantage of the latest Grafana features. GitHub repository: https://github.com/dotdc/grafana-dashboards-kubernetes", 104 | "editable": true, 105 | "fiscalYearStartMonth": 0, 106 | "graphTooltip": 1, 107 | "links": [], 108 | "liveNow": false, 109 | "panels": [ 110 | { 111 | "collapsed": false, 112 | "datasource": { 113 | "type": "datasource", 114 | "uid": "grafana" 115 | }, 116 | "gridPos": { 117 | "h": 1, 118 | "w": 24, 119 | "x": 0, 120 | "y": 0 121 | }, 122 | "id": 43, 123 | "panels": [], 124 | "title": "Vulnerabilities", 125 | "type": "row" 126 | }, 127 | { 128 | "datasource": { 129 | "type": "prometheus", 130 | "uid": "${datasource}" 131 | }, 132 | "fieldConfig": { 133 | "defaults": { 134 | "color": { 135 | "mode": "thresholds" 136 | }, 137 | "mappings": [], 138 | "thresholds": { 139 | "mode": "absolute", 140 | "steps": [ 141 | { 142 | "color": "green", 143 | "value": null 144 | }, 145 | { 146 | "color": "red", 147 | "value": 1 148 | } 149 | ] 150 | }, 151 | "unit": "none" 152 | }, 153 | "overrides": [] 154 | }, 155 | "gridPos": { 156 | "h": 4, 157 | "w": 4, 158 | "x": 0, 159 | "y": 1 160 | }, 161 | "id": 51, 162 | "options": { 163 | "colorMode": "value", 164 | "graphMode": "area", 165 | "justifyMode": "auto", 166 | "orientation": "auto", 167 | "reduceOptions": { 168 | "calcs": [ 169 | "last" 170 | ], 171 | "fields": "", 172 | "values": false 173 | }, 174 | "textMode": "auto" 175 | }, 176 | "pluginVersion": "9.3.8", 177 | "targets": [ 178 | { 179 | "datasource": { 180 | "type": "prometheus", 181 | "uid": "${datasource}" 182 | }, 183 | "editorMode": "code", 184 | "exemplar": false, 185 | "expr": "sum(trivy_image_vulnerabilities{severity=\"Critical\", namespace=~\"$namespace\", cluster=~\"$cluster\"})", 186 | "instant": true, 187 | "interval": "$resolution", 188 | "legendFormat": "__auto", 189 | "refId": "A" 190 | } 191 | ], 192 | "title": "CRITICAL", 193 | "type": "stat" 194 | }, 195 | { 196 | "datasource": { 197 | "type": "prometheus", 198 | "uid": "${datasource}" 199 | }, 200 | "fieldConfig": { 201 | "defaults": { 202 | "color": { 203 | "mode": "thresholds" 204 | }, 205 | "mappings": [], 206 | "thresholds": { 207 | "mode": "absolute", 208 | "steps": [ 209 | { 210 | "color": "green", 211 | "value": null 212 | }, 213 | { 214 | "color": "orange", 215 | "value": 1 216 | } 217 | ] 218 | }, 219 | "unit": "none" 220 | }, 221 | "overrides": [] 222 | }, 223 | "gridPos": { 224 | "h": 4, 225 | "w": 4, 226 | "x": 4, 227 | "y": 1 228 | }, 229 | "id": 50, 230 | "options": { 231 | "colorMode": "value", 232 | "graphMode": "area", 233 | "justifyMode": "auto", 234 | "orientation": "auto", 235 | "reduceOptions": { 236 | "calcs": [ 237 | "last" 238 | ], 239 | "fields": "", 240 | "values": false 241 | }, 242 | "textMode": "auto" 243 | }, 244 | "pluginVersion": "9.3.8", 245 | "targets": [ 246 | { 247 | "datasource": { 248 | "type": "prometheus", 249 | "uid": "${datasource}" 250 | }, 251 | "editorMode": "code", 252 | "exemplar": false, 253 | "expr": "sum(trivy_image_vulnerabilities{severity=\"High\", namespace=~\"$namespace\", cluster=~\"$cluster\"})", 254 | "instant": true, 255 | "interval": "$resolution", 256 | "legendFormat": "__auto", 257 | "refId": "A" 258 | } 259 | ], 260 | "title": "HIGH", 261 | "type": "stat" 262 | }, 263 | { 264 | "datasource": { 265 | "type": "prometheus", 266 | "uid": "${datasource}" 267 | }, 268 | "fieldConfig": { 269 | "defaults": { 270 | "color": { 271 | "mode": "thresholds" 272 | }, 273 | "mappings": [], 274 | "thresholds": { 275 | "mode": "absolute", 276 | "steps": [ 277 | { 278 | "color": "green", 279 | "value": null 280 | }, 281 | { 282 | "color": "yellow", 283 | "value": 1 284 | } 285 | ] 286 | }, 287 | "unit": "none" 288 | }, 289 | "overrides": [] 290 | }, 291 | "gridPos": { 292 | "h": 4, 293 | "w": 4, 294 | "x": 8, 295 | "y": 1 296 | }, 297 | "id": 49, 298 | "options": { 299 | "colorMode": "value", 300 | "graphMode": "area", 301 | "justifyMode": "auto", 302 | "orientation": "auto", 303 | "reduceOptions": { 304 | "calcs": [ 305 | "last" 306 | ], 307 | "fields": "", 308 | "values": false 309 | }, 310 | "textMode": "auto" 311 | }, 312 | "pluginVersion": "9.3.8", 313 | "targets": [ 314 | { 315 | "datasource": { 316 | "type": "prometheus", 317 | "uid": "${datasource}" 318 | }, 319 | "editorMode": "code", 320 | "exemplar": false, 321 | "expr": "sum(trivy_image_vulnerabilities{severity=\"Medium\", namespace=~\"$namespace\", cluster=~\"$cluster\"})", 322 | "instant": true, 323 | "interval": "$resolution", 324 | "legendFormat": "__auto", 325 | "refId": "A" 326 | } 327 | ], 328 | "title": "MEDIUM", 329 | "type": "stat" 330 | }, 331 | { 332 | "datasource": { 333 | "type": "prometheus", 334 | "uid": "${datasource}" 335 | }, 336 | "fieldConfig": { 337 | "defaults": { 338 | "color": { 339 | "mode": "thresholds" 340 | }, 341 | "mappings": [], 342 | "thresholds": { 343 | "mode": "absolute", 344 | "steps": [ 345 | { 346 | "color": "green", 347 | "value": null 348 | }, 349 | { 350 | "color": "blue", 351 | "value": 1 352 | } 353 | ] 354 | }, 355 | "unit": "none" 356 | }, 357 | "overrides": [] 358 | }, 359 | "gridPos": { 360 | "h": 4, 361 | "w": 4, 362 | "x": 12, 363 | "y": 1 364 | }, 365 | "id": 60, 366 | "options": { 367 | "colorMode": "value", 368 | "graphMode": "area", 369 | "justifyMode": "auto", 370 | "orientation": "auto", 371 | "reduceOptions": { 372 | "calcs": [ 373 | "last" 374 | ], 375 | "fields": "", 376 | "values": false 377 | }, 378 | "textMode": "auto" 379 | }, 380 | "pluginVersion": "9.3.8", 381 | "targets": [ 382 | { 383 | "datasource": { 384 | "type": "prometheus", 385 | "uid": "${datasource}" 386 | }, 387 | "editorMode": "code", 388 | "exemplar": false, 389 | "expr": "sum(trivy_image_vulnerabilities{severity=\"Low\", namespace=~\"$namespace\", cluster=~\"$cluster\"})", 390 | "instant": true, 391 | "interval": "$resolution", 392 | "legendFormat": "__auto", 393 | "refId": "A" 394 | } 395 | ], 396 | "title": "LOW", 397 | "type": "stat" 398 | }, 399 | { 400 | "datasource": { 401 | "type": "prometheus", 402 | "uid": "${datasource}" 403 | }, 404 | "fieldConfig": { 405 | "defaults": { 406 | "color": { 407 | "mode": "thresholds" 408 | }, 409 | "mappings": [], 410 | "thresholds": { 411 | "mode": "absolute", 412 | "steps": [ 413 | { 414 | "color": "green", 415 | "value": null 416 | }, 417 | { 418 | "color": "purple", 419 | "value": 1 420 | } 421 | ] 422 | }, 423 | "unit": "none" 424 | }, 425 | "overrides": [] 426 | }, 427 | "gridPos": { 428 | "h": 4, 429 | "w": 4, 430 | "x": 16, 431 | "y": 1 432 | }, 433 | "id": 52, 434 | "options": { 435 | "colorMode": "value", 436 | "graphMode": "area", 437 | "justifyMode": "auto", 438 | "orientation": "auto", 439 | "reduceOptions": { 440 | "calcs": [ 441 | "last" 442 | ], 443 | "fields": "", 444 | "values": false 445 | }, 446 | "textMode": "auto" 447 | }, 448 | "pluginVersion": "9.3.8", 449 | "targets": [ 450 | { 451 | "datasource": { 452 | "type": "prometheus", 453 | "uid": "${datasource}" 454 | }, 455 | "editorMode": "code", 456 | "exemplar": false, 457 | "expr": "sum(trivy_image_vulnerabilities{severity=\"Unknown\", namespace=~\"$namespace\", cluster=~\"$cluster\"})", 458 | "instant": true, 459 | "interval": "$resolution", 460 | "legendFormat": "__auto", 461 | "refId": "A" 462 | } 463 | ], 464 | "title": "UNKNOWN", 465 | "type": "stat" 466 | }, 467 | { 468 | "datasource": { 469 | "type": "prometheus", 470 | "uid": "${datasource}" 471 | }, 472 | "fieldConfig": { 473 | "defaults": { 474 | "color": { 475 | "mode": "thresholds" 476 | }, 477 | "mappings": [], 478 | "thresholds": { 479 | "mode": "absolute", 480 | "steps": [ 481 | { 482 | "color": "green", 483 | "value": null 484 | }, 485 | { 486 | "color": "text", 487 | "value": 1 488 | } 489 | ] 490 | }, 491 | "unit": "none" 492 | }, 493 | "overrides": [] 494 | }, 495 | "gridPos": { 496 | "h": 4, 497 | "w": 4, 498 | "x": 20, 499 | "y": 1 500 | }, 501 | "id": 39, 502 | "options": { 503 | "colorMode": "value", 504 | "graphMode": "area", 505 | "justifyMode": "auto", 506 | "orientation": "auto", 507 | "reduceOptions": { 508 | "calcs": [ 509 | "last" 510 | ], 511 | "fields": "", 512 | "values": false 513 | }, 514 | "textMode": "auto" 515 | }, 516 | "pluginVersion": "9.3.8", 517 | "targets": [ 518 | { 519 | "datasource": { 520 | "type": "prometheus", 521 | "uid": "${datasource}" 522 | }, 523 | "editorMode": "code", 524 | "exemplar": false, 525 | "expr": "sum(trivy_image_vulnerabilities{namespace=~\"$namespace\", cluster=~\"$cluster\"})", 526 | "instant": true, 527 | "interval": "$resolution", 528 | "legendFormat": "__auto", 529 | "refId": "A" 530 | } 531 | ], 532 | "title": "TOTAL", 533 | "type": "stat" 534 | }, 535 | { 536 | "datasource": { 537 | "type": "prometheus", 538 | "uid": "${datasource}" 539 | }, 540 | "fieldConfig": { 541 | "defaults": { 542 | "color": { 543 | "mode": "palette-classic" 544 | }, 545 | "custom": { 546 | "axisCenteredZero": false, 547 | "axisColorMode": "text", 548 | "axisLabel": "", 549 | "axisPlacement": "auto", 550 | "barAlignment": 0, 551 | "drawStyle": "line", 552 | "fillOpacity": 15, 553 | "gradientMode": "opacity", 554 | "hideFrom": { 555 | "legend": false, 556 | "tooltip": false, 557 | "viz": false 558 | }, 559 | "lineInterpolation": "linear", 560 | "lineWidth": 2, 561 | "pointSize": 5, 562 | "scaleDistribution": { 563 | "type": "linear" 564 | }, 565 | "showPoints": "never", 566 | "spanNulls": false, 567 | "stacking": { 568 | "group": "A", 569 | "mode": "none" 570 | }, 571 | "thresholdsStyle": { 572 | "mode": "off" 573 | } 574 | }, 575 | "mappings": [], 576 | "thresholds": { 577 | "mode": "absolute", 578 | "steps": [ 579 | { 580 | "color": "green", 581 | "value": null 582 | }, 583 | { 584 | "color": "blue", 585 | "value": 1 586 | } 587 | ] 588 | }, 589 | "unit": "none" 590 | }, 591 | "overrides": [] 592 | }, 593 | "gridPos": { 594 | "h": 8, 595 | "w": 12, 596 | "x": 0, 597 | "y": 5 598 | }, 599 | "id": 58, 600 | "options": { 601 | "legend": { 602 | "calcs": [], 603 | "displayMode": "table", 604 | "placement": "right", 605 | "showLegend": true 606 | }, 607 | "tooltip": { 608 | "mode": "single", 609 | "sort": "none" 610 | } 611 | }, 612 | "pluginVersion": "8.5.0", 613 | "targets": [ 614 | { 615 | "datasource": { 616 | "type": "prometheus", 617 | "uid": "${datasource}" 618 | }, 619 | "editorMode": "code", 620 | "exemplar": false, 621 | "expr": "sum(trivy_image_vulnerabilities{cluster=~\"$cluster\", namespace=~\"$namespace\"}) by (namespace)", 622 | "instant": false, 623 | "interval": "$resolution", 624 | "legendFormat": "{{namespace}}", 625 | "range": true, 626 | "refId": "A" 627 | } 628 | ], 629 | "title": "Total vulnerabilities by namespaces", 630 | "type": "timeseries" 631 | }, 632 | { 633 | "datasource": { 634 | "type": "prometheus", 635 | "uid": "${datasource}" 636 | }, 637 | "fieldConfig": { 638 | "defaults": { 639 | "color": { 640 | "mode": "palette-classic" 641 | }, 642 | "custom": { 643 | "axisCenteredZero": false, 644 | "axisColorMode": "text", 645 | "axisLabel": "", 646 | "axisPlacement": "auto", 647 | "barAlignment": 0, 648 | "drawStyle": "line", 649 | "fillOpacity": 15, 650 | "gradientMode": "opacity", 651 | "hideFrom": { 652 | "legend": false, 653 | "tooltip": false, 654 | "viz": false 655 | }, 656 | "lineInterpolation": "linear", 657 | "lineWidth": 2, 658 | "pointSize": 5, 659 | "scaleDistribution": { 660 | "type": "linear" 661 | }, 662 | "showPoints": "never", 663 | "spanNulls": false, 664 | "stacking": { 665 | "group": "A", 666 | "mode": "none" 667 | }, 668 | "thresholdsStyle": { 669 | "mode": "off" 670 | } 671 | }, 672 | "mappings": [], 673 | "thresholds": { 674 | "mode": "absolute", 675 | "steps": [ 676 | { 677 | "color": "green", 678 | "value": null 679 | }, 680 | { 681 | "color": "blue", 682 | "value": 1 683 | } 684 | ] 685 | }, 686 | "unit": "none" 687 | }, 688 | "overrides": [ 689 | { 690 | "matcher": { 691 | "id": "byName", 692 | "options": "Critical" 693 | }, 694 | "properties": [ 695 | { 696 | "id": "color", 697 | "value": { 698 | "fixedColor": "red", 699 | "mode": "fixed" 700 | } 701 | } 702 | ] 703 | }, 704 | { 705 | "matcher": { 706 | "id": "byName", 707 | "options": "High" 708 | }, 709 | "properties": [ 710 | { 711 | "id": "color", 712 | "value": { 713 | "fixedColor": "orange", 714 | "mode": "fixed" 715 | } 716 | } 717 | ] 718 | }, 719 | { 720 | "matcher": { 721 | "id": "byName", 722 | "options": "Medium" 723 | }, 724 | "properties": [ 725 | { 726 | "id": "color", 727 | "value": { 728 | "fixedColor": "yellow", 729 | "mode": "fixed" 730 | } 731 | } 732 | ] 733 | }, 734 | { 735 | "matcher": { 736 | "id": "byName", 737 | "options": "Low" 738 | }, 739 | "properties": [ 740 | { 741 | "id": "color", 742 | "value": { 743 | "fixedColor": "blue", 744 | "mode": "fixed" 745 | } 746 | } 747 | ] 748 | }, 749 | { 750 | "matcher": { 751 | "id": "byName", 752 | "options": "Unknown" 753 | }, 754 | "properties": [ 755 | { 756 | "id": "color", 757 | "value": { 758 | "fixedColor": "purple", 759 | "mode": "fixed" 760 | } 761 | } 762 | ] 763 | } 764 | ] 765 | }, 766 | "gridPos": { 767 | "h": 8, 768 | "w": 12, 769 | "x": 12, 770 | "y": 5 771 | }, 772 | "id": 61, 773 | "options": { 774 | "legend": { 775 | "calcs": [], 776 | "displayMode": "table", 777 | "placement": "right", 778 | "showLegend": true 779 | }, 780 | "tooltip": { 781 | "mode": "multi", 782 | "sort": "desc" 783 | } 784 | }, 785 | "pluginVersion": "8.5.0", 786 | "targets": [ 787 | { 788 | "datasource": { 789 | "type": "prometheus", 790 | "uid": "${datasource}" 791 | }, 792 | "editorMode": "code", 793 | "exemplar": false, 794 | "expr": "sum(trivy_image_vulnerabilities{cluster=~\"$cluster\"}) by (severity)", 795 | "instant": false, 796 | "interval": "$resolution", 797 | "legendFormat": "__auto", 798 | "range": true, 799 | "refId": "A" 800 | } 801 | ], 802 | "title": "Total vulnerabilities by severity in selected namespace(s)", 803 | "type": "timeseries" 804 | }, 805 | { 806 | "collapsed": false, 807 | "gridPos": { 808 | "h": 1, 809 | "w": 24, 810 | "x": 0, 811 | "y": 13 812 | }, 813 | "id": 85, 814 | "panels": [], 815 | "title": "Vulnerability Details", 816 | "type": "row" 817 | }, 818 | { 819 | "datasource": { 820 | "type": "prometheus", 821 | "uid": "${datasource}" 822 | }, 823 | "description": "", 824 | "fieldConfig": { 825 | "defaults": { 826 | "custom": { 827 | "align": "auto", 828 | "displayMode": "auto", 829 | "filterable": true, 830 | "inspect": false 831 | }, 832 | "mappings": [], 833 | "thresholds": { 834 | "mode": "absolute", 835 | "steps": [ 836 | { 837 | "color": "green", 838 | "value": null 839 | }, 840 | { 841 | "color": "orange", 842 | "value": 80 843 | } 844 | ] 845 | } 846 | }, 847 | "overrides": [ 848 | { 849 | "matcher": { 850 | "id": "byName", 851 | "options": "severity" 852 | }, 853 | "properties": [ 854 | { 855 | "id": "mappings", 856 | "value": [ 857 | { 858 | "options": { 859 | "Critical": { 860 | "color": "red", 861 | "index": 0 862 | }, 863 | "High": { 864 | "color": "orange", 865 | "index": 1 866 | }, 867 | "Low": { 868 | "color": "blue", 869 | "index": 3 870 | }, 871 | "Medium": { 872 | "color": "yellow", 873 | "index": 2 874 | }, 875 | "Unknown": { 876 | "color": "purple", 877 | "index": 4 878 | } 879 | }, 880 | "type": "value" 881 | } 882 | ] 883 | }, 884 | { 885 | "id": "custom.displayMode", 886 | "value": "color-text" 887 | } 888 | ] 889 | } 890 | ] 891 | }, 892 | "gridPos": { 893 | "h": 12, 894 | "w": 24, 895 | "x": 0, 896 | "y": 14 897 | }, 898 | "id": 83, 899 | "options": { 900 | "footer": { 901 | "enablePagination": true, 902 | "fields": [ 903 | "Value" 904 | ], 905 | "reducer": [ 906 | "sum" 907 | ], 908 | "show": false 909 | }, 910 | "showHeader": true, 911 | "sortBy": [] 912 | }, 913 | "pluginVersion": "9.3.8", 914 | "targets": [ 915 | { 916 | "datasource": { 917 | "type": "prometheus", 918 | "uid": "${datasource}" 919 | }, 920 | "editorMode": "code", 921 | "exemplar": false, 922 | "expr": "sum(trivy_image_vulnerabilities{namespace=~\"$namespace\", cluster=~\"$cluster\"}) by (namespace, image_registry, image_repository, image_tag, severity) > 0", 923 | "format": "table", 924 | "instant": false, 925 | "legendFormat": "__auto", 926 | "range": true, 927 | "refId": "A" 928 | } 929 | ], 930 | "title": "Vulnerability count per image and severity in $namespace namespace(s)", 931 | "transformations": [ 932 | { 933 | "id": "organize", 934 | "options": { 935 | "excludeByName": { 936 | "Time": true, 937 | "Value": false 938 | }, 939 | "indexByName": { 940 | "Time": 0, 941 | "Value": 6, 942 | "image_registry": 2, 943 | "image_repository": 3, 944 | "image_tag": 4, 945 | "namespace": 1, 946 | "severity": 5 947 | }, 948 | "renameByName": { 949 | "Value": "Nb of vulnerabilities", 950 | "image_registry": "Image Registry", 951 | "image_repository": "Image Repository", 952 | "image_tag": "Image Tag", 953 | "namespace": "Namespace", 954 | "severity": "Severity" 955 | } 956 | } 957 | }, 958 | { 959 | "id": "groupBy", 960 | "options": { 961 | "fields": { 962 | "All values": { 963 | "aggregations": [], 964 | "operation": "groupby" 965 | }, 966 | "Count": { 967 | "aggregations": [], 968 | "operation": "groupby" 969 | }, 970 | "Image Registry": { 971 | "aggregations": [], 972 | "operation": "groupby" 973 | }, 974 | "Image Repository": { 975 | "aggregations": [], 976 | "operation": "groupby" 977 | }, 978 | "Image Tag": { 979 | "aggregations": [], 980 | "operation": "groupby" 981 | }, 982 | "Namespace": { 983 | "aggregations": [], 984 | "operation": "groupby" 985 | }, 986 | "Nb of vulnerabilities": { 987 | "aggregations": [], 988 | "operation": "groupby" 989 | }, 990 | "Severity": { 991 | "aggregations": [], 992 | "operation": "groupby" 993 | }, 994 | "Value": { 995 | "aggregations": [], 996 | "operation": "groupby" 997 | }, 998 | "image_registry": { 999 | "aggregations": [], 1000 | "operation": "groupby" 1001 | }, 1002 | "image_repository": { 1003 | "aggregations": [], 1004 | "operation": "groupby" 1005 | }, 1006 | "image_tag": { 1007 | "aggregations": [], 1008 | "operation": "groupby" 1009 | }, 1010 | "namespace": { 1011 | "aggregations": [], 1012 | "operation": "groupby" 1013 | }, 1014 | "severity": { 1015 | "aggregations": [], 1016 | "operation": "groupby" 1017 | } 1018 | } 1019 | } 1020 | } 1021 | ], 1022 | "type": "table" 1023 | }, 1024 | { 1025 | "datasource": { 1026 | "type": "prometheus", 1027 | "uid": "${datasource}" 1028 | }, 1029 | "description": "Require operator.metricsVulnIdEnabled: true", 1030 | "fieldConfig": { 1031 | "defaults": { 1032 | "color": { 1033 | "mode": "thresholds" 1034 | }, 1035 | "custom": { 1036 | "align": "auto", 1037 | "displayMode": "auto", 1038 | "filterable": true, 1039 | "inspect": false 1040 | }, 1041 | "links": [], 1042 | "mappings": [], 1043 | "thresholds": { 1044 | "mode": "absolute", 1045 | "steps": [ 1046 | { 1047 | "color": "green", 1048 | "value": null 1049 | }, 1050 | { 1051 | "color": "blue", 1052 | "value": 1 1053 | } 1054 | ] 1055 | }, 1056 | "unit": "none" 1057 | }, 1058 | "overrides": [ 1059 | { 1060 | "matcher": { 1061 | "id": "byName", 1062 | "options": "severity" 1063 | }, 1064 | "properties": [ 1065 | { 1066 | "id": "mappings", 1067 | "value": [ 1068 | { 1069 | "options": { 1070 | "Critical": { 1071 | "color": "red", 1072 | "index": 0 1073 | }, 1074 | "High": { 1075 | "color": "orange", 1076 | "index": 1 1077 | }, 1078 | "Low": { 1079 | "color": "blue", 1080 | "index": 3 1081 | }, 1082 | "Medium": { 1083 | "color": "yellow", 1084 | "index": 2 1085 | }, 1086 | "Unknown": { 1087 | "color": "purple", 1088 | "index": 4 1089 | } 1090 | }, 1091 | "type": "value" 1092 | } 1093 | ] 1094 | }, 1095 | { 1096 | "id": "custom.displayMode", 1097 | "value": "color-text" 1098 | } 1099 | ] 1100 | }, 1101 | { 1102 | "matcher": { 1103 | "id": "byName", 1104 | "options": "vuln_id" 1105 | }, 1106 | "properties": [ 1107 | { 1108 | "id": "links", 1109 | "value": [ 1110 | { 1111 | "targetBlank": true, 1112 | "title": "https://nvd.nist.gov/vuln/detail/${__value.text}", 1113 | "url": "https://nvd.nist.gov/vuln/detail/${__value.text}" 1114 | } 1115 | ] 1116 | } 1117 | ] 1118 | } 1119 | ] 1120 | }, 1121 | "gridPos": { 1122 | "h": 12, 1123 | "w": 24, 1124 | "x": 0, 1125 | "y": 26 1126 | }, 1127 | "id": 78, 1128 | "options": { 1129 | "footer": { 1130 | "enablePagination": true, 1131 | "fields": "", 1132 | "reducer": [ 1133 | "sum" 1134 | ], 1135 | "show": false 1136 | }, 1137 | "showHeader": true, 1138 | "sortBy": [] 1139 | }, 1140 | "pluginVersion": "9.3.8", 1141 | "targets": [ 1142 | { 1143 | "datasource": { 1144 | "type": "prometheus", 1145 | "uid": "${datasource}" 1146 | }, 1147 | "editorMode": "code", 1148 | "exemplar": false, 1149 | "expr": "sum(trivy_vulnerability_id{vuln_id=~\"CVE.*\", namespace=~\"$namespace\", cluster=~\"$cluster\"}) by (namespace, image_registry, image_repository, image_tag, vuln_id, severity)", 1150 | "format": "table", 1151 | "instant": false, 1152 | "interval": "$resolution", 1153 | "legendFormat": "__auto", 1154 | "range": true, 1155 | "refId": "A" 1156 | } 1157 | ], 1158 | "title": "Detailed CVE vulnerabilities in $namespace namespace(s)", 1159 | "transformations": [ 1160 | { 1161 | "id": "organize", 1162 | "options": { 1163 | "excludeByName": { 1164 | "Time": true, 1165 | "Value": true, 1166 | "__name__": true, 1167 | "container": true, 1168 | "endpoint": true, 1169 | "instance": true, 1170 | "job": true, 1171 | "namespace": false, 1172 | "service": true 1173 | }, 1174 | "indexByName": { 1175 | "Time": 0, 1176 | "Value": 7, 1177 | "image_registry": 2, 1178 | "image_repository": 3, 1179 | "image_tag": 4, 1180 | "namespace": 1, 1181 | "severity": 6, 1182 | "vuln_id": 5 1183 | }, 1184 | "renameByName": { 1185 | "image_namespace": "namespace", 1186 | "image_registry": "Image Registry", 1187 | "image_repository": "Image Repository", 1188 | "image_tag": "Image Tag", 1189 | "namespace": "Namespace", 1190 | "severity": "Severity", 1191 | "vuln_id": "Vulnerability", 1192 | "vulnerability_id": "" 1193 | } 1194 | } 1195 | }, 1196 | { 1197 | "id": "groupBy", 1198 | "options": { 1199 | "fields": { 1200 | "Image Registry": { 1201 | "aggregations": [], 1202 | "operation": "groupby" 1203 | }, 1204 | "Image Repository": { 1205 | "aggregations": [], 1206 | "operation": "groupby" 1207 | }, 1208 | "Image Tag": { 1209 | "aggregations": [], 1210 | "operation": "groupby" 1211 | }, 1212 | "Namespace": { 1213 | "aggregations": [], 1214 | "operation": "groupby" 1215 | }, 1216 | "Severity": { 1217 | "aggregations": [], 1218 | "operation": "groupby" 1219 | }, 1220 | "Value": { 1221 | "aggregations": [ 1222 | "lastNotNull" 1223 | ] 1224 | }, 1225 | "Vulnerability": { 1226 | "aggregations": [], 1227 | "operation": "groupby" 1228 | }, 1229 | "image_namespace": { 1230 | "aggregations": [], 1231 | "operation": "groupby" 1232 | }, 1233 | "namespace": { 1234 | "aggregations": [], 1235 | "operation": "groupby" 1236 | }, 1237 | "severity": { 1238 | "aggregations": [], 1239 | "operation": "groupby" 1240 | }, 1241 | "vuln_id": { 1242 | "aggregations": [], 1243 | "operation": "groupby" 1244 | }, 1245 | "vulnerability_id": { 1246 | "aggregations": [], 1247 | "operation": "groupby" 1248 | } 1249 | } 1250 | } 1251 | } 1252 | ], 1253 | "type": "table" 1254 | }, 1255 | { 1256 | "collapsed": false, 1257 | "datasource": { 1258 | "type": "datasource", 1259 | "uid": "grafana" 1260 | }, 1261 | "gridPos": { 1262 | "h": 1, 1263 | "w": 24, 1264 | "x": 0, 1265 | "y": 38 1266 | }, 1267 | "id": 47, 1268 | "panels": [], 1269 | "title": "Config Audit Reports", 1270 | "type": "row" 1271 | }, 1272 | { 1273 | "datasource": { 1274 | "type": "prometheus", 1275 | "uid": "${datasource}" 1276 | }, 1277 | "fieldConfig": { 1278 | "defaults": { 1279 | "color": { 1280 | "mode": "thresholds" 1281 | }, 1282 | "mappings": [], 1283 | "thresholds": { 1284 | "mode": "absolute", 1285 | "steps": [ 1286 | { 1287 | "color": "green", 1288 | "value": null 1289 | }, 1290 | { 1291 | "color": "red", 1292 | "value": 1 1293 | } 1294 | ] 1295 | }, 1296 | "unit": "none" 1297 | }, 1298 | "overrides": [] 1299 | }, 1300 | "gridPos": { 1301 | "h": 4, 1302 | "w": 4, 1303 | "x": 0, 1304 | "y": 39 1305 | }, 1306 | "id": 56, 1307 | "options": { 1308 | "colorMode": "value", 1309 | "graphMode": "area", 1310 | "justifyMode": "auto", 1311 | "orientation": "auto", 1312 | "reduceOptions": { 1313 | "calcs": [ 1314 | "last" 1315 | ], 1316 | "fields": "", 1317 | "values": false 1318 | }, 1319 | "textMode": "auto" 1320 | }, 1321 | "pluginVersion": "9.3.8", 1322 | "targets": [ 1323 | { 1324 | "datasource": { 1325 | "type": "prometheus", 1326 | "uid": "${datasource}" 1327 | }, 1328 | "editorMode": "code", 1329 | "exemplar": false, 1330 | "expr": "sum(trivy_resource_configaudits{severity=\"Critical\", namespace=~\"$namespace\", cluster=~\"$cluster\"})", 1331 | "instant": true, 1332 | "interval": "$resolution", 1333 | "legendFormat": "__auto", 1334 | "refId": "A" 1335 | } 1336 | ], 1337 | "title": "CRITICAL", 1338 | "type": "stat" 1339 | }, 1340 | { 1341 | "datasource": { 1342 | "type": "prometheus", 1343 | "uid": "${datasource}" 1344 | }, 1345 | "fieldConfig": { 1346 | "defaults": { 1347 | "color": { 1348 | "mode": "thresholds" 1349 | }, 1350 | "mappings": [], 1351 | "thresholds": { 1352 | "mode": "absolute", 1353 | "steps": [ 1354 | { 1355 | "color": "green", 1356 | "value": null 1357 | }, 1358 | { 1359 | "color": "orange", 1360 | "value": 1 1361 | } 1362 | ] 1363 | }, 1364 | "unit": "none" 1365 | }, 1366 | "overrides": [] 1367 | }, 1368 | "gridPos": { 1369 | "h": 4, 1370 | "w": 4, 1371 | "x": 4, 1372 | "y": 39 1373 | }, 1374 | "id": 55, 1375 | "options": { 1376 | "colorMode": "value", 1377 | "graphMode": "area", 1378 | "justifyMode": "auto", 1379 | "orientation": "auto", 1380 | "reduceOptions": { 1381 | "calcs": [ 1382 | "last" 1383 | ], 1384 | "fields": "", 1385 | "values": false 1386 | }, 1387 | "textMode": "auto" 1388 | }, 1389 | "pluginVersion": "9.3.8", 1390 | "targets": [ 1391 | { 1392 | "datasource": { 1393 | "type": "prometheus", 1394 | "uid": "${datasource}" 1395 | }, 1396 | "editorMode": "code", 1397 | "exemplar": false, 1398 | "expr": "sum(trivy_resource_configaudits{severity=\"High\", namespace=~\"$namespace\", cluster=~\"$cluster\"})", 1399 | "instant": true, 1400 | "interval": "$resolution", 1401 | "legendFormat": "__auto", 1402 | "refId": "A" 1403 | } 1404 | ], 1405 | "title": "HIGH", 1406 | "type": "stat" 1407 | }, 1408 | { 1409 | "datasource": { 1410 | "type": "prometheus", 1411 | "uid": "${datasource}" 1412 | }, 1413 | "fieldConfig": { 1414 | "defaults": { 1415 | "color": { 1416 | "mode": "thresholds" 1417 | }, 1418 | "mappings": [], 1419 | "thresholds": { 1420 | "mode": "absolute", 1421 | "steps": [ 1422 | { 1423 | "color": "green", 1424 | "value": null 1425 | }, 1426 | { 1427 | "color": "yellow", 1428 | "value": 1 1429 | } 1430 | ] 1431 | }, 1432 | "unit": "none" 1433 | }, 1434 | "overrides": [] 1435 | }, 1436 | "gridPos": { 1437 | "h": 4, 1438 | "w": 4, 1439 | "x": 8, 1440 | "y": 39 1441 | }, 1442 | "id": 54, 1443 | "options": { 1444 | "colorMode": "value", 1445 | "graphMode": "area", 1446 | "justifyMode": "auto", 1447 | "orientation": "auto", 1448 | "reduceOptions": { 1449 | "calcs": [ 1450 | "last" 1451 | ], 1452 | "fields": "", 1453 | "values": false 1454 | }, 1455 | "textMode": "auto" 1456 | }, 1457 | "pluginVersion": "9.3.8", 1458 | "targets": [ 1459 | { 1460 | "datasource": { 1461 | "type": "prometheus", 1462 | "uid": "${datasource}" 1463 | }, 1464 | "editorMode": "code", 1465 | "exemplar": false, 1466 | "expr": "sum(trivy_resource_configaudits{severity=\"Medium\", namespace=~\"$namespace\", cluster=~\"$cluster\"})", 1467 | "instant": true, 1468 | "interval": "$resolution", 1469 | "legendFormat": "__auto", 1470 | "refId": "A" 1471 | } 1472 | ], 1473 | "title": "MEDIUM", 1474 | "type": "stat" 1475 | }, 1476 | { 1477 | "datasource": { 1478 | "type": "prometheus", 1479 | "uid": "${datasource}" 1480 | }, 1481 | "fieldConfig": { 1482 | "defaults": { 1483 | "color": { 1484 | "mode": "thresholds" 1485 | }, 1486 | "mappings": [], 1487 | "thresholds": { 1488 | "mode": "absolute", 1489 | "steps": [ 1490 | { 1491 | "color": "green", 1492 | "value": null 1493 | }, 1494 | { 1495 | "color": "blue", 1496 | "value": 1 1497 | } 1498 | ] 1499 | }, 1500 | "unit": "none" 1501 | }, 1502 | "overrides": [] 1503 | }, 1504 | "gridPos": { 1505 | "h": 4, 1506 | "w": 4, 1507 | "x": 12, 1508 | "y": 39 1509 | }, 1510 | "id": 53, 1511 | "options": { 1512 | "colorMode": "value", 1513 | "graphMode": "area", 1514 | "justifyMode": "auto", 1515 | "orientation": "auto", 1516 | "reduceOptions": { 1517 | "calcs": [ 1518 | "last" 1519 | ], 1520 | "fields": "", 1521 | "values": false 1522 | }, 1523 | "textMode": "auto" 1524 | }, 1525 | "pluginVersion": "9.3.8", 1526 | "targets": [ 1527 | { 1528 | "datasource": { 1529 | "type": "prometheus", 1530 | "uid": "${datasource}" 1531 | }, 1532 | "editorMode": "code", 1533 | "exemplar": false, 1534 | "expr": "sum(trivy_resource_configaudits{severity=\"Low\", namespace=~\"$namespace\", cluster=~\"$cluster\"})", 1535 | "instant": true, 1536 | "interval": "$resolution", 1537 | "legendFormat": "__auto", 1538 | "refId": "A" 1539 | } 1540 | ], 1541 | "title": "LOW", 1542 | "type": "stat" 1543 | }, 1544 | { 1545 | "datasource": { 1546 | "type": "prometheus", 1547 | "uid": "${datasource}" 1548 | }, 1549 | "fieldConfig": { 1550 | "defaults": { 1551 | "color": { 1552 | "mode": "thresholds" 1553 | }, 1554 | "mappings": [], 1555 | "thresholds": { 1556 | "mode": "absolute", 1557 | "steps": [ 1558 | { 1559 | "color": "green", 1560 | "value": null 1561 | }, 1562 | { 1563 | "color": "text", 1564 | "value": 1 1565 | } 1566 | ] 1567 | }, 1568 | "unit": "none" 1569 | }, 1570 | "overrides": [] 1571 | }, 1572 | "gridPos": { 1573 | "h": 4, 1574 | "w": 4, 1575 | "x": 16, 1576 | "y": 39 1577 | }, 1578 | "id": 65, 1579 | "options": { 1580 | "colorMode": "value", 1581 | "graphMode": "area", 1582 | "justifyMode": "auto", 1583 | "orientation": "auto", 1584 | "reduceOptions": { 1585 | "calcs": [ 1586 | "last" 1587 | ], 1588 | "fields": "", 1589 | "values": false 1590 | }, 1591 | "textMode": "auto" 1592 | }, 1593 | "pluginVersion": "9.3.8", 1594 | "targets": [ 1595 | { 1596 | "datasource": { 1597 | "type": "prometheus", 1598 | "uid": "${datasource}" 1599 | }, 1600 | "editorMode": "code", 1601 | "exemplar": false, 1602 | "expr": "sum(trivy_resource_configaudits{namespace=~\"$namespace\", cluster=~\"$cluster\"})", 1603 | "instant": true, 1604 | "interval": "$resolution", 1605 | "legendFormat": "__auto", 1606 | "refId": "A" 1607 | } 1608 | ], 1609 | "title": "TOTAL", 1610 | "type": "stat" 1611 | }, 1612 | { 1613 | "datasource": { 1614 | "type": "prometheus", 1615 | "uid": "${datasource}" 1616 | }, 1617 | "fieldConfig": { 1618 | "defaults": { 1619 | "color": { 1620 | "mode": "palette-classic" 1621 | }, 1622 | "custom": { 1623 | "axisCenteredZero": false, 1624 | "axisColorMode": "text", 1625 | "axisLabel": "", 1626 | "axisPlacement": "auto", 1627 | "barAlignment": 0, 1628 | "drawStyle": "line", 1629 | "fillOpacity": 15, 1630 | "gradientMode": "opacity", 1631 | "hideFrom": { 1632 | "legend": false, 1633 | "tooltip": false, 1634 | "viz": false 1635 | }, 1636 | "lineInterpolation": "linear", 1637 | "lineWidth": 2, 1638 | "pointSize": 5, 1639 | "scaleDistribution": { 1640 | "type": "linear" 1641 | }, 1642 | "showPoints": "never", 1643 | "spanNulls": false, 1644 | "stacking": { 1645 | "group": "A", 1646 | "mode": "none" 1647 | }, 1648 | "thresholdsStyle": { 1649 | "mode": "off" 1650 | } 1651 | }, 1652 | "mappings": [], 1653 | "thresholds": { 1654 | "mode": "absolute", 1655 | "steps": [ 1656 | { 1657 | "color": "green", 1658 | "value": null 1659 | }, 1660 | { 1661 | "color": "blue", 1662 | "value": 1 1663 | } 1664 | ] 1665 | }, 1666 | "unit": "none" 1667 | }, 1668 | "overrides": [] 1669 | }, 1670 | "gridPos": { 1671 | "h": 8, 1672 | "w": 12, 1673 | "x": 0, 1674 | "y": 43 1675 | }, 1676 | "id": 62, 1677 | "options": { 1678 | "legend": { 1679 | "calcs": [], 1680 | "displayMode": "table", 1681 | "placement": "right", 1682 | "showLegend": true 1683 | }, 1684 | "tooltip": { 1685 | "mode": "single", 1686 | "sort": "none" 1687 | } 1688 | }, 1689 | "pluginVersion": "8.5.0", 1690 | "targets": [ 1691 | { 1692 | "datasource": { 1693 | "type": "prometheus", 1694 | "uid": "${datasource}" 1695 | }, 1696 | "editorMode": "code", 1697 | "exemplar": false, 1698 | "expr": "sum(trivy_resource_configaudits{cluster=~\"$cluster\", namespace=~\"$namespace\"}) by (namespace)", 1699 | "instant": false, 1700 | "interval": "$resolution", 1701 | "legendFormat": "__auto", 1702 | "range": true, 1703 | "refId": "A" 1704 | } 1705 | ], 1706 | "title": "Total config audit report by namespaces", 1707 | "type": "timeseries" 1708 | }, 1709 | { 1710 | "datasource": { 1711 | "type": "prometheus", 1712 | "uid": "${datasource}" 1713 | }, 1714 | "fieldConfig": { 1715 | "defaults": { 1716 | "color": { 1717 | "mode": "palette-classic" 1718 | }, 1719 | "custom": { 1720 | "axisCenteredZero": false, 1721 | "axisColorMode": "text", 1722 | "axisLabel": "", 1723 | "axisPlacement": "auto", 1724 | "barAlignment": 0, 1725 | "drawStyle": "line", 1726 | "fillOpacity": 15, 1727 | "gradientMode": "opacity", 1728 | "hideFrom": { 1729 | "legend": false, 1730 | "tooltip": false, 1731 | "viz": false 1732 | }, 1733 | "lineInterpolation": "linear", 1734 | "lineWidth": 2, 1735 | "pointSize": 5, 1736 | "scaleDistribution": { 1737 | "type": "linear" 1738 | }, 1739 | "showPoints": "never", 1740 | "spanNulls": false, 1741 | "stacking": { 1742 | "group": "A", 1743 | "mode": "none" 1744 | }, 1745 | "thresholdsStyle": { 1746 | "mode": "off" 1747 | } 1748 | }, 1749 | "mappings": [], 1750 | "thresholds": { 1751 | "mode": "absolute", 1752 | "steps": [ 1753 | { 1754 | "color": "green", 1755 | "value": null 1756 | }, 1757 | { 1758 | "color": "blue", 1759 | "value": 1 1760 | } 1761 | ] 1762 | }, 1763 | "unit": "none" 1764 | }, 1765 | "overrides": [ 1766 | { 1767 | "matcher": { 1768 | "id": "byName", 1769 | "options": "Critical" 1770 | }, 1771 | "properties": [ 1772 | { 1773 | "id": "color", 1774 | "value": { 1775 | "fixedColor": "red", 1776 | "mode": "fixed" 1777 | } 1778 | } 1779 | ] 1780 | }, 1781 | { 1782 | "matcher": { 1783 | "id": "byName", 1784 | "options": "High" 1785 | }, 1786 | "properties": [ 1787 | { 1788 | "id": "color", 1789 | "value": { 1790 | "fixedColor": "orange", 1791 | "mode": "fixed" 1792 | } 1793 | } 1794 | ] 1795 | }, 1796 | { 1797 | "matcher": { 1798 | "id": "byName", 1799 | "options": "Medium" 1800 | }, 1801 | "properties": [ 1802 | { 1803 | "id": "color", 1804 | "value": { 1805 | "fixedColor": "yellow", 1806 | "mode": "fixed" 1807 | } 1808 | } 1809 | ] 1810 | }, 1811 | { 1812 | "matcher": { 1813 | "id": "byName", 1814 | "options": "Low" 1815 | }, 1816 | "properties": [ 1817 | { 1818 | "id": "color", 1819 | "value": { 1820 | "fixedColor": "blue", 1821 | "mode": "fixed" 1822 | } 1823 | } 1824 | ] 1825 | } 1826 | ] 1827 | }, 1828 | "gridPos": { 1829 | "h": 8, 1830 | "w": 12, 1831 | "x": 12, 1832 | "y": 43 1833 | }, 1834 | "id": 63, 1835 | "options": { 1836 | "legend": { 1837 | "calcs": [], 1838 | "displayMode": "table", 1839 | "placement": "right", 1840 | "showLegend": true 1841 | }, 1842 | "tooltip": { 1843 | "mode": "multi", 1844 | "sort": "desc" 1845 | } 1846 | }, 1847 | "pluginVersion": "8.5.0", 1848 | "targets": [ 1849 | { 1850 | "datasource": { 1851 | "type": "prometheus", 1852 | "uid": "${datasource}" 1853 | }, 1854 | "editorMode": "code", 1855 | "exemplar": false, 1856 | "expr": "sum(trivy_resource_configaudits{cluster=~\"$cluster\"}) by (severity)", 1857 | "instant": false, 1858 | "interval": "$resolution", 1859 | "legendFormat": "__auto", 1860 | "range": true, 1861 | "refId": "A" 1862 | } 1863 | ], 1864 | "title": "Total config audit report by severity", 1865 | "type": "timeseries" 1866 | }, 1867 | { 1868 | "collapsed": false, 1869 | "gridPos": { 1870 | "h": 1, 1871 | "w": 24, 1872 | "x": 0, 1873 | "y": 51 1874 | }, 1875 | "id": 68, 1876 | "panels": [], 1877 | "title": "RBAC Assessments", 1878 | "type": "row" 1879 | }, 1880 | { 1881 | "datasource": { 1882 | "type": "prometheus", 1883 | "uid": "${datasource}" 1884 | }, 1885 | "fieldConfig": { 1886 | "defaults": { 1887 | "color": { 1888 | "mode": "thresholds" 1889 | }, 1890 | "mappings": [], 1891 | "thresholds": { 1892 | "mode": "absolute", 1893 | "steps": [ 1894 | { 1895 | "color": "green", 1896 | "value": null 1897 | }, 1898 | { 1899 | "color": "red", 1900 | "value": 1 1901 | } 1902 | ] 1903 | }, 1904 | "unit": "none" 1905 | }, 1906 | "overrides": [] 1907 | }, 1908 | "gridPos": { 1909 | "h": 4, 1910 | "w": 4, 1911 | "x": 0, 1912 | "y": 52 1913 | }, 1914 | "id": 72, 1915 | "options": { 1916 | "colorMode": "value", 1917 | "graphMode": "area", 1918 | "justifyMode": "auto", 1919 | "orientation": "auto", 1920 | "reduceOptions": { 1921 | "calcs": [ 1922 | "last" 1923 | ], 1924 | "fields": "", 1925 | "values": false 1926 | }, 1927 | "textMode": "auto" 1928 | }, 1929 | "pluginVersion": "9.3.8", 1930 | "targets": [ 1931 | { 1932 | "datasource": { 1933 | "type": "prometheus", 1934 | "uid": "${datasource}" 1935 | }, 1936 | "editorMode": "code", 1937 | "exemplar": false, 1938 | "expr": "sum(trivy_role_rbacassessments{severity=\"Critical\", namespace=~\"$namespace\", cluster=~\"$cluster\"})", 1939 | "instant": true, 1940 | "interval": "$resolution", 1941 | "legendFormat": "__auto", 1942 | "refId": "A" 1943 | } 1944 | ], 1945 | "title": "CRITICAL", 1946 | "type": "stat" 1947 | }, 1948 | { 1949 | "datasource": { 1950 | "type": "prometheus", 1951 | "uid": "${datasource}" 1952 | }, 1953 | "fieldConfig": { 1954 | "defaults": { 1955 | "color": { 1956 | "mode": "thresholds" 1957 | }, 1958 | "mappings": [], 1959 | "thresholds": { 1960 | "mode": "absolute", 1961 | "steps": [ 1962 | { 1963 | "color": "green", 1964 | "value": null 1965 | }, 1966 | { 1967 | "color": "orange", 1968 | "value": 1 1969 | } 1970 | ] 1971 | }, 1972 | "unit": "none" 1973 | }, 1974 | "overrides": [] 1975 | }, 1976 | "gridPos": { 1977 | "h": 4, 1978 | "w": 4, 1979 | "x": 4, 1980 | "y": 52 1981 | }, 1982 | "id": 71, 1983 | "options": { 1984 | "colorMode": "value", 1985 | "graphMode": "area", 1986 | "justifyMode": "auto", 1987 | "orientation": "auto", 1988 | "reduceOptions": { 1989 | "calcs": [ 1990 | "last" 1991 | ], 1992 | "fields": "", 1993 | "values": false 1994 | }, 1995 | "textMode": "auto" 1996 | }, 1997 | "pluginVersion": "9.3.8", 1998 | "targets": [ 1999 | { 2000 | "datasource": { 2001 | "type": "prometheus", 2002 | "uid": "${datasource}" 2003 | }, 2004 | "editorMode": "code", 2005 | "exemplar": false, 2006 | "expr": "sum(trivy_role_rbacassessments{severity=\"High\", namespace=~\"$namespace\", cluster=~\"$cluster\"})", 2007 | "instant": true, 2008 | "interval": "$resolution", 2009 | "legendFormat": "__auto", 2010 | "refId": "A" 2011 | } 2012 | ], 2013 | "title": "HIGH", 2014 | "type": "stat" 2015 | }, 2016 | { 2017 | "datasource": { 2018 | "type": "prometheus", 2019 | "uid": "${datasource}" 2020 | }, 2021 | "fieldConfig": { 2022 | "defaults": { 2023 | "color": { 2024 | "mode": "thresholds" 2025 | }, 2026 | "mappings": [], 2027 | "thresholds": { 2028 | "mode": "absolute", 2029 | "steps": [ 2030 | { 2031 | "color": "green", 2032 | "value": null 2033 | }, 2034 | { 2035 | "color": "yellow", 2036 | "value": 1 2037 | } 2038 | ] 2039 | }, 2040 | "unit": "none" 2041 | }, 2042 | "overrides": [] 2043 | }, 2044 | "gridPos": { 2045 | "h": 4, 2046 | "w": 4, 2047 | "x": 8, 2048 | "y": 52 2049 | }, 2050 | "id": 70, 2051 | "options": { 2052 | "colorMode": "value", 2053 | "graphMode": "area", 2054 | "justifyMode": "auto", 2055 | "orientation": "auto", 2056 | "reduceOptions": { 2057 | "calcs": [ 2058 | "last" 2059 | ], 2060 | "fields": "", 2061 | "values": false 2062 | }, 2063 | "textMode": "auto" 2064 | }, 2065 | "pluginVersion": "9.3.8", 2066 | "targets": [ 2067 | { 2068 | "datasource": { 2069 | "type": "prometheus", 2070 | "uid": "${datasource}" 2071 | }, 2072 | "editorMode": "code", 2073 | "exemplar": false, 2074 | "expr": "sum(trivy_role_rbacassessments{severity=\"Medium\", namespace=~\"$namespace\", cluster=~\"$cluster\"})", 2075 | "instant": true, 2076 | "interval": "$resolution", 2077 | "legendFormat": "__auto", 2078 | "refId": "A" 2079 | } 2080 | ], 2081 | "title": "MEDIUM", 2082 | "type": "stat" 2083 | }, 2084 | { 2085 | "datasource": { 2086 | "type": "prometheus", 2087 | "uid": "${datasource}" 2088 | }, 2089 | "fieldConfig": { 2090 | "defaults": { 2091 | "color": { 2092 | "mode": "thresholds" 2093 | }, 2094 | "mappings": [], 2095 | "thresholds": { 2096 | "mode": "absolute", 2097 | "steps": [ 2098 | { 2099 | "color": "green", 2100 | "value": null 2101 | }, 2102 | { 2103 | "color": "blue", 2104 | "value": 1 2105 | } 2106 | ] 2107 | }, 2108 | "unit": "none" 2109 | }, 2110 | "overrides": [] 2111 | }, 2112 | "gridPos": { 2113 | "h": 4, 2114 | "w": 4, 2115 | "x": 12, 2116 | "y": 52 2117 | }, 2118 | "id": 69, 2119 | "options": { 2120 | "colorMode": "value", 2121 | "graphMode": "area", 2122 | "justifyMode": "auto", 2123 | "orientation": "auto", 2124 | "reduceOptions": { 2125 | "calcs": [ 2126 | "last" 2127 | ], 2128 | "fields": "", 2129 | "values": false 2130 | }, 2131 | "textMode": "auto" 2132 | }, 2133 | "pluginVersion": "9.3.8", 2134 | "targets": [ 2135 | { 2136 | "datasource": { 2137 | "type": "prometheus", 2138 | "uid": "${datasource}" 2139 | }, 2140 | "editorMode": "code", 2141 | "exemplar": false, 2142 | "expr": "sum(trivy_role_rbacassessments{severity=\"Low\", namespace=~\"$namespace\", cluster=~\"$cluster\"})", 2143 | "instant": true, 2144 | "interval": "$resolution", 2145 | "legendFormat": "__auto", 2146 | "refId": "A" 2147 | } 2148 | ], 2149 | "title": "LOW", 2150 | "type": "stat" 2151 | }, 2152 | { 2153 | "datasource": { 2154 | "type": "prometheus", 2155 | "uid": "${datasource}" 2156 | }, 2157 | "fieldConfig": { 2158 | "defaults": { 2159 | "color": { 2160 | "mode": "thresholds" 2161 | }, 2162 | "mappings": [], 2163 | "thresholds": { 2164 | "mode": "absolute", 2165 | "steps": [ 2166 | { 2167 | "color": "green", 2168 | "value": null 2169 | }, 2170 | { 2171 | "color": "text", 2172 | "value": 1 2173 | } 2174 | ] 2175 | }, 2176 | "unit": "none" 2177 | }, 2178 | "overrides": [] 2179 | }, 2180 | "gridPos": { 2181 | "h": 4, 2182 | "w": 4, 2183 | "x": 16, 2184 | "y": 52 2185 | }, 2186 | "id": 73, 2187 | "options": { 2188 | "colorMode": "value", 2189 | "graphMode": "area", 2190 | "justifyMode": "auto", 2191 | "orientation": "auto", 2192 | "reduceOptions": { 2193 | "calcs": [ 2194 | "last" 2195 | ], 2196 | "fields": "", 2197 | "values": false 2198 | }, 2199 | "textMode": "auto" 2200 | }, 2201 | "pluginVersion": "9.3.8", 2202 | "targets": [ 2203 | { 2204 | "datasource": { 2205 | "type": "prometheus", 2206 | "uid": "${datasource}" 2207 | }, 2208 | "editorMode": "code", 2209 | "exemplar": false, 2210 | "expr": "sum(trivy_role_rbacassessments{namespace=~\"$namespace\", cluster=~\"$cluster\"})", 2211 | "instant": true, 2212 | "interval": "$resolution", 2213 | "legendFormat": "__auto", 2214 | "refId": "A" 2215 | } 2216 | ], 2217 | "title": "TOTAL", 2218 | "type": "stat" 2219 | }, 2220 | { 2221 | "datasource": { 2222 | "type": "prometheus", 2223 | "uid": "${datasource}" 2224 | }, 2225 | "fieldConfig": { 2226 | "defaults": { 2227 | "color": { 2228 | "mode": "palette-classic" 2229 | }, 2230 | "custom": { 2231 | "axisCenteredZero": false, 2232 | "axisColorMode": "text", 2233 | "axisLabel": "", 2234 | "axisPlacement": "auto", 2235 | "barAlignment": 0, 2236 | "drawStyle": "line", 2237 | "fillOpacity": 15, 2238 | "gradientMode": "opacity", 2239 | "hideFrom": { 2240 | "legend": false, 2241 | "tooltip": false, 2242 | "viz": false 2243 | }, 2244 | "lineInterpolation": "linear", 2245 | "lineWidth": 2, 2246 | "pointSize": 5, 2247 | "scaleDistribution": { 2248 | "type": "linear" 2249 | }, 2250 | "showPoints": "never", 2251 | "spanNulls": false, 2252 | "stacking": { 2253 | "group": "A", 2254 | "mode": "none" 2255 | }, 2256 | "thresholdsStyle": { 2257 | "mode": "off" 2258 | } 2259 | }, 2260 | "mappings": [], 2261 | "thresholds": { 2262 | "mode": "absolute", 2263 | "steps": [ 2264 | { 2265 | "color": "green", 2266 | "value": null 2267 | }, 2268 | { 2269 | "color": "blue", 2270 | "value": 1 2271 | } 2272 | ] 2273 | }, 2274 | "unit": "none" 2275 | }, 2276 | "overrides": [] 2277 | }, 2278 | "gridPos": { 2279 | "h": 8, 2280 | "w": 12, 2281 | "x": 0, 2282 | "y": 56 2283 | }, 2284 | "id": 74, 2285 | "options": { 2286 | "legend": { 2287 | "calcs": [], 2288 | "displayMode": "table", 2289 | "placement": "right", 2290 | "showLegend": true 2291 | }, 2292 | "tooltip": { 2293 | "mode": "single", 2294 | "sort": "none" 2295 | } 2296 | }, 2297 | "pluginVersion": "8.5.0", 2298 | "targets": [ 2299 | { 2300 | "datasource": { 2301 | "type": "prometheus", 2302 | "uid": "${datasource}" 2303 | }, 2304 | "editorMode": "code", 2305 | "exemplar": false, 2306 | "expr": "sum(trivy_role_rbacassessments{cluster=~\"$cluster\"}) by (namespace)", 2307 | "instant": false, 2308 | "interval": "$resolution", 2309 | "legendFormat": "__auto", 2310 | "range": true, 2311 | "refId": "A" 2312 | } 2313 | ], 2314 | "title": "Total RBAC Assessments by namespaces", 2315 | "type": "timeseries" 2316 | }, 2317 | { 2318 | "datasource": { 2319 | "type": "prometheus", 2320 | "uid": "${datasource}" 2321 | }, 2322 | "fieldConfig": { 2323 | "defaults": { 2324 | "color": { 2325 | "mode": "palette-classic" 2326 | }, 2327 | "custom": { 2328 | "axisCenteredZero": false, 2329 | "axisColorMode": "text", 2330 | "axisLabel": "", 2331 | "axisPlacement": "auto", 2332 | "barAlignment": 0, 2333 | "drawStyle": "line", 2334 | "fillOpacity": 15, 2335 | "gradientMode": "opacity", 2336 | "hideFrom": { 2337 | "legend": false, 2338 | "tooltip": false, 2339 | "viz": false 2340 | }, 2341 | "lineInterpolation": "linear", 2342 | "lineWidth": 2, 2343 | "pointSize": 5, 2344 | "scaleDistribution": { 2345 | "type": "linear" 2346 | }, 2347 | "showPoints": "never", 2348 | "spanNulls": false, 2349 | "stacking": { 2350 | "group": "A", 2351 | "mode": "none" 2352 | }, 2353 | "thresholdsStyle": { 2354 | "mode": "off" 2355 | } 2356 | }, 2357 | "mappings": [], 2358 | "thresholds": { 2359 | "mode": "absolute", 2360 | "steps": [ 2361 | { 2362 | "color": "green", 2363 | "value": null 2364 | }, 2365 | { 2366 | "color": "blue", 2367 | "value": 1 2368 | } 2369 | ] 2370 | }, 2371 | "unit": "none" 2372 | }, 2373 | "overrides": [ 2374 | { 2375 | "matcher": { 2376 | "id": "byName", 2377 | "options": "Critical" 2378 | }, 2379 | "properties": [ 2380 | { 2381 | "id": "color", 2382 | "value": { 2383 | "fixedColor": "red", 2384 | "mode": "fixed" 2385 | } 2386 | } 2387 | ] 2388 | }, 2389 | { 2390 | "matcher": { 2391 | "id": "byName", 2392 | "options": "High" 2393 | }, 2394 | "properties": [ 2395 | { 2396 | "id": "color", 2397 | "value": { 2398 | "fixedColor": "orange", 2399 | "mode": "fixed" 2400 | } 2401 | } 2402 | ] 2403 | }, 2404 | { 2405 | "matcher": { 2406 | "id": "byName", 2407 | "options": "Medium" 2408 | }, 2409 | "properties": [ 2410 | { 2411 | "id": "color", 2412 | "value": { 2413 | "fixedColor": "yellow", 2414 | "mode": "fixed" 2415 | } 2416 | } 2417 | ] 2418 | }, 2419 | { 2420 | "matcher": { 2421 | "id": "byName", 2422 | "options": "Low" 2423 | }, 2424 | "properties": [ 2425 | { 2426 | "id": "color", 2427 | "value": { 2428 | "fixedColor": "blue", 2429 | "mode": "fixed" 2430 | } 2431 | } 2432 | ] 2433 | } 2434 | ] 2435 | }, 2436 | "gridPos": { 2437 | "h": 8, 2438 | "w": 12, 2439 | "x": 12, 2440 | "y": 56 2441 | }, 2442 | "id": 75, 2443 | "options": { 2444 | "legend": { 2445 | "calcs": [], 2446 | "displayMode": "table", 2447 | "placement": "right", 2448 | "showLegend": true 2449 | }, 2450 | "tooltip": { 2451 | "mode": "multi", 2452 | "sort": "desc" 2453 | } 2454 | }, 2455 | "pluginVersion": "8.5.0", 2456 | "targets": [ 2457 | { 2458 | "datasource": { 2459 | "type": "prometheus", 2460 | "uid": "${datasource}" 2461 | }, 2462 | "editorMode": "code", 2463 | "exemplar": false, 2464 | "expr": "sum(trivy_role_rbacassessments{cluster=~\"$cluster\"}) by (severity)", 2465 | "instant": false, 2466 | "interval": "$resolution", 2467 | "legendFormat": "__auto", 2468 | "range": true, 2469 | "refId": "A" 2470 | } 2471 | ], 2472 | "title": "Total RBAC Assessments by severity", 2473 | "type": "timeseries" 2474 | }, 2475 | { 2476 | "collapsed": false, 2477 | "gridPos": { 2478 | "h": 1, 2479 | "w": 24, 2480 | "x": 0, 2481 | "y": 64 2482 | }, 2483 | "id": 81, 2484 | "panels": [], 2485 | "title": "Exposed Secrets", 2486 | "type": "row" 2487 | }, 2488 | { 2489 | "datasource": { 2490 | "type": "prometheus", 2491 | "uid": "${datasource}" 2492 | }, 2493 | "fieldConfig": { 2494 | "defaults": { 2495 | "color": { 2496 | "mode": "palette-classic" 2497 | }, 2498 | "custom": { 2499 | "axisCenteredZero": false, 2500 | "axisColorMode": "text", 2501 | "axisLabel": "", 2502 | "axisPlacement": "auto", 2503 | "barAlignment": 0, 2504 | "drawStyle": "line", 2505 | "fillOpacity": 15, 2506 | "gradientMode": "opacity", 2507 | "hideFrom": { 2508 | "legend": false, 2509 | "tooltip": false, 2510 | "viz": false 2511 | }, 2512 | "lineInterpolation": "linear", 2513 | "lineWidth": 2, 2514 | "pointSize": 5, 2515 | "scaleDistribution": { 2516 | "type": "linear" 2517 | }, 2518 | "showPoints": "never", 2519 | "spanNulls": false, 2520 | "stacking": { 2521 | "group": "A", 2522 | "mode": "none" 2523 | }, 2524 | "thresholdsStyle": { 2525 | "mode": "off" 2526 | } 2527 | }, 2528 | "mappings": [], 2529 | "thresholds": { 2530 | "mode": "absolute", 2531 | "steps": [ 2532 | { 2533 | "color": "green", 2534 | "value": null 2535 | }, 2536 | { 2537 | "color": "blue", 2538 | "value": 1 2539 | } 2540 | ] 2541 | }, 2542 | "unit": "none" 2543 | }, 2544 | "overrides": [] 2545 | }, 2546 | "gridPos": { 2547 | "h": 8, 2548 | "w": 24, 2549 | "x": 0, 2550 | "y": 65 2551 | }, 2552 | "id": 76, 2553 | "options": { 2554 | "legend": { 2555 | "calcs": [], 2556 | "displayMode": "table", 2557 | "placement": "right", 2558 | "showLegend": true 2559 | }, 2560 | "tooltip": { 2561 | "mode": "single", 2562 | "sort": "none" 2563 | } 2564 | }, 2565 | "pluginVersion": "8.5.0", 2566 | "targets": [ 2567 | { 2568 | "datasource": { 2569 | "type": "prometheus", 2570 | "uid": "${datasource}" 2571 | }, 2572 | "editorMode": "code", 2573 | "exemplar": false, 2574 | "expr": "sum(trivy_image_exposedsecrets{cluster=~\"$cluster\"}) by (namespace)", 2575 | "instant": false, 2576 | "interval": "$resolution", 2577 | "legendFormat": "__auto", 2578 | "range": true, 2579 | "refId": "A" 2580 | } 2581 | ], 2582 | "title": "Total Exposed Secrets by namespaces", 2583 | "type": "timeseries" 2584 | } 2585 | ], 2586 | "refresh": "30s", 2587 | "schemaVersion": 37, 2588 | "style": "dark", 2589 | "tags": [ 2590 | "Prometheus", 2591 | "Addons", 2592 | "Trivy", 2593 | "Trivy-operator" 2594 | ], 2595 | "templating": { 2596 | "list": [ 2597 | { 2598 | "current": { 2599 | "selected": false, 2600 | "text": "Prometheus", 2601 | "value": "Prometheus" 2602 | }, 2603 | "hide": 0, 2604 | "includeAll": false, 2605 | "multi": false, 2606 | "name": "datasource", 2607 | "options": [], 2608 | "query": "prometheus", 2609 | "queryValue": "", 2610 | "refresh": 1, 2611 | "regex": "", 2612 | "skipUrlSync": false, 2613 | "type": "datasource" 2614 | }, 2615 | { 2616 | "current": { 2617 | "isNone": true, 2618 | "selected": false, 2619 | "text": "None", 2620 | "value": "" 2621 | }, 2622 | "datasource": { 2623 | "type": "prometheus", 2624 | "uid": "${datasource}" 2625 | }, 2626 | "definition": "label_values(kube_node_info,cluster)", 2627 | "hide": 0, 2628 | "includeAll": false, 2629 | "multi": false, 2630 | "name": "cluster", 2631 | "options": [], 2632 | "query": { 2633 | "qryType": 1, 2634 | "query": "label_values(kube_node_info,cluster)", 2635 | "refId": "PrometheusVariableQueryEditor-VariableQuery" 2636 | }, 2637 | "refresh": 1, 2638 | "regex": "", 2639 | "skipUrlSync": false, 2640 | "sort": 1, 2641 | "type": "query" 2642 | }, 2643 | { 2644 | "allValue": ".*", 2645 | "current": { 2646 | "selected": true, 2647 | "text": [ 2648 | "All" 2649 | ], 2650 | "value": [ 2651 | "$__all" 2652 | ] 2653 | }, 2654 | "datasource": { 2655 | "type": "prometheus", 2656 | "uid": "${datasource}" 2657 | }, 2658 | "definition": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)", 2659 | "hide": 0, 2660 | "includeAll": true, 2661 | "multi": true, 2662 | "name": "namespace", 2663 | "options": [], 2664 | "query": { 2665 | "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)", 2666 | "refId": "StandardVariableQuery" 2667 | }, 2668 | "refresh": 1, 2669 | "regex": "", 2670 | "skipUrlSync": false, 2671 | "sort": 1, 2672 | "type": "query" 2673 | }, 2674 | { 2675 | "current": { 2676 | "selected": true, 2677 | "text": "30s", 2678 | "value": "30s" 2679 | }, 2680 | "hide": 0, 2681 | "includeAll": false, 2682 | "multi": false, 2683 | "name": "resolution", 2684 | "options": [ 2685 | { 2686 | "selected": false, 2687 | "text": "1s", 2688 | "value": "1s" 2689 | }, 2690 | { 2691 | "selected": false, 2692 | "text": "15s", 2693 | "value": "15s" 2694 | }, 2695 | { 2696 | "selected": true, 2697 | "text": "30s", 2698 | "value": "30s" 2699 | }, 2700 | { 2701 | "selected": false, 2702 | "text": "1m", 2703 | "value": "1m" 2704 | }, 2705 | { 2706 | "selected": false, 2707 | "text": "3m", 2708 | "value": "3m" 2709 | }, 2710 | { 2711 | "selected": false, 2712 | "text": "5m", 2713 | "value": "5m" 2714 | } 2715 | ], 2716 | "query": "1s, 15s, 30s, 1m, 3m, 5m", 2717 | "queryValue": "", 2718 | "skipUrlSync": false, 2719 | "type": "custom" 2720 | } 2721 | ] 2722 | }, 2723 | "time": { 2724 | "from": "now-1h", 2725 | "to": "now" 2726 | }, 2727 | "timepicker": {}, 2728 | "timezone": "", 2729 | "title": "Trivy Operator - Vulnerabilities", 2730 | "uid": "security_trivy_operator", 2731 | "version": 15, 2732 | "weekStart": "" 2733 | } 2734 | --------------------------------------------------------------------------------