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

Export replication lag in prometheus metrics #646

Merged
merged 5 commits into from
Apr 2, 2024

Conversation

kickster97
Copy link
Member

WHAT is this pull request doing?

exports the amount of followers and the lag for each follower in prometheus metrics

HOW can this pull request be tested?

start lavinmq with a couple of followers and run laivnmqperf throughput and check http://localhost:15672/metrics

type: "gauge",
help: "Amount of follower nodes connected"})
@[email protected]_with_index do |f, i|
writer.write({name: "follower_#{i}_lag",
Copy link
Member

Choose a reason for hiding this comment

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

Could we write something more specific about the follower here so they can be identified? "follower_1" doesn't really mean anything IMO, so would be better with hostname or IP or something.

Copy link
Member Author

Choose a reason for hiding this comment

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

Could we write something more specific about the follower here so they can be identified? "follower_1" doesn't really mean anything IMO, so would be better with hostname or IP or something.

I added remote ip as an id on the name. Might get a little long, and harder to read?

# TYPE lavinmq_total_connected_followers gauge
# HELP lavinmq_total_connected_followers Amount of follower nodes connected
lavinmq_total_connected_followers 2
# TYPE lavinmq_follower_lag_127.0.0.1:5679 gauge
# HELP lavinmq_follower_lag_127.0.0.1:5679 Lag for follower on address: 127.0.0.1:5679
lavinmq_follower_lag_127.0.0.1:5679 0
# TYPE lavinmq_follower_lag_127.0.0.1:5679 gauge
# HELP lavinmq_follower_lag_127.0.0.1:5679 Lag for follower on address: 127.0.0.1:5679
lavinmq_follower_lag_127.0.0.1:5679 0

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, maybe we can revert the name to just lavinmq_follower_lag_1 and keep the help text
Lag for follower on address: #{[email protected]_address)? That should be enough to identify it?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes sounds good!

Copy link
Member

@viktorerlingsson viktorerlingsson left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@kickster97 kickster97 merged commit 1bb408b into main Apr 2, 2024
26 checks passed
@kickster97 kickster97 deleted the follower_lag_prometheus_metrics branch April 2, 2024 13:23
viktorerlingsson pushed a commit that referenced this pull request Sep 20, 2024
* Export replication lag in prometheus metrics
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