-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Graylog 5.0 fails to index input messages with Opensearch 2.x #14236
Description
We have installed Graylog using Helm chart from KongZ repo. As the chart is not released with support for the latest Graylog, we manually changed the image tag to 5.0.0 and deployed it alongside MongoDB 5.0.0 and OpenSearch version 2.0.1 and 2.3.0 on Kubernetes 1.24.6 on Azure.
The deployment comes up online and the Elasticsearch cluster is in green state. There are no error logs from Graylog, MongoDB or OpenSearch pods.
The Graylog support matrix: https://go2docs.graylog.org/5-0/planning_your_deployment/planning_your_upgrade_to_opensearch.htm
Expected Behavior
If we add an input to Graylog, f.ex GELF TCP, and send a message using echo and netcat, the message should show up in the search dashboard. Instead of using a GELF TCP input, we can also test it with Random Message Generator under System > Inputs > Select New Input. It shall generate random messages which we can then view and search from the homepage.
Current Behavior
If we add an input to Graylog, f.ex GELF TCP, and send a message using echo and netcat, the message fails to index with the bulk API.
The widget in the homepage gives this error message:
While retrieving data for this widget, the following error(s) occurred:
Elasticsearch exception [type=illegal_argument_exception, reason=key [types] is not supported in the metadata section].
The pod logs have this message:
Caught exception during bulk indexing: ElasticsearchException{message=ElasticsearchException[An error occurred: ]; nested: IOException[Unable to parse response body for Response{requestLine=POST /_bulk?timeout=1m HTTP/1.1, host=http://opensearch-cluster-master:9200, response=HTTP/1.1 200 OK}]; nested: NullPointerException;, errorDetails=[]}, retrying ( attempt #23). - {}
Since the OpenSearch version 2.0.1 and 2.3.0 is supported by Graylog 5 according to the support matrix, the indexing errors should not come.
Possible Solution
We found that the same issue is happening even with OpenSearch version 2.3.0.
Looking at https://opensearch.org/docs/2.3/breaking-changes/ , we think that this is due to API changes related to Java High Level REST API client inside Graylog.
opensearch-project/OpenSearch#1940
opensearch-project/OpenSearch#2215
opensearch-project/OpenSearch#4643
Steps to Reproduce (for bugs)
- Install MongoDB version 5.0.0
- Install OpenSearch version 2.0.1 from this Helm chart
- Install Graylog from this Helm chart
- Change image tag to
5.0.0in Graylog chart - Login to Graylog and check the cluster state is green or not under System > Overview
- Add an input ( GELF TCP or Random Message Generator)
- Check received messages under Search tab
- The messages would not be displayed and the widget would have an error.
- Check the pod logs of graylog pods, there will be an API indexing error.
Context
We want to run Graylog with FluentBit to import the logs to our cluster. FluentBit would generate and stream the logs to our https://graylog-input.mydomain.com and we can store and index the logs on latest versions of Graylog, OpenSearch and MongoDB.
Your Environment
- Graylog Version: 5.0.0+37301e5
- Java Version: JRE: Eclipse Adoptium 17.0.5 on Linux 5.4.0-1094-azure
- Elasticsearch Version: OpenSearch:2.0.1
- MongoDB Version: MongoDB 5.0.0
- Operating System: Ubuntu 22.04.1 LTS (jammy)
- Architecture: amd64
- Deployment: docker
- Cluster: Kubernetes 1.24 on Azure AKS
- Browser version: Chrome 108.0