oliver006 / redis_exporter

Prometheus Exporter for ValKey & Redis Metrics. Supports ValKey and Redis 2.x, 3.x, 4.x, 5.x, 6.x, and 7.x
https://github.com/oliver006/redis_exporter
MIT License
3.04k stars 860 forks source link

check redis config values, and skip non string replies. #810

Closed sergelogvinov closed 1 year ago

sergelogvinov commented 1 year ago

Hello,

I've got the error - Redis CONFIG err: redigo: unexpected element type for Strings, got type []interface {} It can be noticed only in -debug mode.

KeyDB returns tls-allowlist array value in CONFIG GET request. And redis_exporter silently does not set any redis_config_$key metrics, which affect the prometheus alerts (they do not work).

Can we skip non-string keys in config-metrics?

Thank you.

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 147


Changes Missing Coverage Covered Lines Changed/Added Lines %
exporter/exporter.go 8 10 80.0%
<!-- Total: 8 10 80.0% -->
Totals Coverage Status
Change from base Build 144: -0.08%
Covered Lines: 1920
Relevant Lines: 2075

💛 - Coveralls
sergelogvinov commented 1 year ago

This looks good - thanks for the PR. Do you think there's value in logging the errors in extractConfigMetrics() ? If not then this is good to go.

Good idea, i've added the error log.