From bcf4e19365707de7922dc871b387a9c0c768a2c0 Mon Sep 17 00:00:00 2001 From: Lotfi zaouche Date: Tue, 26 May 2020 16:11:10 +0000 Subject: [PATCH] add unit to some perfdatas --- blockchain/parity/ethpoller/mode/disk.pm | 4 ++-- blockchain/parity/ethpoller/mode/tracking.pm | 2 +- blockchain/parity/ethpoller/plugin.pm | 2 +- blockchain/parity/restapi/mode/eth.pm | 2 +- blockchain/parity/restapi/mode/parity.pm | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/blockchain/parity/ethpoller/mode/disk.pm b/blockchain/parity/ethpoller/mode/disk.pm index 12a953d49..092ef0e41 100644 --- a/blockchain/parity/ethpoller/mode/disk.pm +++ b/blockchain/parity/ethpoller/mode/disk.pm @@ -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 } ], } }, diff --git a/blockchain/parity/ethpoller/mode/tracking.pm b/blockchain/parity/ethpoller/mode/tracking.pm index 0fa2dfc51..4d5309e9e 100644 --- a/blockchain/parity/ethpoller/mode/tracking.pm +++ b/blockchain/parity/ethpoller/mode/tracking.pm @@ -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 { diff --git a/blockchain/parity/ethpoller/plugin.pm b/blockchain/parity/ethpoller/plugin.pm index d28ab211d..ec1d68a16 100644 --- a/blockchain/parity/ethpoller/plugin.pm +++ b/blockchain/parity/ethpoller/plugin.pm @@ -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; diff --git a/blockchain/parity/restapi/mode/eth.pm b/blockchain/parity/restapi/mode/eth.pm index 5dba7d513..923c2f916 100644 --- a/blockchain/parity/restapi/mode/eth.pm +++ b/blockchain/parity/restapi/mode/eth.pm @@ -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 } ], } }, diff --git a/blockchain/parity/restapi/mode/parity.pm b/blockchain/parity/restapi/mode/parity.pm index 3c75c70de..1e9206359 100644 --- a/blockchain/parity/restapi/mode/parity.pm +++ b/blockchain/parity/restapi/mode/parity.pm @@ -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 } ], } },