title: Duplicate metrics in prometheus?
body: <p>I am running the following Prometheus query:-</p>
  <pre><code>rate(container_cpu_user_seconds_total{image!=&quot;&quot;,instance=&quot;146.44.66.22:18080&quot;}[5m])
  </code></pre>
  <p>and I am getting the following output :-</p>
  <pre><code>    {container_label_com_docker_compose_config_hash=&quot;24027ba5aca4c9f571f3dae01531efbc9f2f0158ea221d3f48d9bbd9c71a3b9f&quot;,container_label_com_docker_compose_container_number=&quot;1&quot;,container_label_com_docker_compose_oneoff=&quot;False&quot;,container_label_com_docker_compose_project=&quot;docker&quot;,container_label_com_docker_compose_service=&quot;tweetit&quot;,container_label_com_docker_compose_version=&quot;1.8.0&quot;,image=&quot;myImage&quot;,instance=&quot;146.44.66.22:18080&quot;,job=&quot;jmp&quot;,name=&quot;docker_tweetit_1&quot;} 0.11122807017544115
  {container_label_com_docker_compose_config_hash=&quot;24027ba5aca4c9f571f3dae01531efbc9f2f0158ea221d3f48d9bbd9c71a3b9f&quot;,container_label_com_docker_compose_container_number=&quot;1&quot;,container_label_com_docker_compose_oneoff=&quot;False&quot;,container_label_com_docker_compose_project=&quot;docker&quot;,container_label_com_docker_compose_service=&quot;tweetit&quot;,container_label_com_docker_compose_version=&quot;1.8.0&quot;,image=&quot;myImage&quot;,instance=&quot;146.44.66.22:18080&quot;,job=&quot;prod-job&quot;,name=&quot;docker_tweetit_1&quot;}  0.11242105263158202
  {container_label_com_docker_compose_config_hash=&quot;24027ba5aca4c9f571f3dae01531efbc9f2f0158ea221d3f48d9bbd9c71a3b9f&quot;,container_label_com_docker_compose_container_number=&quot;1&quot;,container_label_com_docker_compose_oneoff=&quot;False&quot;,container_label_com_docker_compose_project=&quot;docker&quot;,container_label_com_docker_compose_service=&quot;tweetit&quot;,container_label_com_docker_compose_version=&quot;1.8.0&quot;,image=&quot;myImage&quot;,instance=&quot;146.44.66.22:18080&quot;,job=&quot;trends&quot;,name=&quot;docker_tweetit_1&quot;}    0.11249122807016726
  {id=&quot;/docker/50b0033b372de336ad22c05e82fb6c689e95ce54ee687e01b8610b3d044b300a&quot;,image=&quot;exports,instance=&quot;146.44.66.22:18080&quot;,job=&quot;jmp&quot;,name=&quot;jmx&quot;}    0.001719298245614067
  {id=&quot;/docker/50b0033b372de336ad22c05e82fb6c689e95ce54ee687e01b8610b3d044b300a&quot;,image=&quot;exports,instance=&quot;146.44.66.22:18080&quot;,job=&quot;prod-job&quot;,name=&quot;jmx&quot;} 0.0017543859649122805
  {id=&quot;/docker/50b0033b372de336ad22c05e82fb6c689e95ce54ee687e01b8610b3d044b300a&quot;,image=&quot;exports,instance=&quot;146.44.66.22:18080&quot;,job=&quot;trends&quot;,name=&quot;jmx&quot;}   0.001719298245614067
  {id=&quot;/docker/ec8cc594235c0609a9f21404d86cec3d8b93844ecfc7b15170a74f1b55ed7d11&quot;,image=&quot;advisor,instance=&quot;146.44.66.22:18080&quot;,job=&quot;jmp&quot;,name=&quot;cadvisor-146.44.66.22&quot;}    0.023052631578946346
  {id=&quot;/docker/ec8cc594235c0609a9f21404d86cec3d8b93844ecfc7b15170a74f1b55ed7d11&quot;,image=&quot;advisor,instance=&quot;146.44.66.22:18080&quot;,job=&quot;prod-job&quot;,name=&quot;cadvisor-146.44.66.22&quot;} 0.02308771929824536
  {id=&quot;/docker/ec8cc594235c0609a9f21404d86cec3d8b93844ecfc7b15170a74f1b55ed7d11&quot;,image=&quot;advisor,instance=&quot;146.44.66.22:18080&quot;,job=&quot;trends&quot;,name=&quot;cadvisor-146.44.66.22&quot;}
  </code></pre>
  <p>I am trying to display these in a grafana dashboard but i do not want the duplicates. How can i adjust the query so that i do not get the duplicates? Any help will be appreciated. :)</p>
  <p><a href="https://i.stack.imgur.com/owYse.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/owYse.png" alt="enter image description here" /></a></p>