# Logstash output to Prometheus

**URL:** <https://discuss.elastic.co/t/logstash-output-to-prometheus/300686>\
**Category:** Logstash\
**Created:** [March 25, 2022, 10:55am UTC](https://discuss.elastic.co/t/logstash-output-to-prometheus/300686 "2022-03-25T10:55:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stephy\_Jacob](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephy_jacob/32/45032_2.png) [@Stephy\_Jacob](https://discuss.elastic.co/u/Stephy_Jacob)\
**Post date:** [March 25, 2022, 10:55am UTC](https://discuss.elastic.co/t/logstash-output-to-prometheus/300686/1 "2022-03-25T10:55:19Z")

</div>

Hi,  
Could you please confirm whether we can send output of Logstash to Prometheus

---

<div class="post-metadata">

**Author:** ![zx8086](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zx8086/32/94917_2.png) [@zx8086](https://discuss.elastic.co/u/zx8086)\
**Post date:** [March 25, 2022, 11:01am UTC](https://discuss.elastic.co/t/logstash-output-to-prometheus/300686/2 "2022-03-25T11:01:34Z")

</div>

Really depends on your setup and use case.. for example are you going to have an Prometheus endpoint to collect data ...

> **[Http output plugin | Logstash Reference \[8.1\] | Elastic](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-http.html)**

or do you want to scrape the data from Logstash / Elasticsearch

---

<div class="post-metadata">

**Author:** ![Stephy\_Jacob](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephy_jacob/32/45032_2.png) [@Stephy\_Jacob](https://discuss.elastic.co/u/Stephy_Jacob)\
**Post date:** [March 27, 2022, 2:14pm UTC](https://discuss.elastic.co/t/logstash-output-to-prometheus/300686/3 "2022-03-27T14:14:45Z")

</div>

Scraping the data from Logstash/ Elasticsearch endpoint in Prometheus Time series format will be ideal.  
I understand the above documentation will output to http end point from logstash in json format. But what I am looking for is Prometheus time series format.  
Can we scrape from elastisearch endpoint too? If yes, could you please let me know how?

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [March 27, 2022, 4:15pm UTC](https://discuss.elastic.co/t/logstash-output-to-prometheus/300686/4 "2022-03-27T16:15:15Z")

</div>

Hi @Stephy_Jacob

It's unclear to me what you're trying to accomplish.

What are you trying to actually monitor? What source are you collecting metrics for ? What is the destination for those metrics?

Example For Elasticsearch? There is a Prometheus exporter for that

[GitHub - prometheus-community/elasticsearch\_exporter: Elasticsearch stats exporter for Prometheus](https://github.com/prometheus-community/elasticsearch_exporter).

Logstash does not have the ability to ship data preformatted in Prometheus format...

Is it possible somehow to do all formatting inside logstash.. I am not sure how to code it to do that...

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 24, 2022, 4:16pm UTC](https://discuss.elastic.co/t/logstash-output-to-prometheus/300686/5 "2022-04-24T16:16:00Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
