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

sentinel_master_setting_ckquorum metric is incorrect? #930

Open
jdheyburn opened this issue Aug 6, 2024 · 1 comment
Open

sentinel_master_setting_ckquorum metric is incorrect? #930

jdheyburn opened this issue Aug 6, 2024 · 1 comment
Assignees
Labels

Comments

@jdheyburn
Copy link
Contributor

jdheyburn commented Aug 6, 2024

Describe the problem

I recently upgraded our nonprod exporters from 1.55.0 to 1.62.0 and wanted to verify the new metrics that are being exported.

It seems that sentinel_master_setting_ckquorum is always reporting 0 because the field the code is scraping from does not exist. Link to line.

masterCkquorum, _ := strconv.ParseFloat(masterDetailMap["ckquorum"], 64)

There is no ckquorum field from the output of redis-cli -p 26379 sentinel masters - there is however a quorum field.

/data $ redis-cli -p 26379 sentinel masters | grep ckquorum
/data $ redis-cli -p 26379 sentinel masters | grep quorum -A1
quorum
2

I think this is a typo in the code from when it was added in below PR. In the PR the author even quotes as the field being quorum over ckquorum.

What version of redis_exporter are you running?
Please run redis_exporter --version if you're not sure what version you're running.
[ ] 0.3x.x
[x] 1.x.x

Running the exporter
N/A

N/A

Expected behavior

I believe the code should be:

masterCkquorum, _ := strconv.ParseFloat(masterDetailMap["quorum"], 64)

Screenshots
N/A

Additional context
It would then make sense for the metric exported to instead be sentinel_master_setting_quorum, but this may cause a breaking change. But then if it was never reporting correctly in the first place then it may not be breaking.

@oliver006
Copy link
Owner

oliver006 commented Aug 6, 2024

Not really familiar with the sentinel stuff (I don't use it) but sounds like you're right and this should be quorum instead of ckquorum

I wouldn't worry about the breaking change as it's broken right now and this will fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants