<p>Sounds like you want <code>${PROMTAIL_HTTP_ENDPOINT}/targets</code>. See <a href="https://github.com/grafana/loki/blob/7edda371eae0e0a2535791ace6c87d7670cee925/clients/pkg/promtail/server/server.go#L126" rel="nofollow noreferrer">the server code</a></p>

CC BY-SA 4.0
2023-04-12T10:29:36.387Z
2023-04-12T10:29:36.387Z
Bruce Becker
<p>I have spend a significant time reading the manual, but I still cannot figure out how to actually get a list of the targets that promtail is currently tailing.</p>
<p>The metrics endpoint only exposes aggregate numbers.</p>
<p>How can I list all the targets promtail is currently tailing?</p>

<prometheus>
List all active promtail targets
MrMeeSeeks
# List all active promtail targets

(Asked by: username_0 on 2023-04-12)

I have spend a significant time reading the manual, but I still cannot figure out how to actually get a list of the targets that promtail is currently tailing.

The metrics endpoint only exposes aggregate numbers.

How can I list all the targets promtail is currently tailing?

**Tags:** prometheus


---

## 1 answers

### Answer by username_1 on 2023-04-12. Score: 2

Sounds like you want `${PROMTAIL_HTTP_ENDPOINT}/targets`. See [the server code](https://github.com/grafana/loki/blob/7edda371eae0e0a2535791ace6c87d7670cee925/clients/pkg/promtail/server/server.go#L126)


---

