From 62435b3ee7c74c10b1ca27b285f888b32d6587d9 Mon Sep 17 00:00:00 2001 From: qgarnier Date: Wed, 5 Oct 2022 13:36:13 +0200 Subject: [PATCH] (plugin) storage::hp::3par::ssh - mode capacity fix metrics (#3960) --- .../storage/hp/3par/ssh/mode/capacity.pm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/centreon-plugins/storage/hp/3par/ssh/mode/capacity.pm b/centreon-plugins/storage/hp/3par/ssh/mode/capacity.pm index c8e7f3c86..3f0683216 100644 --- a/centreon-plugins/storage/hp/3par/ssh/mode/capacity.pm +++ b/centreon-plugins/storage/hp/3par/ssh/mode/capacity.pm @@ -181,9 +181,9 @@ sub manage_selection { 'echo "===spaceSSD==="', 'showsys -space -devtype SSD', 'echo "===spaceFC==="', - 'showsys -space -devtype SSD', + 'showsys -space -devtype FC', 'echo "===spaceNL==="', - 'showsys -space -devtype SSD' + 'showsys -space -devtype NL' ] ); @@ -195,11 +195,11 @@ sub manage_selection { $type !~ /$self->{option_results}->{filter_type}/); my ($total, $free, $allocated, $unavailable, $failed); - $total = $1 * 1000 * 1000 if ($entry =~ /^Total\s+Capacity\s+:\s*(\d+)/m); - $free = $1 * 1000 * 1000 if ($entry =~ /^ Free\s+:\s*(\d+)/m); - $allocated = $1 * 1000 * 1000 if ($entry =~ /^ Allocated\s+:\s*(\d+)/m); - $unavailable = $1 * 1000 * 1000 if ($entry =~ /^ Unavailable\s+:\s*(\d+)/m); - $failed = $1 * 1000 * 1000 if ($entry =~ /^ Failed\s+:\s*(\d+)/m); + $total = $1 * 1024 * 1024 if ($entry =~ /^Total\s+Capacity\s+:\s*(\d+)/m); + $free = $1 * 1024 * 1024 if ($entry =~ /^ Free\s+:\s*(\d+)/m); + $allocated = $1 * 1024 * 1024 if ($entry =~ /^ Allocated\s+:\s*(\d+)/m); + $unavailable = $1 * 1024 * 1024 if ($entry =~ /^ Unavailable\s+:\s*(\d+)/m); + $failed = $1 * 1024 * 1024 if ($entry =~ /^ Failed\s+:\s*(\d+)/m); next if (!defined($total) || $total == 0);