I have grafana Dashboards, Pods drop down coming None within namespace, however we have pods running in namespace and pulling data prometheus.
Screenshot:
Query:
"datasource": "Prometheus",
"definition": "",
"description": null,
"error": null,
"hide": 0,
"includeAll": false,
"label": "Pod",
"multi": false,
"name": "pod",
"options": [],
"query": {
"query": "query_result(sum(container_memory_working_set_bytes{namespace=\"$namespace\"}) by (pod_name))",
"refId": "Prometheus-pod-Variable-Query"
},
"refresh": 1,
"regex": "/pod_name=\\\"(.*?)(\\\")/",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
I am imported json code: https://grafana.com/grafana/dashboards/6879
This might not be a full answer, but I cannot yet comment.
The linked dashboard imports and works for me fine. So I suspect one of these:
container_memory_working_set_bytes
metric has any value at all, anywhere.kube_system
system namespace might be restricted with respect to scraping and such. If another namespace works and only this one doesn't, then this is the case.Edit your dashboard's JSON:
Rename "pod_name" to "pod" in the 2 places (and save)
Looks like this grafana dashboard was created with older kubernetes version,
and metrics internals since changed.
Probably will also need similar edits for "container_name" changing to "container" in these older dashboards