improve redis restapi

This commit is contained in:
Colin GAGNAIRE 2017-12-28 15:41:40 +01:00
parent 597a90f06d
commit c5eab21637
2 changed files with 3 additions and 3 deletions

View File

@ -507,7 +507,7 @@ sub manage_selection {
memory_size => $result2->{$database}->{memory_size},
mem_frag_ratio => $result->{$database}->{mem_frag_ratio},
conns => $result->{$database}->{conns},
total_req => $result->{$database}->{total_req},
total_req => defined($result->{$shard}->{total_req}) ? $result->{$shard}->{total_req} : $result->{$shard}->{instantaneous_ops_per_sec},
total_res => $result->{$database}->{total_res},
total_hits => $result->{$database}->{read_hits} + $result->{$database}->{write_hits},
total_misses => $result->{$database}->{read_misses} + $result->{$database}->{write_misses},

View File

@ -244,7 +244,7 @@ sub set_counters {
key_values => [ { name => 'no_of_expires' }, { name => 'display' } ],
output_template => 'Volatile keys: %s',
perfdatas => [
{ label => 'volatile-keys', value => 'no_of_expires_absolute', template => '%s',
{ label => 'volatile_keys', value => 'no_of_expires_absolute', template => '%s',
min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
],
}
@ -383,7 +383,7 @@ sub manage_selection {
fork_cpu_system => $result->{$shard}->{fork_cpu_system} * 100,
connected_clients => $result->{$shard}->{connected_clients},
blocked_clients => $result->{$shard}->{blocked_clients},
total_req => $result->{$shard}->{total_req},
total_req => defined($result->{$shard}->{total_req}) ? $result->{$shard}->{total_req} : $result->{$shard}->{instantaneous_ops_per_sec},
no_of_keys => $result->{$shard}->{no_of_keys},
no_of_expires => $result->{$shard}->{no_of_expires},
evicted_objects => $result->{$shard}->{evicted_objects},