Installing x-pack automatically turns on monitoring to localhost:9200
- Dominant language
- Java
- Stars
- 14.9k
- Forks
- 3.5k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 88
Description
*Original comment by @ppf2:*
The way the documentation is written today (Step 2) suggests that after installing x-pack for logstash, they have to configure the xpack settings in the yml to enable monitoring.
LINK REDACTED
But after installing x-pack, it looks like it is immediately trying to default to localhost:9200 to send its stats to ES so that it trashes the log file with these warnings every 5s.
```
[2017-03-29T14:59:54,864][WARN ][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>#LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [LINK REDACTED Connection refused (Connection refused)"}
```
For users who are familiar with x-pack, we will know that this is because monitoring is enabled by default against localhost:9200 so it cannot find an ES to send the stats to. But for end users/customers, they may not know how to interpret these warnings and will just get a whole bunch of warnings in their LS log until they have the ES monitoring cluster setup.
We may want to consider not sending stats automatically by default until the relevant xpack settings (i.e. Step 2) is set up. Or clarify the documentation to indicate that as soon as x-pack is installed it will start sending stats to the default localhost:9200 until they configure xpack.monitoring.elasticsearch.url appropriately, etc..
Contributor guide
Research direction
Start with the x-pack installation behavior and the documentation's Step 2, then inspect the xpack settings in the YAML configuration and reproduce the localhost:9200 warnings. Done means either monitoring no longer attempts the default endpoint before configuration or the documentation clearly explains that behavior and the xpack.monitoring.elasticsearch.url setting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elasticsearch
- Domain
- backend, observability-sre
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100