add endpoint filter for broker stats mode
This commit is contained in:
parent
4a31fb10b7
commit
9d9eed9a01
|
@ -163,6 +163,13 @@ sub manage_selection {
|
||||||
|
|
||||||
my $endpoint = $entry;
|
my $endpoint = $entry;
|
||||||
$endpoint =~ s/endpoint //;
|
$endpoint =~ s/endpoint //;
|
||||||
|
|
||||||
|
if (defined($self->{option_results}->{filter_name}) && $self->{option_results}->{filter_name} ne '' &&
|
||||||
|
$endpoint !~ /$self->{option_results}->{filter_name}/i) {
|
||||||
|
$self->{output}->output_add(long_msg => "skipping endpoint '" . $endpoint . "': no matching filter name");
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
my $state = $json->{$entry}->{state};
|
my $state = $json->{$entry}->{state};
|
||||||
my $type = 'output';
|
my $type = 'output';
|
||||||
$type = 'input' if (!defined($json->{$entry}->{status}));
|
$type = 'input' if (!defined($json->{$entry}->{status}));
|
||||||
|
@ -228,6 +235,10 @@ Use 'sudo' to execute the command.
|
||||||
|
|
||||||
Specify the centreon-broker json stats file (Required). Can be multiple.
|
Specify the centreon-broker json stats file (Required). Can be multiple.
|
||||||
|
|
||||||
|
=item B<--filter-name>
|
||||||
|
|
||||||
|
Filter endpoint name.
|
||||||
|
|
||||||
=item B<--warning-*>
|
=item B<--warning-*>
|
||||||
|
|
||||||
Threshold warning.
|
Threshold warning.
|
||||||
|
|
Loading…
Reference in New Issue