Skip to content

Commit

Permalink
Merge pull request #159 from fajpunk/maxclients
Browse files Browse the repository at this point in the history
Add `maxclients` to config metrics
  • Loading branch information
oliver006 authored May 10, 2018
2 parents ee804e7 + 83b9ba8 commit 5643633
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion exporter/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,8 @@ func extractConfigMetrics(config []string, addr string, alias string, scrapes ch

// todo: we can add more configs to this map if there's interest
if !map[string]bool{
"maxmemory": true,
"maxmemory": true,
"maxclients": true,
}[strKey] {
continue
}
Expand Down
1 change: 1 addition & 0 deletions exporter/redis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ func TestExporterMetrics(t *testing.T) {
"used_cpu_sys",
"loading_dump_file", // testing renames
"config_maxmemory", // testing config extraction
"config_maxclients", // testing config extraction
}

for _, k := range wantKeys {
Expand Down

0 comments on commit 5643633

Please sign in to comment.