From a853e389463a09e123901b9eae4b13c692288002 Mon Sep 17 00:00:00 2001 From: jackstockley89 Date: Fri, 29 Dec 2023 16:36:03 +0000 Subject: [PATCH] docs: Update document with new syntax to find correct namespace in troubleshooting --- runbooks/source/grafana-dashboards.html.md.erb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/runbooks/source/grafana-dashboards.html.md.erb b/runbooks/source/grafana-dashboards.html.md.erb index 975678b6..c42c8ce4 100644 --- a/runbooks/source/grafana-dashboards.html.md.erb +++ b/runbooks/source/grafana-dashboards.html.md.erb @@ -46,6 +46,13 @@ You'll see an error similar to: ```bash t=2021-12-03T13:37:35+0000 lvl=eror msg="failed to load dashboard from " logger=provisioning.dashboard type=file name=sidecarProvider file=/tmp/dashboards/.json error="invalid character 'c' looking for beginning of value" ``` + +once you have the dashboard name, you can then search for the dashboard namespace using jq this will give a full list of names and namespaces for all configMap where this dashboard name is present: + +``` +kubectl get configmaps -A -ojson | jq -r '.items[] | select (.data.".json") | .metadata.namespace + "/" + .metadata.name' +``` + To help in identifying the dashboards, you can exec into the Grafana pod as follows: ```