Skip to content
Snippets Groups Projects
Commit 83f575fc authored by Daniel Nelson's avatar Daniel Nelson Committed by GitHub
Browse files

Add redis_version field to redis input (#3054)

parent ffd1f25b
No related branches found
No related tags found
No related merge requests found
...@@ -30,6 +30,7 @@ Additionally the plugin also calculates the hit/miss ratio (keyspace\_hitrate) a ...@@ -30,6 +30,7 @@ Additionally the plugin also calculates the hit/miss ratio (keyspace\_hitrate) a
**Server** **Server**
- uptime(int, seconds) - uptime(int, seconds)
- lru_clock(int, number) - lru_clock(int, number)
- redis_version(string)
**Clients** **Clients**
- clients(int, number) - clients(int, number)
......
...@@ -184,7 +184,7 @@ func gatherInfoOutput( ...@@ -184,7 +184,7 @@ func gatherInfoOutput(
name := string(parts[0]) name := string(parts[0])
if section == "Server" { if section == "Server" {
if name != "lru_clock" && name != "uptime_in_seconds" { if name != "lru_clock" && name != "uptime_in_seconds" && name != "redis_version" {
continue continue
} }
} }
......
...@@ -91,6 +91,7 @@ func TestRedis_ParseMetrics(t *testing.T) { ...@@ -91,6 +91,7 @@ func TestRedis_ParseMetrics(t *testing.T) {
"used_cpu_sys_children": float64(0.00), "used_cpu_sys_children": float64(0.00),
"used_cpu_user_children": float64(0.00), "used_cpu_user_children": float64(0.00),
"keyspace_hitrate": float64(0.50), "keyspace_hitrate": float64(0.50),
"redis_version": "2.8.9",
} }
// We have to test rdb_last_save_time_offset manually because the value is based on the time when gathered // We have to test rdb_last_save_time_offset manually because the value is based on the time when gathered
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment