Skip to content

Commit

Permalink
Merge pull request #5139 from ministryofjustice/grafana-dashboard
Browse files Browse the repository at this point in the history
docs: Update document with new syntax to find correct namespace in troubleshooting
  • Loading branch information
jackstockley89 authored Dec 29, 2023
2 parents c033ad7 + a853e38 commit ccaf2a8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions runbooks/source/grafana-dashboards.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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/<MY-DASHBOARD>.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."<MY-DASHBOARD>.json") | .metadata.namespace + "/" + .metadata.name'
```

To help in identifying the dashboards, you can exec into the Grafana pod as follows:

```
Expand Down

0 comments on commit ccaf2a8

Please sign in to comment.