add unit to some perfdatas

This commit is contained in:
Lotfi zaouche 2020-05-26 16:11:10 +00:00
parent 4233b497ef
commit bcf4e19365
5 changed files with 7 additions and 7 deletions

View File

@ -63,7 +63,7 @@ sub set_counters {
key_values => [ { name => 'disk_used' } ],
output_template => "Disk used: %d ",
perfdatas => [
{ label => 'disk_used', value => 'disk_used', template => '%d', min => 0 }
{ label => 'disk_used', value => 'disk_used', template => '%d', unit => 'o', min => 0 }
],
}
},
@ -71,7 +71,7 @@ sub set_counters {
key_values => [ { name => 'disk_usage' } ],
output_template => "Disk usage: %d %%",
perfdatas => [
{ label => 'disk_usage', value => 'disk_usage', template => '%d', min => 0 }
{ label => 'disk_usage', value => 'disk_usage', template => '%.2f', unit => '%', min => 0 }
],
}
},

View File

@ -80,7 +80,7 @@ sub set_counters {
sub prefix_output_balances {
my ($self, %options) = @_;
return "*Balance* '" . $options{instance_value}->{display} . "' ";
return "Balance '" . $options{instance_value}->{display} . "' ";
}
sub prefix_output_events {

View File

@ -36,7 +36,7 @@ sub new {
'stats' => 'blockchain::parity::ethpoller::mode::stats',
'disk' => 'blockchain::parity::ethpoller::mode::disk',
'tracking' => 'blockchain::parity::ethpoller::mode::tracking',
'prct' => 'blockchain::parity::ethpoller::mode::prct'
# 'prct' => 'blockchain::parity::ethpoller::mode::prct'
);
$self->{custom_modes}{api} = 'blockchain::parity::ethpoller::custom::api';
return $self;

View File

@ -97,7 +97,7 @@ sub set_counters {
key_values => [ { name => 'block_usage' } ],
output_template => "Block usage: %d %%",
perfdatas => [
{ label => 'block_usage', value => 'block_usage', template => '%d', min => 0 }
{ label => 'block_usage', value => 'block_usage', template => '%.2f', unit => '%', min => 0 }
],
}
},

View File

@ -56,7 +56,7 @@ sub set_counters {
key_values => [ { name => 'mempool_usage' } ],
output_template => "Mempool usage: %d %% ",
perfdatas => [
{ label => 'mempool_usage', value => 'mempool_usage', template => '%d', min => 0 }
{ label => 'mempool_usage', value => 'mempool_usage', template => '%.2f', unit => '%', min => 0 }
],
}
},
@ -83,7 +83,7 @@ sub set_counters {
key_values => [ { name => 'peers_usage' } ],
output_template => "Peers usage: %d %% ",
perfdatas => [
{ label => 'peers_usage', value => 'peers_usage', template => '%d', min => 0 }
{ label => 'peers_usage', value => 'peers_usage', template => '%.2f', unit => '%', min => 0 }
],
}
},