influxdata / influxdata/telegraf
Have redis input plugin gather CLUSTER INFO command response
- Dominant language
- Go
- Stars
- 17.8k
- Forks
- 5.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 161
Description
### Use Case
The redis input plugin captures the redis-cli INFO command response but is missing information about the current state of the cluster in the case of an instance where cluster_enabled is true. The [CLUSTER INFO](https://redis.io/docs/latest/commands/cluster-info/) command produces useful fields in the same format as the INFO command that can close this gap. In my current set up, we currently use a python script called through the exec input plugin to capture these cluster metrics and would like to enhance the redis plugin itself to produce a redis_cluster_info measurement.
### Expected behavior
The redis plugin should produce this redis_cluster_info measurement only when the redis instance has cluster_enabled set to 1
```
> redis_cluster_info,host=mbp-016682,port=7000,server=127.0.0.1 cluster_current_epoch=6i,cluster_known_nodes=6i,cluster_my_epoch=1i,cluster_size=3i,cluster_slots_assigned=16384i,cluster_slots_fail=0i,cluster_slots_ok=16384i,cluster_slots_pfail=0i,cluster_state="ok",cluster_stats_messages_meet_received="5",cluster_stats_messages_ping_received="300",cluster_stats_messages_ping_sent="285",cluster_stats_messages_pong_received="285",cluster_stats_messages_pong_sent="305",cluster_stats_messages_received=590i,cluster_stats_messages_sent=590i,total_cluster_links_buffer_limit_exceeded=0i 1752272069000000000
```
### Actual behavior
The redis plugin current does not capture measurements about the current state of the cluster.
### Additional info
_No response_
Contributor guide
Research direction
Start at the redis input plugin's existing INFO response collection and compare it with the CLUSTER INFO command documented in the issue. Done means emitting a redis_cluster_info measurement only when cluster_enabled is 1, with the cluster fields shown in the example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, redis
- Domain
- observability-sre
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100