working on docker

This commit is contained in:
qgarnier 2017-07-12 13:11:50 +02:00
parent cfae84db4c
commit 46e08280d9
2 changed files with 7 additions and 7 deletions

View File

@ -166,7 +166,7 @@ sub set_counters {
per_second => 1,
output_template => 'Read IOPs : %.2f', output_error_template => "Read IOPs : %s",
perfdatas => [
{ label => 'read_iops', value => 'read_iops_per_second', template => '%.2f',
{ label => 'read_iops', value => 'read_io_per_second', template => '%.2f',
unit => 'iops', min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
],
}
@ -176,7 +176,7 @@ sub set_counters {
per_second => 1,
output_template => 'Write IOPs : %.2f', output_error_template => "Write IOPs : %s",
perfdatas => [
{ label => 'write_iops', value => 'write_iops_per_second', template => '%.2f',
{ label => 'write_iops', value => 'write_io_per_second', template => '%.2f',
unit => 'iops', min => 0, label_extra_instance => 1, instance_use => 'display_absolute' },
],
}
@ -293,8 +293,8 @@ sub manage_selection {
$name .= '.' . $interface;
$self->{containers_traffic}->{$name} = {
display => $name,
traffic_in => $result->{$container_id}->{Stats}->{networks}->{$interface}->{rx_bytes},
traffic_out => $result->{$container_id}->{Stats}->{networks}->{$interface}->{tx_bytes},
traffic_in => $result->{$container_id}->{Stats}->{networks}->{$interface}->{rx_bytes} * 8,
traffic_out => $result->{$container_id}->{Stats}->{networks}->{$interface}->{tx_bytes} * 8,
};
}
}

View File

@ -96,7 +96,7 @@ sub new {
$options{options}->add_options(arguments =>
{
"warning-node-status:s" => { name => 'warning_node_status', default => '' },
"critical-node-status:s" => { name => 'critical_node_status', default => '%{status} !~ /ready/ || %{manager_status} !~ /reachable/' },
"critical-node-status:s" => { name => 'critical_node_status', default => '%{status} !~ /ready/ || %{manager_status} !~ /reachable|-/' },
});
return $self;
@ -138,7 +138,7 @@ sub manage_selection {
$self->{nodes}->{$name} = {
display => $name ,
status => $entry->{Status},
manager_status => $entry->{ManagerStatus},
manager_status => defined($entry->{ManagerStatus}) ? $entry->{ManagerStatus} : '-',
};
}
}
@ -166,7 +166,7 @@ Can used special variables like: %{display}, %{status}, %{manager_status}.
=item B<--critical-node-status>
Set critical threshold for status (Default: '%{status} !~ /ready/ || %{manager_status} !~ /reachable/').
Set critical threshold for status (Default: '%{status} !~ /ready/ || %{manager_status} !~ /reachable|-/').
Can used special variables like: %{display}, %{status}, %{manager_status}.
=back