Skip to content

Conversation

@jimzz2live
Copy link

Add support for Graylog 4.1

Changes for StreamLookupFunction.java

1) Added required elasticsearch import for SortOrder
org.elasticsearch.search.sort.SortOrder;

2) Remove asElastic() as this method is no longer used

3) Switch timeRange builder to create which was changed when optional from/to fields were added in Graylog 4.1
   See https://github.com/Graylog2/graylog2-server/pull/9899/files

Changes for pom.xml

1) Added Elasticsearch 7.7 dependencies

2) Change Graylog version from 2.3.2 to 4.1.0

3) Removed graylog-plugin-pipeline-processor dependency

3) Change graylog-plugin-slookup-function to version 4.1.0 to indicate that it's for 4.1.x Graylog

Tested on Graylog 4.1.5
For version 4.0.5 to work revert the this.timeRange change on line 91 and switch Graylog versions in pom.xml

Changes for StreamLookupFunction.java
    1) Added required elasticsearch import for SortOrder import
    org.elasticsearch.search.sort.SortOrder;

    2) Remove asElastic() as this method is no longer used

    3) Switch timeRange builder to implement the new method introduced in Graylog 4.1 with the optional from/to
       relative range See https://github.com/Graylog2/graylog2-server/pull/9899/files

Changes for pom.xml
    1) Added Elasticsearch 7.7 dependencies

    2) Change Graylog version from 2.3.2 to 4.1.0

    3) Change graylog-plugin-slookup-function to version 4.1.0 to indicate that it's for 4.1.x Graylog
@baonq-me
Copy link

baonq-me commented Oct 5, 2023

Is this still works for higher versions of Graylog ?

@jimzz2live
Copy link
Author

Is this still works for higher versions of Graylog ?

This is still working for later versions.
It's been tested on:
4.3.x / OS 1.3.x
5.0.6 / OS 2.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants