<p>I have deployed application on kubernetes cluster and for monitoring using prometheus and grafana. For kubernetes pods monitoring using Grafana dashboard: <em>Kubernetes cluster monitoring (via Prometheus) <a href="https://grafana.com/grafana/dashboards/315" rel="noreferrer">https://grafana.com/grafana/dashboards/315</a></em></p>

<p>I had imported the dashboard using id 315 and its reflecting without pod name and containers name instead getting pod_name . Can anyone pls help how can i get pod name and container name in dashboard. </p>

<p><a href="https://i.stack.imgur.com/T4drF.png" rel="noreferrer"><img src="https://i.stack.imgur.com/T4drF.png" alt="enter image description here"></a></p>

<p><a href="https://i.stack.imgur.com/dSsBk.png" rel="noreferrer"><img src="https://i.stack.imgur.com/dSsBk.png" alt="enter image description here"></a></p>

<p><a href="https://i.stack.imgur.com/I1cXK.png" rel="noreferrer"><img src="https://i.stack.imgur.com/I1cXK.png" alt="enter image description here"></a></p>

<p>Provided tutorial was updated <strong>2 years ago</strong>. </p>

<p>Current version of Kubernetes is <a href="https://kubernetes.io/docs/setup/release/notes/#v1-17-0" rel="noreferrer">1.17</a>. As per tags, tutorial was tested on <code>Prometheus v. 1.3.0</code>, <code>Kubernetes v.1.4.0</code> and <code>Grafana v.3.1.1</code> which are quite old at the moment.</p>

<p>In requirements you have statement:</p>

<blockquote>
  <p>Prometheus will use metrics provided by <strong>cAdvisor via kubelet</strong> service (runs on each node of Kubernetes cluster by default) and via kube-apiserver service only.</p>
</blockquote>

<p>In <code>Kubernetes 1.16</code> metrics labels like <code>pod_name</code> and <code>container_name</code> was removed. Instead of that you need to use <code>pod</code> and <code>container</code>. You can verify it <a href="https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.16.md#removed-metrics" rel="noreferrer">here</a>.</p>

<blockquote>
  <p>Any Prometheus queries that match <code>pod_name</code> and <code>container_name</code> labels (e.g. cadvisor or kubelet probe metrics) must be updated to use pod and container instead. </p>
</blockquote>

<p>Please check <a href="https://github.com/istio/istio/issues/18827" rel="noreferrer">this Github Thread</a> about dashboard bug for more information.</p>

<p><strong>Solution</strong></p>

<p>Please change <code>pod_name</code> to <code>pod</code> in your query.</p>
