Skip to content

chore: add built-in Prometheus support #955

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

Merged
merged 9 commits into from
Jun 17, 2025
Merged

Conversation

xeniape
Copy link
Member

@xeniape xeniape commented Jun 12, 2025

Description

Part of #954

Docs added here: https://docs.stackable.tech/home/nightly/zookeeper/usage_guide/monitoring/

Integrationtests

--- PASS: kuttl (292.82s)
    --- PASS: kuttl/harness (0.00s)
        --- PASS: kuttl/harness/cluster-operation_zookeeper-latest-3.9.3_openshift-false (33.82s)
        --- PASS: kuttl/harness/znode_zookeeper-latest-3.9.3_openshift-false (28.00s)
        --- PASS: kuttl/harness/smoke_zookeeper-3.9.3_use-server-tls-false_use-client-auth-tls-false_openshift-false (72.61s)
        --- PASS: kuttl/harness/delete-rolegroup_zookeeper-3.9.3_openshift-false (68.26s)
        --- PASS: kuttl/harness/smoke_zookeeper-3.9.3_use-server-tls-true_use-client-auth-tls-true_openshift-false (136.65s)
        --- PASS: kuttl/harness/logging_zookeeper-3.9.3_openshift-false (68.04s)
        --- PASS: kuttl/harness/smoke_zookeeper-3.9.3_use-server-tls-true_use-client-auth-tls-false_openshift-false (78.36s)
        --- PASS: kuttl/harness/smoke_zookeeper-3.9.3_use-server-tls-false_use-client-auth-tls-true_openshift-false (83.90s)
PASS

Openshift

--- PASS: kuttl (136.25s)
    --- PASS: kuttl/harness (0.00s)
        --- PASS: kuttl/harness/znode_zookeeper-latest-3.9.3_openshift-true (33.86s)
        --- PASS: kuttl/harness/logging_zookeeper-3.9.3_openshift-true (41.60s)
        --- PASS: kuttl/harness/smoke_zookeeper-3.9.3_use-server-tls-true_use-client-auth-tls-true_openshift-true (101.50s)
        --- PASS: kuttl/harness/delete-rolegroup_zookeeper-3.9.3_openshift-true (34.16s)
        --- PASS: kuttl/harness/cluster-operation_zookeeper-latest-3.9.3_openshift-true (33.89s)
PASS

Release Note Snippet

Prometheus support was added using the built-in Prometheus provider in ZooKeeper. This appends another port (native-metrics). To access the metrics this port in combination with the /metrics endpoint can be used.

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes

Author

  • Changes are OpenShift compatible
  • CRD changes approved
  • CRD documentation for all fields, following the style guide.
  • Helm chart can be installed and deployed operator works
  • Integration tests passed (for non trivial changes)
  • Changes need to be "offline" compatible
  • Links to generated (nightly) docs added
  • Release note snippet added

Reviewer

  • Code contains useful comments
  • Code contains useful logging statements
  • (Integration-)Test cases added
  • Documentation added or updated. Follows the style guide.
  • Changelog updated
  • Cargo.toml only contains references to git tags (not specific commits or branches)

Acceptance

  • Feature Tracker has been updated
  • Proper release label has been added
  • Links to generated (nightly) docs added
  • Release note snippet added
  • Add type/deprecation label & add to the deprecation schedule
  • Add type/experimental label & add to the experimental features tracker

@xeniape xeniape self-assigned this Jun 12, 2025
@xeniape xeniape mentioned this pull request Jun 12, 2025
4 tasks
@xeniape xeniape moved this to Development: Waiting for Review in Stackable Engineering Jun 12, 2025
@xeniape xeniape marked this pull request as ready for review June 12, 2025 12:38
Copy link
Member

@razvan razvan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but this is worth mentioning in the docs too, especially the metric endpoints and maybe adding an assert step in a kuttl test. Maybe smoke ?

@xeniape
Copy link
Member Author

xeniape commented Jun 13, 2025

LGTM but this is worth mentioning in the docs too, especially the metric endpoints and maybe adding an assert step in a kuttl test. Maybe smoke ?

b5a685d (expanded test)

--- PASS: kuttl (170.26s)
    --- PASS: kuttl/harness (0.00s)
        --- PASS: kuttl/harness/smoke_zookeeper-3.9.3_use-server-tls-false_use-client-auth-tls-false_openshift-false (72.53s)
        --- PASS: kuttl/harness/smoke_zookeeper-3.9.3_use-server-tls-true_use-client-auth-tls-false_openshift-false (85.02s)
        --- PASS: kuttl/harness/smoke_zookeeper-3.9.3_use-server-tls-true_use-client-auth-tls-true_openshift-false (91.53s)
        --- PASS: kuttl/harness/smoke_zookeeper-3.9.3_use-server-tls-false_use-client-auth-tls-true_openshift-false (85.21s)
PASS

Working on some documentation next

Edit: Updated docs fa8597e

@xeniape xeniape requested a review from razvan June 13, 2025 09:21
@razvan
Copy link
Member

razvan commented Jun 13, 2025

The metrics port is hard coded in a couple of places:

❯ rg 9505
...
rust/operator-binary/src/zk_controller.rs
715:                port: 9505,
900:        .add_container_port("metrics", 9505)

@xeniape
Copy link
Member Author

xeniape commented Jun 16, 2025

Rerun of tests after readding jmx exporter

--- PASS: kuttl (375.29s)
    --- PASS: kuttl/harness (0.00s)
        --- PASS: kuttl/harness/znode_zookeeper-latest-3.9.3_openshift-false (49.41s)
        --- PASS: kuttl/harness/smoke_zookeeper-3.9.3_use-server-tls-false_use-client-auth-tls-true_openshift-false (117.62s)
        --- PASS: kuttl/harness/smoke_zookeeper-3.9.3_use-server-tls-true_use-client-auth-tls-true_openshift-false (169.62s)
        --- PASS: kuttl/harness/smoke_zookeeper-3.9.3_use-server-tls-false_use-client-auth-tls-false_openshift-false (80.68s)
        --- PASS: kuttl/harness/smoke_zookeeper-3.9.3_use-server-tls-true_use-client-auth-tls-false_openshift-false (94.72s)
        --- PASS: kuttl/harness/cluster-operation_zookeeper-latest-3.9.3_openshift-false (35.44s)
        --- PASS: kuttl/harness/delete-rolegroup_zookeeper-3.9.3_openshift-false (71.55s)
        --- PASS: kuttl/harness/logging_zookeeper-3.9.3_openshift-false (78.07s)
PASS

@xeniape xeniape changed the title chore: replace jmx exporter with built in Prometheus support chore: add built-in Prometheus support Jun 16, 2025
@xeniape xeniape requested a review from razvan June 16, 2025 15:20
Copy link
Member

@razvan razvan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@xeniape xeniape added this pull request to the merge queue Jun 17, 2025
Merged via the queue into main with commit bbd0854 Jun 17, 2025
17 checks passed
@xeniape xeniape deleted the chore/replace-jmx-exporter branch June 17, 2025 07:46
@xeniape xeniape added release-note Denotes a PR that will be considered when it comes time to generate release notes. scheduled-for/25.7.0 labels Jun 17, 2025
@xeniape xeniape moved this from Development: Waiting for Review to Development: Done in Stackable Engineering Jun 17, 2025
@lfrancke lfrancke moved this from Development: Done to Acceptance: In Progress in Stackable Engineering Jun 20, 2025
@xeniape xeniape mentioned this pull request Jun 20, 2025
20 tasks
@lfrancke lfrancke moved this from Acceptance: In Progress to Done in Stackable Engineering Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release/25.7.0 release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
Development

Successfully merging this pull request may close these issues.

3 participants