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

feat: export client-output-buffer-limit #933

Conversation

jdheyburn
Copy link
Contributor

@jdheyburn jdheyburn commented Aug 6, 2024

Fixes #932

Exports configured client-output-buffer-limit as a metric. Combined with mem_total_replication_buffers it will allow you to alert on when replication buffers are reaching the limit.

(mem_total_replication_buffers / config_client_output_buffer_limit_bytes{class="slave", limit="hard"}) > 0.7

Happy for suggestions on alternative metric name and labelling tactic.

@jdheyburn jdheyburn force-pushed the jdheyburn/export-client-output-buffer-limit-metrics branch from b3d7146 to 92ee9a4 Compare August 7, 2024 14:57
@coveralls
Copy link

coveralls commented Aug 7, 2024

Pull Request Test Coverage Report for Build 391

Details

  • 16 of 16 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 84.02%

Totals Coverage Status
Change from base Build 387: 0.1%
Covered Lines: 1998
Relevant Lines: 2378

💛 - Coveralls

Copy link
Owner

@oliver006 oliver006 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR - looks good!

@oliver006 oliver006 merged commit 5aeb972 into oliver006:master Aug 9, 2024
4 checks passed
@nantiferov
Copy link
Contributor

@jdheyburn thank you for PR, I added mem_total_replication_buffers in 1.60, but haven't thought about collecting buffer limits.

P.S. Tested it quickly now, I think query for alert should look like this because of labels mismatch on left and right of /:

redis_mem_total_replication_buffers_bytes / sum(redis_config_client_output_buffer_limit_bytes{class="slave", limit="hard"}) without (class, limit)

@nantiferov
Copy link
Contributor

nantiferov commented Sep 9, 2024

Btw, @oliver006 I had similar case with sysctl values and node_exporter and they have similar functionality to config metrics, but it's possible to put numeric values into metric value and also generate metric name based on value labels.
image

https://github.com/prometheus/node_exporter/tree/master?tab=readme-ov-file#sysctl-collector

I think you might consider this as an option if someone will have time to improve config collector.

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.

Export client-output-buffer-limits as a metric
4 participants