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

[Bug] Plugin redis doesn't get field redis_version #2982

Closed
wei-hai opened this issue Jul 5, 2017 · 5 comments · Fixed by #3054
Closed

[Bug] Plugin redis doesn't get field redis_version #2982

wei-hai opened this issue Jul 5, 2017 · 5 comments · Fixed by #3054
Milestone

Comments

@wei-hai
Copy link

wei-hai commented Jul 5, 2017

Telegraf version: 1.3.3

Telegraf v1.3.3 (git: release-1.3 46db92aad3e68af04f1732598ac89f6b9b11daf8)

Redis version: 3.0.7

Redis server v=3.0.7 sha=00000000:0 malloc=jemalloc-3.6.0 bits=64 build=49ffd7ce21c94625

Expected behavior:

Plugin redis gets redis_version

Actual behavior:

> select clients,redis_version from redis;
name: redis
time                clients redis_version
----                ------- -------------
1499214120000000000 10
1499214180000000000 10

redis.conf

[[inputs.redis]]
  servers = ["tcp://localhost:6379"]

Redis info:

telnet localhost 6379
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
INFO
$2057
# Server
redis_version:3.0.7
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:49ffd7ce21c94625
redis_mode:standalone
os:Linux 3.2.0-29-generic x86_64
arch_bits:64
multiplexing_api:epoll
gcc_version:4.6.3
process_id:5175
run_id:961003d4e75eabf5946f6fbb2f1a9cf8fe871a93
tcp_port:6379
uptime_in_seconds:73747
uptime_in_days:0
hz:10
lru_clock:6042297
config_file:/etc/redis/redis.conf
@danielnelson
Copy link
Contributor

Only the lru_clock and uptime_in_seconds fields are collected within the Server section. https://github.com/influxdata/telegraf/blob/master/plugins/inputs/redis/README.md#measurements--fields

This was added in #1689

Can you write a few sentences about why you need this field so that we will have rationale documented?

@wei-hai
Copy link
Author

wei-hai commented Jul 12, 2017

it used to have field redis_version before I upgraded redis from 2.x to 3.x, so I was wondering if it was a bug.

@danielnelson
Copy link
Contributor

No, it is excluded on purpose as you can see here: https://github.com/influxdata/telegraf/blob/master/plugins/inputs/redis/redis.go#L186

@wei-hai
Copy link
Author

wei-hai commented Jul 12, 2017

then it might be a real bug, I am pretty sure with redis 2.x telegraf fetches redis_version otherwise I wouldn't have opened this ticket. Do you mind adding redis_version back?

@danielnelson
Copy link
Contributor

Maybe with an older Telegraf version we had this field, I don't see any reason we shouldn't add it in though.

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 a pull request may close this issue.

2 participants