# Want to disable Logstash http://localhost:9600/ URL JSON output

**URL:** https://discuss.elastic.co/t/want-to-disable-logstash-http-localhost-9600-url-json-output/299352
**Category:** Logstash
**Created:** [March 10, 2022, 3:41pm UTC](https://discuss.elastic.co/t/want-to-disable-logstash-http-localhost-9600-url-json-output/299352 "2022-03-10T15:41:13Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![shahidraza](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shahidraza/32/102889_2.png) [@shahidraza](https://discuss.elastic.co/u/shahidraza)
#### Post date: [March 10, 2022, 3:41pm UTC](https://discuss.elastic.co/t/want-to-disable-logstash-http-localhost-9600-url-json-output/299352/1 "2022-03-10T15:41:13Z")

</div>

Hi Team,

We don't want to see JSON output as it contains Hostname and other sensitive information and it's accessible without user id and password too.

Please share details to disable this so that security vulnerability can be closed.

Thanks,  
Shahid

---

<div class="post-metadata">

### Author: ![shahidraza](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shahidraza/32/102889_2.png) [@shahidraza](https://discuss.elastic.co/u/shahidraza)
#### Post date: [March 10, 2022, 6:38pm UTC](https://discuss.elastic.co/t/want-to-disable-logstash-http-localhost-9600-url-json-output/299352/2 "2022-03-10T18:38:47Z")

</div>

@kvch Please help to tag someone who can help if possible.

---

<div class="post-metadata">

### Author: ![ylasri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ylasri/32/86120_2.png) [@ylasri](https://discuss.elastic.co/u/ylasri)
#### Post date: [March 10, 2022, 6:47pm UTC](https://discuss.elastic.co/t/want-to-disable-logstash-http-localhost-9600-url-json-output/299352/3 "2022-03-10T18:47:24Z")

</div>

You can secure the stats API of Logstash

> **[Monitoring Logstash with APIs | Logstash Reference \[8.1\] | Elastic](https://www.elastic.co/guide/en/logstash/current/monitoring-logstash.html#monitoring-api-security)**

---

<div class="post-metadata">

### Author: ![ylasri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ylasri/32/86120_2.png) [@ylasri](https://discuss.elastic.co/u/ylasri)
#### Post date: [March 10, 2022, 6:49pm UTC](https://discuss.elastic.co/t/want-to-disable-logstash-http-localhost-9600-url-json-output/299352/4 "2022-03-10T18:49:10Z")

</div>

Currently, i think we can't disable logstash Stats API

> <https://github.com/elastic/logstash/issues/6298>
>
> @L4rS6 discovered an issue with our metric collection; it doesn't work when proc…fs is not mounted.
> For security reason users can disable the access of procfs, this restriction will make logstash crash at startup. 
> 
> 
> For me, its a bug and we should resolve #6296, but let's open the discussion should we allow users to be able to disable the metric collection? Because right now 5.0 is not usable in that scenario and there is no workaround until we fixed the issue.

---

<div class="post-metadata">

### Author: ![shahidraza](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shahidraza/32/102889_2.png) [@shahidraza](https://discuss.elastic.co/u/shahidraza)
#### Post date: [March 10, 2022, 7:15pm UTC](https://discuss.elastic.co/t/want-to-disable-logstash-http-localhost-9600-url-json-output/299352/5 "2022-03-10T19:15:22Z")

</div>

Thank you for update @ylasri actually security team raised this issue when they hit localhost:9600 in chrome all the sensitive information they are able to see. How to stop or hide the information please guide.

Thank you in advance.

---

<div class="post-metadata">

### Author: ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)
#### Post date: [March 10, 2022, 8:04pm UTC](https://discuss.elastic.co/t/want-to-disable-logstash-http-localhost-9600-url-json-output/299352/6 "2022-03-10T20:04:18Z")

</div>

Which version are you using?

In newer versions you can set `api.enabled: false` in `logstash.yml` to disable the API endpoint.

But doing this you will not be able to monitor your logstash instance and your logstash pipelines.

And as already said, you can set a username, password and certificate to access the logstash api endpoint, this is [explained in the documentation](https://www.elastic.co/guide/en/logstash/current/monitoring-logstash.html#monitoring-api-security).

Also, this API endpoint per default only binds to the loopback address, to make a request to the Logstash API on port `9600` you need access to the machine where logstash is running.

---

<div class="post-metadata">

### Author: ![Rios](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rios/32/95745_2.png) [@Rios](https://discuss.elastic.co/u/Rios)
#### Post date: [March 11, 2022, 5:51am UTC](https://discuss.elastic.co/t/want-to-disable-logstash-http-localhost-9600-url-json-output/299352/7 "2022-03-11T05:51:51Z")

</div>

Is this what are you looking for?  
**http.enabled: false** / in logstash.yml \<- no web API interface, newer version: api.enabled

---

<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 8, 2022, 5:52am UTC](https://discuss.elastic.co/t/want-to-disable-logstash-http-localhost-9600-url-json-output/299352/8 "2022-04-08T05:52:14Z")

</div>

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