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: add aof metrics #199

Merged
merged 1 commit into from
Nov 16, 2018
Merged

Conversation

tomplus
Copy link
Contributor

@tomplus tomplus commented Nov 15, 2018

I'd like to extend list of AOF releated metrics. A server return few metrics if aof is disabled:

aof_enabled:0
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_last_write_status:ok
aof_last_cow_size:0

but if AOF is enabled we get additional interesting metrics:

127.0.0.1:6379> CONFIG set appendonly yes
OK

--
aof_enabled:1
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:0
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_last_write_status:ok
aof_last_cow_size:200704
aof_current_size:92
aof_base_size:92
aof_pending_rewrite:0
aof_buffer_length:0
aof_rewrite_buffer_length:0
aof_pending_bio_fsync:0
aof_delayed_fsync:0

In this PR I added the metrics from the list above.

Thanks.

@codecov
Copy link

codecov bot commented Nov 15, 2018

Codecov Report

Merging #199 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #199   +/-   ##
=======================================
  Coverage   85.02%   85.02%           
=======================================
  Files           2        2           
  Lines         621      621           
=======================================
  Hits          528      528           
  Misses         67       67           
  Partials       26       26
Impacted Files Coverage Δ
exporter/redis.go 87.9% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d870a53...f99d3e9. Read the comment docs.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 88.22% when pulling f99d3e9 on tomplus:feat/aof-metrics into d870a53 on oliver006:master.

@oliver006
Copy link
Owner

Thanks for the PR - looks good!

@oliver006 oliver006 merged commit 77c2c78 into oliver006:master Nov 16, 2018
@oliver006
Copy link
Owner

Released as https://github.com/oliver006/redis_exporter/releases/tag/v0.22.1

@tomplus
Copy link
Contributor Author

tomplus commented Nov 18, 2018

Thank you for the quick release.

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.

3 participants