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

REDIS_EXPORTER_CHECK_KEYS is not honored it seems; or documentation lacks details to verify #964

Open
notjames opened this issue Nov 7, 2024 · 0 comments
Assignees
Labels

Comments

@notjames
Copy link

notjames commented Nov 7, 2024

Describe the problem
We're running the exporter in k8s. I've invoked the exported using env vars for REDIS_EXPORTER_CHECK_KEYS with:

    spec:
      containers:
        - env:
            - name: REDIS_EXPORTER_DEBUG
              value: "true"
            - name: REDIS_ADDR
              value: redis://redis-server:6379
            - name: REDIS_EXPORTER_CHECK_KEYS
              value: db0=redisson\*
            - name: REDIS_EXPORTER_CHECK_KEYS_BATCH_SIZE
              value: "1000"

with logging enabled, the following is seen in the logs:

prometheus-redis-exporter time="2024-11-07T00:23:52-05:00" level=debug msg="keys: []exporter.dbKeyPair{exporter.dbKeyPair{db:\"0\", key:\"redisson\\\\*\"}}"
prometheus-redis-exporter time="2024-11-07T00:23:52-05:00" level=debug msg="parseKeyArg(): Got empty key arguments, parsing skipped"
prometheus-redis-exporter time="2024-11-07T00:23:52-05:00" level=debug msg="e.singleKeys: []exporter.dbKeyPair(nil)"
prometheus-redis-exporter time="2024-11-07T00:23:52-05:00" level=debug msg="e.keys: []exporter.dbKeyPair{exporter.dbKeyPair{db:\"0\", key:\"redisson\\\\*\"}}"
prometheus-redis-exporter time="2024-11-07T00:23:52-05:00" level=debug msg="c.Do() - running command: SELECT [0]"
prometheus-redis-exporter time="2024-11-07T00:23:52-05:00" level=debug msg="c.Do() - done"
prometheus-redis-exporter time="2024-11-07T00:23:52-05:00" level=debug msg="c.Do() - running command: SCAN [%!s(int=0) MATCH redisson\\* COUNT %!s(int64=1000)]"
prometheus-redis-exporter time="2024-11-07T00:23:52-05:00" level=debug msg="c.Do() - done"
prometheus-redis-exporter time="2024-11-07T00:23:52-05:00" level=debug msg="allKeys: []exporter.dbKeyPair{}"
prometheus-redis-exporter time="2024-11-07T00:23:52-05:00" level=debug msg="c.Do() - running command: SLOWLOG [LEN]"
prometheus-redis-exporter time="2024-11-07T00:23:52-05:00" level=debug msg="c.Do() - done"
prometheus-redis-exporter time="2024-11-07T00:23:52-05:00" level=debug msg="c.Do() - running command: SLOWLOG [GET 1]"
prometheus-redis-exporter time="2024-11-07T00:23:52-05:00" level=debug msg="c.Do() - done"
prometheus-redis-exporter time="2024-11-07T00:23:52-05:00" level=debug msg="parseKeyArg(): Got empty key arguments, parsing skipped"
prometheus-redis-exporter time="2024-11-07T00:23:52-05:00" level=debug msg="parseKeyArg(): Got empty key arguments, parsing skipped"
prometheus-redis-exporter time="2024-11-07T00:23:52-05:00" level=debug msg="allStreams: []exporter.dbKeyPair{}"
prometheus-redis-exporter time="2024-11-07T00:23:52-05:00" level=debug msg="parseKeyArg(): Got empty key arguments, parsing skipped"
prometheus-redis-exporter time="2024-11-07T00:23:52-05:00" level=debug msg="scrapeRedisHost() done"

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

Running the exporter
It's being run via your helm chart with default values. I'm currently testing this by manually editing the deployment and adding the environment variables in the running deployment.

Also getting all of these "parseKeyArg(): Got empty key arguments, parsing skipped" is mildly misleading or at least very confusing.

Expected behavior
There is no redis_keys metric. Moreover, the logs may be indicating 0 finds, while there are ~7000 keys in the current db matching the pattern I've specified. I was expecting something propagated to redis_keys (or some key metric that didn't already exist before this change).

I'll continue reading through your code to see if I notice anything.

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