This commit is contained in:
garnier-quentin 2019-08-01 16:35:36 +02:00
parent b6ba85a853
commit 691092301f
1 changed files with 8 additions and 5 deletions

View File

@ -75,10 +75,10 @@ sub new {
bless $self, $class;
$options{options}->add_options(arguments => {
"ok-status:s" => { name => 'ok_status', default => '%{status} =~ /ok/' },
"unknown-status:s" => { name => 'unknown_status', default => '' },
"warning-status:s" => { name => 'warning_status', default => '%{status} =~ /.*/' },
"critical-status:s" => { name => 'critical_status', default => '' },
'ok-status:s' => { name => 'ok_status', default => '%{status} =~ /ok/' },
'unknown-status:s' => { name => 'unknown_status', default => '' },
'warning-status:s' => { name => 'warning_status', default => '%{status} =~ /.*/' },
'critical-status:s' => { name => 'critical_status', default => '' },
});
return $self;
@ -121,7 +121,10 @@ sub manage_selection {
my $instance = $1;
# 16 bits value
my $value = unpack('S', $result->{$_});
if (!defined($value)) {
$value = ord($result->{$_});
}
$self->{printer}->{$instance} = { display => $instance, errors => {} };
my $i = 0;
foreach my $key (keys %errors_printer) {