title: How to replace target with label while displaying metrics on grafana
body: <p>I have configured telegraf/prometheus/grafana to display system metrics, but now what i want to do is to set up variables in Grafana to display label instead of target which i configured in prometheus.yml file.</p>
  <p><a href="https://i.stack.imgur.com/lJ9C8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lJ9C8.png" alt="prometheus.yml" /></a>
  <a href="https://i.stack.imgur.com/plaTh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/plaTh.png" alt="grafana variable" /></a>
  <a href="https://i.stack.imgur.com/8FZmm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8FZmm.png" alt="grafana instance" /></a></p>
  <p>So my question is how can i replace this <strong>localhost:9126</strong> with <strong>test</strong> without losing all of the metrics, because when i tried Query <code>label_values(system_uptime, name)</code>, i got no metrics to show on graphs, so can somebody help me, and show me how to do it right? Thanks.</p>