enhance indent aeg

This commit is contained in:
garnier-quentin 2019-03-26 14:12:40 +01:00
parent 699145d590
commit 51f2a6df5c
5 changed files with 29 additions and 30 deletions

View File

@ -65,11 +65,10 @@ sub new {
bless $self, $class;
$self->{version} = '1.0';
$options{options}->add_options(arguments =>
{
"warning-status:s" => { name => 'warning_status', default => '' },
"critical-status:s" => { name => 'critical_status', default => '%{status} =~ /true/i' },
});
$options{options}->add_options(arguments => {
"warning-status:s" => { name => 'warning_status', default => '' },
"critical-status:s" => { name => 'critical_status', default => '%{status} =~ /true/i' },
});
return $self;
}
@ -99,11 +98,14 @@ sub manage_selection {
my ($self, %options) = @_;
$self->{global} = {};
$self->{results} = $options{snmp}->get_multiple_table(oids => [ { oid => $oid_acm1000AcPlant },
{ oid => $oid_acmi1000AcPlant },
],
nothing_quit => 1);
$self->{results} = $options{snmp}->get_multiple_table(
oids => [
{ oid => $oid_acm1000AcPlant },
{ oid => $oid_acmi1000AcPlant },
],
nothing_quit => 1
);
my $result_acm1000 = $options{snmp}->map_instance(mapping => $mapping_acm1000, results => $self->{results}->{$oid_acm1000AcPlant}, instance => '0');
my $result_acmi1000 = $options{snmp}->map_instance(mapping => $mapping_acmi1000, results => $self->{results}->{$oid_acmi1000AcPlant}, instance => '0');

View File

@ -62,9 +62,8 @@ sub new {
bless $self, $class;
$self->{version} = '1.0';
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {
});
return $self;
}
@ -102,4 +101,4 @@ Example: --threshold-overload='multiple,2,OK,true'
=back
=cut
=cut

View File

@ -137,11 +137,10 @@ sub new {
bless $self, $class;
$self->{version} = '1.0';
$options{options}->add_options(arguments =>
{
"warning-status:s" => { name => 'warning_status', default => '%{status} =~ /onBattery/i' },
"critical-status:s" => { name => 'critical_status', default => '%{status} =~ /disconnected/i || %{status} =~ /shutdown/i' },
});
$options{options}->add_options(arguments => {
"warning-status:s" => { name => 'warning_status', default => '%{status} =~ /onBattery/i' },
"critical-status:s" => { name => 'critical_status', default => '%{status} =~ /disconnected/i || %{status} =~ /shutdown/i' },
});
return $self;
}

View File

@ -102,11 +102,10 @@ sub new {
bless $self, $class;
$self->{version} = '1.0';
$options{options}->add_options(arguments =>
{
"warning-status:s" => { name => 'warning_status', default => '' },
"critical-status:s" => { name => 'critical_status', default => '%{status} !~ /ok|notInstalled/i' },
});
$options{options}->add_options(arguments => {
"warning-status:s" => { name => 'warning_status', default => '' },
"critical-status:s" => { name => 'critical_status', default => '%{status} !~ /ok|notInstalled/i' },
});
return $self;
}

View File

@ -31,12 +31,12 @@ sub new {
$self->{version} = '0.1';
%{$self->{modes}} = (
'ac-status' => 'hardware::devices::aeg::acm::snmp::mode::acstatus',
'alarms-status' => 'hardware::devices::aeg::acm::snmp::mode::alarmsstatus',
'battery-status' => 'hardware::devices::aeg::acm::snmp::mode::batterystatus',
'load-status' => 'hardware::devices::aeg::acm::snmp::mode::loadstatus',
'rectifier-status' => 'hardware::devices::aeg::acm::snmp::mode::rectifierstatus',
);
'ac-status' => 'hardware::devices::aeg::acm::snmp::mode::acstatus',
'alarms-status' => 'hardware::devices::aeg::acm::snmp::mode::alarmsstatus',
'battery-status' => 'hardware::devices::aeg::acm::snmp::mode::batterystatus',
'load-status' => 'hardware::devices::aeg::acm::snmp::mode::loadstatus',
'rectifier-status' => 'hardware::devices::aeg::acm::snmp::mode::rectifierstatus',
);
return $self;
}