This commit is contained in:
Quentin Garnier 2014-04-17 14:41:06 +02:00
parent c098bbfe57
commit 1c1d83c6a8
1 changed files with 7 additions and 7 deletions

View File

@ -53,9 +53,9 @@ sub new {
$self->{version} = '1.0'; $self->{version} = '1.0';
$options{options}->add_options(arguments => $options{options}->add_options(arguments =>
{ {
"warning:s" => { name => 'warning' }, "warning:s" => { name => 'warning' },
"critical:s" => { name => 'critical' }, "critical:s" => { name => 'critical' },
"filter:s" => { name => 'filter' }, "filter-tray:s" => { name => 'filter_tray' },
}); });
return $self; return $self;
@ -107,9 +107,9 @@ sub run {
$descr = $hrDeviceIndex . '#' . $prtInputIndex; $descr = $hrDeviceIndex . '#' . $prtInputIndex;
} }
if (defined($self->{option_results}->{filter}) && $self->{option_results}->{filter} ne '' && if (defined($self->{option_results}->{filter_tray}) && $self->{option_results}->{filter_tray} ne '' &&
$descr !~ /$self->{option_results}->{filter}/) { $descr !~ /$self->{option_results}->{filter_tray}/) {
$self->{output}->output_add(long_msg => "Skipping tray '$descr': not matching filter."); $self->{output}->output_add(long_msg => "Skipping tray '$ ': not matching filter.");
next; next;
} }
@ -168,7 +168,7 @@ Threshold warning in percent.
Threshold critical in percent. Threshold critical in percent.
=item B<--filter> =item B<--filter-tray>
Filter tray to check (can use a regexp). Filter tray to check (can use a regexp).