(plugin) apps::wallix::bastion::snmp - mode license add --filter-cate… (#4447)
This commit is contained in:
parent
765eadd57f
commit
aaa667e087
|
@ -191,7 +191,8 @@ sub new {
|
||||||
bless $self, $class;
|
bless $self, $class;
|
||||||
|
|
||||||
$options{options}->add_options(arguments => {
|
$options{options}->add_options(arguments => {
|
||||||
'unit:s' => { name => 'unit', default => 's' }
|
'filter-category:s' => { name => 'filter_category' },
|
||||||
|
'unit:s' => { name => 'unit', default => 's' }
|
||||||
});
|
});
|
||||||
|
|
||||||
return $self;
|
return $self;
|
||||||
|
@ -209,6 +210,9 @@ sub check_options {
|
||||||
sub add_license {
|
sub add_license {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
|
|
||||||
|
return if (defined($self->{option_results}->{filter_category}) && $self->{option_results}->{filter_category} ne '' &&
|
||||||
|
$options{name} !~ /$self->{option_results}->{filter_category}/);
|
||||||
|
|
||||||
$self->{licenses}->{ $options{name} } = {
|
$self->{licenses}->{ $options{name} } = {
|
||||||
name => $options{name},
|
name => $options{name},
|
||||||
used => $options{used}
|
used => $options{used}
|
||||||
|
@ -300,6 +304,15 @@ Check license.
|
||||||
|
|
||||||
=over 8
|
=over 8
|
||||||
|
|
||||||
|
=item B<--filter-category>
|
||||||
|
|
||||||
|
Filter licenses by category ('primary', 'secondary', 'resource').
|
||||||
|
|
||||||
|
=item B<--unit>
|
||||||
|
|
||||||
|
Select the unit for the expired license threshold. May be 's' for seconds, 'm' for minutes,
|
||||||
|
'h' for hours, 'd' for days, 'w' for weeks. Default is seconds.
|
||||||
|
|
||||||
=item B<--warning-status>
|
=item B<--warning-status>
|
||||||
|
|
||||||
Set warning threshold for status.
|
Set warning threshold for status.
|
||||||
|
@ -310,11 +323,6 @@ You can use the following variables: %{status}
|
||||||
Set critical threshold for status (Default: '%{status} eq "expired"').
|
Set critical threshold for status (Default: '%{status} eq "expired"').
|
||||||
You can use the following variables: %{status}
|
You can use the following variables: %{status}
|
||||||
|
|
||||||
=item B<--unit>
|
|
||||||
|
|
||||||
Select the unit for expires threshold. May be 's' for seconds, 'm' for minutes,
|
|
||||||
'h' for hours, 'd' for days, 'w' for weeks. Default is seconds.
|
|
||||||
|
|
||||||
=item B<--warning-*> B<--critical-*>
|
=item B<--warning-*> B<--critical-*>
|
||||||
|
|
||||||
Thresholds.
|
Thresholds.
|
||||||
|
|
Loading…
Reference in New Issue