mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-27 07:34:35 +02:00
patch ipsec palo alto ssh
This commit is contained in:
parent
ab599a1560
commit
a90e82c57d
@ -121,12 +121,23 @@ sub manage_selection {
|
|||||||
$self->{global}->{total_ipsec}++;
|
$self->{global}->{total_ipsec}++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$result = $options{custom}->execute_command(command => 'show vpn ipsec-sa', ForceArray => ['entry']);
|
||||||
|
foreach (@{$result->{entries}->{entry}}) {
|
||||||
|
if (defined($self->{tunnels}->{$_->{gwid}})) {
|
||||||
|
$self->{tunnels}->{$_->{gwid}}->{tid} = $_->{tid};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$result = $options{custom}->execute_command(command => 'show vpn flow', ForceArray => ['entry']);
|
$result = $options{custom}->execute_command(command => 'show vpn flow', ForceArray => ['entry']);
|
||||||
|
foreach my $gwid (keys %{$self->{tunnels}}) {
|
||||||
|
next if (!defined($self->{tunnels}->{$gwid}->{tid}));
|
||||||
foreach (@{$result->{IPSec}->{entry}}) {
|
foreach (@{$result->{IPSec}->{entry}}) {
|
||||||
|
next if ($self->{tunnels}->{$gwid}->{tid} ne $_->{id});
|
||||||
$self->{tunnels}->{$_->{gwid}}->{state} = $_->{state};
|
$self->{tunnels}->{$_->{gwid}}->{state} = $_->{state};
|
||||||
$self->{tunnels}->{$_->{gwid}}->{monitor_status} = $_->{mon};
|
$self->{tunnels}->{$_->{gwid}}->{monitor_status} = $_->{mon};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user