Graylog2 / Graylog2/graylog2-server
`elasticsearch_hosts` doesn't allow characters as part of parameter
- Dominant language
- Java
- Stars
- 8.1k
- Forks
- 1.1k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 217
Description
## Expected Behavior
In an environment where I've standardized on using `_`'s as part of hostnames in my environment, I should be able to provide a hostname with a `_` as part of the array of values in `elasticsearch_hosts`
## Current Behavior
When providing a hostname with a `_` as part of the name, I receive the error:
```
2021-01-18 16:22:18,143 ERROR: org.graylog2.bootstrap.CmdLineTool - Invalid configuration
com.github.joschi.jadconfig.ValidationException: Parameter elasticsearch_hosts must not contain URIs without host or scheme. (found [http://graylog_es01:9200, http://graylog_es02:9200, http://graylog_es03:9200])
```
While is is fixed by changing the `_` to a `-`, this is not easily remedied in large environments where naming conventions are standardized and would require effort to change.
## Possible Solution
Create a patch to allow `_`s to be valid characters in hostnames in the `elasticsearch_hosts` parameter
## Steps to Reproduce (for bugs)
1. Create a dockerized Graylog deployment where the elasticsearch service/container name contains a `_`
2. Add the elasticsearch host with `_` to the `GRAYLOG_ELASTICSEARCH_HOSTS` env var
3. Bring the deployment up
4. Observe the error
Contributor guide
Assessment
This issue has not been assessed yet.