From 6fef99fb2a27cd1ab7c69866607d26a287543a27 Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Fri, 5 Jul 2019 13:48:59 +0200 Subject: [PATCH] Fix #1574 --- centreon-plugins/storage/hp/3par/ssh/custom/custom.pm | 3 ++- .../storage/hp/3par/ssh/mode/components/battery.pm | 2 +- centreon-plugins/storage/hp/3par/ssh/mode/components/cim.pm | 2 +- centreon-plugins/storage/hp/3par/ssh/mode/components/disk.pm | 2 +- centreon-plugins/storage/hp/3par/ssh/mode/components/node.pm | 2 +- centreon-plugins/storage/hp/3par/ssh/mode/components/port.pm | 2 +- centreon-plugins/storage/hp/3par/ssh/mode/components/psu.pm | 2 +- centreon-plugins/storage/hp/3par/ssh/mode/components/sensor.pm | 2 +- centreon-plugins/storage/hp/3par/ssh/mode/components/wsapi.pm | 2 +- 9 files changed, 10 insertions(+), 9 deletions(-) diff --git a/centreon-plugins/storage/hp/3par/ssh/custom/custom.pm b/centreon-plugins/storage/hp/3par/ssh/custom/custom.pm index aa0b39945..0e5c003a9 100644 --- a/centreon-plugins/storage/hp/3par/ssh/custom/custom.pm +++ b/centreon-plugins/storage/hp/3par/ssh/custom/custom.pm @@ -108,9 +108,10 @@ sub execute_command { } return centreon::plugins::misc::execute( + ssh_pipe => 1, output => $self->{output}, options => $self->{option_results}, - command => defined($self->{option_results}->{command}) && $self->{option_results}->{command} ne '' ? $self->{option_results}->{command} : $self->{ssh_commands} . "; exit\n", + command => defined($self->{option_results}->{command}) && $self->{option_results}->{command} ne '' ? $self->{option_results}->{command} : $self->{ssh_commands}, command_path => $self->{option_results}->{command_path}, command_options => defined($self->{option_results}->{command_options}) && $self->{option_results}->{command_options} ne '' ? $self->{option_results}->{command_options} : undef ); diff --git a/centreon-plugins/storage/hp/3par/ssh/mode/components/battery.pm b/centreon-plugins/storage/hp/3par/ssh/mode/components/battery.pm index 9c819f7e2..69953ca75 100644 --- a/centreon-plugins/storage/hp/3par/ssh/mode/components/battery.pm +++ b/centreon-plugins/storage/hp/3par/ssh/mode/components/battery.pm @@ -31,7 +31,7 @@ sub load { # 0,1 1 0 6CQUBA1HN5063G OK 100 n/a No No # 2,3 0 0 6CQUBA1HN484RB OK 100 n/a No No # 2,3 1 0 6CQUBA1HN484R9 OK 100 n/a No No - push @{$self->{commands}}, 'echo "===showbattery===', 'showbattery'; + push @{$self->{commands}}, 'echo "===showbattery==="', 'showbattery'; } sub check { diff --git a/centreon-plugins/storage/hp/3par/ssh/mode/components/cim.pm b/centreon-plugins/storage/hp/3par/ssh/mode/components/cim.pm index 7187b63d5..5ba3e8d9d 100644 --- a/centreon-plugins/storage/hp/3par/ssh/mode/components/cim.pm +++ b/centreon-plugins/storage/hp/3par/ssh/mode/components/cim.pm @@ -28,7 +28,7 @@ sub load { #-Service- -State- --SLP-- SLPPort -HTTP-- HTTPPort -HTTPS- HTTPSPort PGVer CIMVer #Enabled Active Enabled 427 Enabled 5988 Enabled 5989 2.9.1 3.2.2 - push @{$self->{commands}}, 'echo "===showcim===', 'showcim'; + push @{$self->{commands}}, 'echo "===showcim==="', 'showcim'; } sub check { diff --git a/centreon-plugins/storage/hp/3par/ssh/mode/components/disk.pm b/centreon-plugins/storage/hp/3par/ssh/mode/components/disk.pm index 5fc080bff..f3f5b76f0 100644 --- a/centreon-plugins/storage/hp/3par/ssh/mode/components/disk.pm +++ b/centreon-plugins/storage/hp/3par/ssh/mode/components/disk.pm @@ -33,7 +33,7 @@ sub load { #... # 10 normal # 11 normal - push @{$self->{commands}}, 'echo "===showdisk===', 'showpd -showcols Id,State'; + push @{$self->{commands}}, 'echo "===showdisk==="', 'showpd -showcols Id,State'; } sub check { diff --git a/centreon-plugins/storage/hp/3par/ssh/mode/components/node.pm b/centreon-plugins/storage/hp/3par/ssh/mode/components/node.pm index e5275fccc..ddbdf4bfb 100644 --- a/centreon-plugins/storage/hp/3par/ssh/mode/components/node.pm +++ b/centreon-plugins/storage/hp/3par/ssh/mode/components/node.pm @@ -31,7 +31,7 @@ sub load { #1 OK OK #2 OK OK #3 OK OK - push @{$self->{commands}}, 'echo "===shownode===', 'shownode -state'; + push @{$self->{commands}}, 'echo "===shownode==="', 'shownode -state'; } sub check { diff --git a/centreon-plugins/storage/hp/3par/ssh/mode/components/port.pm b/centreon-plugins/storage/hp/3par/ssh/mode/components/port.pm index 3d4d759d0..35c08a4b9 100644 --- a/centreon-plugins/storage/hp/3par/ssh/mode/components/port.pm +++ b/centreon-plugins/storage/hp/3par/ssh/mode/components/port.pm @@ -38,7 +38,7 @@ sub load { #0:3:1 peer offline - B4B52FA71D43 free IP IP0 - - #1:0:1 initiator ready 50002ACFF70047C0 50002AC1010047C0 disk SAS DP-1 - - #1:0:2 initiator ready 50002ACFF70047C0 50002AC1020047C0 disk SAS DP-2 - - - push @{$self->{commands}}, 'echo "===showport===', 'showport'; + push @{$self->{commands}}, 'echo "===showport==="', 'showport'; } sub check { diff --git a/centreon-plugins/storage/hp/3par/ssh/mode/components/psu.pm b/centreon-plugins/storage/hp/3par/ssh/mode/components/psu.pm index c1295eca9..58d9b52d2 100644 --- a/centreon-plugins/storage/hp/3par/ssh/mode/components/psu.pm +++ b/centreon-plugins/storage/hp/3par/ssh/mode/components/psu.pm @@ -31,7 +31,7 @@ sub load { # 0,1 1 682372-001 5CQLQA1434W2ED OK OK OK # 2,3 0 682372-001 5CQLQA1433Y0KS OK OK OK # 2,3 1 682372-001 5CQLQX1XX3E056 OK OK OK - push @{$self->{commands}}, 'echo "===showpsu===', 'shownode -ps'; + push @{$self->{commands}}, 'echo "===showpsu==="', 'shownode -ps'; } sub check { diff --git a/centreon-plugins/storage/hp/3par/ssh/mode/components/sensor.pm b/centreon-plugins/storage/hp/3par/ssh/mode/components/sensor.pm index 3e41af3d8..b179e868a 100644 --- a/centreon-plugins/storage/hp/3par/ssh/mode/components/sensor.pm +++ b/centreon-plugins/storage/hp/3par/ssh/mode/components/sensor.pm @@ -47,7 +47,7 @@ sub load { # PCM 0 inlet 27 C 10 C 50 C Within Tolerance # PCM 0 hotspot 21 C 10 C 65 C Within Tolerance # Node Input PWR 87.6 W 0.0 W 264.0 W Within Tolerance - push @{$self->{commands}}, 'echo "===shownodeenv===', 'shownodeenv'; + push @{$self->{commands}}, 'echo "===shownodeenv==="', 'shownodeenv'; } sub check { diff --git a/centreon-plugins/storage/hp/3par/ssh/mode/components/wsapi.pm b/centreon-plugins/storage/hp/3par/ssh/mode/components/wsapi.pm index f7db4f896..be80688db 100644 --- a/centreon-plugins/storage/hp/3par/ssh/mode/components/wsapi.pm +++ b/centreon-plugins/storage/hp/3par/ssh/mode/components/wsapi.pm @@ -28,7 +28,7 @@ sub load { #-Service- -State- -HTTP_State- HTTP_Port -HTTPS_State- HTTPS_Port -Version- -----------------API_URL------------------ #Enabled Active Disabled 8008 Enabled 8080 1.5.3 https://xxxx:8080/api/v1 - push @{$self->{commands}}, 'echo "===showwsapi===', 'showwsapi'; + push @{$self->{commands}}, 'echo "===showwsapi==="', 'showwsapi'; } sub check {