title: How to get all metric names from Prometheus server filtered by a particular label
body: <p>We want to get all metric names from Prometheus server filtered by a particular label.</p>
  <p>Step 1 : Used following query to get all metric names, query succeeded with all metric names.</p>
  <pre><code>curl -g 'http://localhost:9090/api/v1/label/__name__/values
  </code></pre>
  <p>Step 2 : Used following query to get all metrics names filtered by label, but query still returned all metric names.</p>
  <pre><code>curl -g 'http://localhost:9090/api/v1/label/__name__/values?match[]={job!=&quot;prometheus&quot;}'
  </code></pre>
  <p>Can somebody please help me filter all metric names by label over http? Thanks</p>
  <pre><code>curl -G -XGET http://localhost:9090/api/v1/label/__name__/values --data-urlencode 'match[]={__name__=~&quot;.+&quot;, job!=&quot;prometheus&quot;}'
  </code></pre>
  <p>@anemyte, Still returns all the results. Can you please check the query</p>