-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
ZooKeeper module: Adapt to ZooKeeper 3.6+ mntr
response fields' changes.
#30068
ZooKeeper module: Adapt to ZooKeeper 3.6+ mntr
response fields' changes.
#30068
Conversation
This pull request does not have a backport label. Could you fix it @pfcoperez? 🙏
NOTE: |
Pinging @elastic/siem (Team:SIEM) |
Pinging @elastic/integrations (Team:Integrations) |
I assume this will need backport to 8.0 and 7.17, not 7.12? |
7.12 too so Cloud can do an progressive upgrade |
All right I'll have to generate a switch in the code flow depending on the zookeeper version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
7.12 too so Cloud can do an progressive upgrade
If backported to 7.12, it should be backported first to all the branches in between (7.13, 7.14...), to avoid someone using the fixed 7.12 version finding the problem again when upgrading to one of the others.
In any case remember that very probably there is not going to be any other 7.12 release, so this would only fix the issue for custom builds.
There will not be any future 7.12 release. Even if we backport it, it never becomes available as a release. To get the change, Cloud has to go to 7.16, likely 7.17. @pfcoperez Is this an issue? |
I think this might be an issue for ECE, would it be possible to do a minor official release? |
I'd like to include a run of the ITs with ZK 3.7 (in addition to the current 3.5). Would you mind pointing me into the steps to do it? 🙇 |
Here is the compose file that spins up the environment: https://github.com/elastic/beats/blob/master/metricbeat/module/zookeeper/docker-compose.yml and the docker file: https://github.com/elastic/beats/blob/master/metricbeat/module/zookeeper/_meta/Dockerfile Interesting enough, it already has a variable for the version. @jsoriano I remember some services we tests multiple versions, do you have an example as reference? |
Yep, we have support in the python tests. Take a look for example to the mysql or redis modules. You need these things:
You can then run the python tests for this module with |
@sayden As a follow up, we should also update the compatibility of the zookeeper package: https://github.com/elastic/integrations/tree/main/packages/zookeeper |
Thank you @jsoriano ! I'll try to do it. I'll get back to you if I don't manage to. |
@jsoriano Thanks to your indications, in 8c9c62cbbf1f39d766b68349454d31ffb6d831eb, I've added the validation against ZooKeeper 3.6 and 3.7, in addition to the current 3.5. 📝 Note that I've changed the source image for ZooKeeper to the official ones: https://hub.docker.com/_/zookeeper Is that OK? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All right! Thank you very much for the help!
b8bee51
to
d034056
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding unit tests! I have added some suggestions there, and I will leave the final word to @sayden 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all the effort!
…r` response fields' changes. (#30360) (cherry picked from commit 3a311f1) Co-authored-by: Pablo Francisco Pérez Hidalgo <[email protected]> Co-authored-by: Jaime Soriano Pastor <[email protected]>
…nges. (#30068) (#30359) (cherry picked from commit 3a311f1) Co-authored-by: Pablo Francisco Pérez Hidalgo <[email protected]> Co-authored-by: Jaime Soriano Pastor <[email protected]>
…tr` response fields' changes. (#30358) (cherry picked from commit 3a311f1) Co-authored-by: Pablo Francisco Pérez Hidalgo <[email protected]> Co-authored-by: Jaime Soriano Pastor <[email protected]>
…-29710 * '8.1' of github.com:elastic/beats: (51 commits) refactor pushDockerImages (#30414) (#30624) ci: add windows-2022 in the extended meta-stage (#30528) (#30630) Curate k8s testing versions to only keep the actively maintained (#30619) (#30625) [8.1](backport #30355) Add Beats upgrade docs for 8.0 (#30612) Remove references to gcp from the Functionbeat docs (#30579) (#30609) x-pack/auditbeat/module/system/socket: defend against exec with zero arguments (#30586) (#30597) [MySQL Enterprise] Adding default paths values to manifest.yml (#30598) (#30604) metricbeat - fix elasticsearch and kibana integration tests failures in 8.0 (#30566) (#30594) Install gawk as a replacement for mawk in Docker containers. (#30452) (#30465) [Filebeat] Remove RecordedFuture dataset from Threat Intel module (#30564) (#30568) Adjust the documentation of `backoff` options in filestream input (#30552) (#30557) packetbeat/beater: help the GC clean up the Npcap installer if it's not used (#30513) (#30546) Osquerybeat: Add install verification for osquerybeat (#30388) (#30404) Update docker/distribution to 2.8.0 (#30462) (#30540) Add `parsers` examples to `filestream` reference configuration (#30529) (#30537) [8.1](backport #30068) ZooKeeper module: Adapt to ZooKeeper 3.6+ `mntr` response fields' changes. (#30360) [8.1](backport #30512) Switch skip to use `CI` (#30525) Forward-port 8.0.1 changelog to 8.1 (#30517) packetbeat/beater: don't attempt to install npcap when already installed (#30509) (#30511) Add drop and explicit tests to avoid duplicate ingest of elasticsearch logs (#30440) (#30488) ...
What does this PR do?
This PR tries to tackle the compatibility issues that arise from trying to use the ZooKeeper metrics beats module with recent versions of this service: 3.6 and 3.7 majors.
Since ZooKeeper 3.6, some response to
mntr
4lw commands requests have changed their implicit type fromintegers
tofloats
. Fields likezk_avg_latency
,zk_min_latency
andzk_max_latency
are some examples of this.Additionally,
zk_followers
has been replaced byzk_learners
.This PR adds compatibility with these changes while not breaking pre ZK 3.6 ones.
Why is it important?
It is key for Elastic cloud operations to have these changes in beats. This can surely be extrapolated to other users which might wonder why certain fields are not longer ingested after having upgraded to any of the most recent ZooKeeper majors.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
How to test this PR locally
cd metricbeat MODULE=zookeeper mage -v pythonIntegTest
Related issues
Closes: #30066
Use cases
Screenshots
Logs