-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve error when ES Ingest node plugins are not loaded (#3676)
* Improve error when ES ingest node plugins are not loaded We're parsing the Elasticsearch JSON error and try to produce an error message that is as helpful as possible. The following cases are detected: * A plugin providing a processor is missing. In case the plugin is one of `ingest-geoip` or `ingest-user-agent`, we can also suggest the command that installs them. * Elasticsearch < 5.0. We now detect this and tell the user that ES 5.0 is required by FBM. A drawback of this approach is that if both the GeoIP and User-Agent plugins are missing, only one will be reported. This might get solved by including the user-agent one in ES, or by improving the error we get from ES, or by us querying the node stats API Note: this contains a change in the ES client, which makes it return the body in case of errors. I think we need that part anyway, otherwise we often show errors like `400 Bad request` without any other details. I tried to do a minimal change there, I hope I didn't introduce any changes in behaviour. * Move error after []byte in the returned values * addressed comments and added more tests
- Loading branch information
Showing
5 changed files
with
138 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters