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

Add a monitor for the OpenMetrics endpoint #584

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

willmostly
Copy link
Contributor

Add a monitor for the OpenMetrics endpoint. This populates the running and queued query metrics for active load balancing, and allows defining health using minimum and maximum values for arbitrary metrics.

Description

Add a monitor for the /metrics endpoint. These metrics are equivalent to those under v1/jmx, however some organizations choose to standardize on OpenMetrics instead.

A custom definition of backend health can be configured through the metricMinimumValues and metricMaximumValues settings in monitorConfiguration. Each of these takes metricName, float pairs. If the returned metric is below the min or greater than the max, the backend is considered unhealthy.

Additional context and related issues

Release notes

( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
(x ) Release notes are required, with the following suggested text:

* Add OpenMetrics health monitor with customizable health definition

@cla-bot cla-bot bot added the cla-signed label Jan 6, 2025
@willmostly willmostly changed the title Add a monitor for the OpenMetrics endpoint. This populates the runnin… Add a monitor for the OpenMetrics endpoint Jan 6, 2025
@willmostly willmostly requested a review from vishalya January 7, 2025 14:37
Copy link
Member

@oneonestar oneonestar left a comment

Choose a reason for hiding this comment

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

Just a quick skim.

@willmostly willmostly force-pushed the will/metrics-monitor branch 3 times, most recently from 43465b3 to d9e5068 Compare January 9, 2025 02:06
@willmostly willmostly requested a review from oneonestar January 9, 2025 02:07
@willmostly willmostly force-pushed the will/metrics-monitor branch 3 times, most recently from 247e51b to 7370600 Compare January 15, 2025 20:17
Copy link
Member

@vishalya vishalya left a comment

Choose a reason for hiding this comment

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

I left a few minor comments, other than that it's good to go.

@willmostly willmostly force-pushed the will/metrics-monitor branch from 7370600 to 23f46c6 Compare January 21, 2025 23:09
@willmostly willmostly requested review from ebyhr and vishalya January 21, 2025 23:16
@mosabua
Copy link
Member

mosabua commented Jan 28, 2025

Ping @willmostly .. i think this sits with you to rebase and then @vishalya and @oneonestar and @ebyhr to potentially chime in

Copy link
Member

@vishalya vishalya left a comment

Choose a reason for hiding this comment

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

All good!

@willmostly willmostly force-pushed the will/metrics-monitor branch 2 times, most recently from 41eccba to f0ae06b Compare January 30, 2025 15:03
@willmostly willmostly requested a review from ebyhr January 30, 2025 15:40
@willmostly
Copy link
Contributor Author

@ebyhr all comments have been addressed, could you ptal?

This populates the running and queued query metrics for active load balancing, and
allows defining health using minimum and maximum values for arbitrary metrics

Co-authored-by: Yuya Ebihara <[email protected]>
@willmostly willmostly force-pushed the will/metrics-monitor branch from f0ae06b to 1d33af2 Compare February 5, 2025 17:39
@ebyhr ebyhr removed their request for review February 5, 2025 23:24
@willmostly willmostly merged commit bd2f513 into trinodb:main Feb 7, 2025
2 checks passed
@github-actions github-actions bot added this to the 14 milestone Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

5 participants