This commit is contained in:
garnier-quentin 2019-07-05 13:48:59 +02:00
parent c826bacaf4
commit 627b2f7eb4
9 changed files with 10 additions and 9 deletions

View File

@ -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
);

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {