Refs #5362
This commit is contained in:
parent
c098bbfe57
commit
1c1d83c6a8
|
@ -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).
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue