Answers: <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>
  
Answers: CC BY-SA 4.0
Answers: 2023-04-12T10:29:36.387Z
Answers: 2023-04-12T10:29:36.387Z
Answers: Bruce Becker
Body: <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>
  
Tags: <prometheus>
Title: List all active promtail targets
UserDisplayName: MrMeeSeeks
ThreadText: # 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)
  
  
  ---
  
  