-
Notifications
You must be signed in to change notification settings - Fork 33
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
Conversation
type: "gauge", | ||
help: "Amount of follower nodes connected"}) | ||
@[email protected]_with_index do |f, i| | ||
writer.write({name: "follower_#{i}_lag", |
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.
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.
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.
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
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.
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?
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.
Yes sounds good!
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 👍
* Export replication lag in prometheus metrics
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 checkhttp://localhost:15672/metrics