Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in_elasticsearch: provide version parameter for configurable server version #7579

Merged
merged 2 commits into from Jul 3, 2023

Conversation

cosmo0920
Copy link
Contributor

@cosmo0920 cosmo0920 commented Jun 16, 2023

Currently, in_elasticsearch just returns elasticasearch server version as 8.0.0.
Some of elasticsearch/opensearch clients wants to newer version of its server.
This PR provides configurable option for elasticsearch server version.


Enter [N/A] in the box, if an item is not applicable to your change.

Testing
Before we can approve your change; please submit the following in a comment:

  • Example configuration file for the change
$ bin/fluent-bit -i elasticsearch -p port=9880 -pversion=8.1.2 -o stdout

Another terminal

$ curl localhost:9880/
{"version":{"number":"8.1.2","build_flavor":"Fluent Bit OSS"},"tagline":"Fluent Bit's Bulk API compatible endpoint"}
  • Debug log output from testing the change
  • Attached Valgrind output that shows no leaks or memory corruption was found
==189199== 
==189199== HEAP SUMMARY:
==189199==     in use at exit: 95,170 bytes in 702 blocks
==189199==   total heap usage: 2,842 allocs, 2,140 frees, 1,548,728 bytes allocated
==189199== 
==189199== LEAK SUMMARY:
==189199==    definitely lost: 0 bytes in 0 blocks
==189199==    indirectly lost: 0 bytes in 0 blocks
==189199==      possibly lost: 0 bytes in 0 blocks
==189199==    still reachable: 95,170 bytes in 702 blocks
==189199==         suppressed: 0 bytes in 0 blocks
==189199== Reachable blocks (those to which a pointer was found) are not shown.
==189199== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==189199== 
==189199== For lists of detected and suppressed errors, rerun with: -s
==189199== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

  • Run local packaging test showing all targets (including any new ones) build.
  • Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

  • Documentation required for this feature

fluent/fluent-bit-docs#1135

Backporting

  • Backport to latest stable release.

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

For some ES client, it needs to unify the versions between server and
client.
The default version of that parameter is still 8.0.0.

Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
@cosmo0920 cosmo0920 temporarily deployed to pr June 16, 2023 09:20 — with GitHub Actions Inactive
@cosmo0920 cosmo0920 temporarily deployed to pr June 16, 2023 09:20 — with GitHub Actions Inactive
@cosmo0920 cosmo0920 temporarily deployed to pr June 16, 2023 09:21 — with GitHub Actions Inactive
@cosmo0920 cosmo0920 changed the title in_elasticsearch: handle version param in elasticsearch in_elasticsearch: handle version parameter in elasticsearch Jun 16, 2023
@cosmo0920 cosmo0920 changed the title in_elasticsearch: handle version parameter in elasticsearch in_elasticsearch: provide version parameter for configurable server version Jun 16, 2023
@cosmo0920 cosmo0920 temporarily deployed to pr June 16, 2023 09:43 — with GitHub Actions Inactive
@edsiper edsiper merged commit b3b6aaa into master Jul 3, 2023
45 of 48 checks passed
@edsiper edsiper deleted the cosmo0920-handle-version-param-in_elasticsearch branch July 3, 2023 01:20
leonardo-albertovich pushed a commit that referenced this pull request Jul 17, 2023
…ersion (#7579)

* in_elasticsearch: Add version parameter support

For some ES client, it needs to unify the versions between server and
client.
The default version of that parameter is still 8.0.0.

Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>

* in_elasticsearch: test: Re-diversified for using port numbers

Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>

---------

Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants