-
Notifications
You must be signed in to change notification settings - Fork 933
Add Sentinel metrics to improve failover detection and monitoring capabilities #1078
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
base: master
Are you sure you want to change the base?
Conversation
|
Thanks for the PR! |
exporter/exporter.go
Outdated
| "sentinel_master_setting_failover_timeout": {txt: "Show the current failover-timeout config for each master", lbls: []string{"master_name", "master_address"}}, | ||
| "sentinel_master_setting_parallel_syncs": {txt: "Show the current parallel-syncs config for each master", lbls: []string{"master_name", "master_address"}}, | ||
| "sentinel_master_config_epoch": {txt: "The configuration epoch of the master (increments on each failover)", lbls: []string{"master_name", "master_address"}}, | ||
| "sentinel_master_last_ok_ping_reply_ms": {txt: "Elapsed time in milliseconds since the last successful ping reply from the master", lbls: []string{"master_name", "master_address"}}, |
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.
sentinel_master_last_ok_ping_reply_ms
base unit should be seconds - can you convert?
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.
@oliver006
I have a question, doesn't the existing sentinel_master_setting_down_after_milliseconds use milliseconds instead of seconds?
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, they both should probably use _seconds
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.
For now I only converted the units of the metrics I added
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1078 +/- ##
==========================================
+ Coverage 81.85% 81.90% +0.04%
==========================================
Files 20 20
Lines 2657 2663 +6
==========================================
+ Hits 2175 2181 +6
Misses 362 362
Partials 120 120 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Pull Request Test Coverage Report for Build 20811912693Details
💛 - Coveralls |
New Metrics
sentinel_master_config_epoch: The configuration epoch of the master (increments on each failover)
SENTINEL MASTERScommand responsemaster_name,master_addresssentinel_master_last_ok_ping_reply_ms: Elapsed time in milliseconds since the last successful ping reply
SENTINEL MASTERScommand responsemaster_name,master_addressChanges
config-epochfield extraction inextractSentinelMetrics()functionlast-ok-ping-replyfield extraction inextractSentinelMetrics()functionexporter.gocloses: #1077