# Logstash metrics endpoint

**URL:** <https://discuss.elastic.co/t/logstash-metrics-endpoint/126749>\
**Category:** Logstash\
**Created:** [April 4, 2018, 1:50pm UTC](https://discuss.elastic.co/t/logstash-metrics-endpoint/126749 "2018-04-04T13:50:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pjh](https://avatars.discourse-cdn.com/v4/letter/p/f19dbf/32.png) [@pjh](https://discuss.elastic.co/u/pjh)\
**Post date:** [April 4, 2018, 1:50pm UTC](https://discuss.elastic.co/t/logstash-metrics-endpoint/126749/1 "2018-04-04T13:50:12Z")

</div>

How can I use the logstash metrics endpoint? I can't see any detailed documentation on this.

I have uncommented the following in the logstash.yml file but when I visit :9600/metrics there is just a 404 error.

```
# ------------ Metrics Settings --------------
#
# Bind address for the metrics REST endpoint
#
http.host: "0.0.0.0"
#
# Bind port for the metrics REST endpoint, this option also accept a range
# (9600-9700) and logstash will pick up the first available ports.
#
http.port: 9600-9700

```

Any suggestions or articles for attention?

---

<div class="post-metadata">

**Author:** ![rcowart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rcowart/32/88091_2.png) [@rcowart](https://discuss.elastic.co/u/rcowart)\
**Post date:** [April 4, 2018, 2:45pm UTC](https://discuss.elastic.co/t/logstash-metrics-endpoint/126749/2 "2018-04-04T14:45:33Z")

</div>

Docs are here... [https://www.elastic.co/guide/en/logstash/current/monitoring.html](https://www.elastic.co/guide/en/logstash/current/monitoring.html)

You can also use the `http_poller` input of Logstash to collect stats from the API. We use this to create our own monitoring solution for Logstash which meets our needs better than X-Pack..

```auto
input {
  # Input plugin to collect Logstash stats from this instance every minute.
  http_poller {
    urls => {
      logstash_stats => {
        method => get
        url => "http://127.0.0.1:9600/_node/stats"
        headers => {
          Accept => "application/json"
        }
      }
    }
    request_timeout => 60
    schedule => { cron => "* * * * * UTC"}
    codec => "json"
    type => "logstash_stats"
  }
}

```

---

<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:** [May 2, 2018, 2:45pm UTC](https://discuss.elastic.co/t/logstash-metrics-endpoint/126749/3 "2018-05-02T14:45:37Z")

</div>

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