Skip to content

Commit 5751ee1

Browse files
authored
enh(iplabel-ekara): change status match and timeframe option default value (#5429)
Refs: CTOR-1387
1 parent ee48767 commit 5751ee1

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/apps/monitoring/iplabel/ekara/restapi/mode/scenarios.pm

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,9 @@ sub set_counters {
6161
$self->{maps_counters}->{global} = [
6262
{ label => 'scenario-status',
6363
type => 2,
64-
warning_default => '%{status} !~ "Success"',
64+
warning_default => '%{status} =~ /(Aborted|Stopped|Excluded|Degraded)/',
6565
critical_default => '%{status} =~ "Failure"',
66+
unknown_default => '%{status} =~ /(Unknown|No execution)/',
6667
set => {
6768
key_values => [ { name => 'status' }, { name => 'num_status' }, { name => 'display' } ],
6869
closure_custom_output => $self->can('custom_status_output'),
@@ -133,7 +134,7 @@ sub check_options {
133134
my ($self, %options) = @_;
134135
$self->SUPER::check_options(%options);
135136

136-
$self->{timeframe} = defined($self->{option_results}->{timeframe}) && $self->{option_results}->{timeframe} ne '' ? $self->{option_results}->{timeframe} : '900';
137+
$self->{timeframe} = defined($self->{option_results}->{timeframe}) && $self->{option_results}->{timeframe} ne '' ? $self->{option_results}->{timeframe} : '7500';
137138
}
138139

139140
my $status_mapping = {
@@ -220,10 +221,10 @@ Check ip-label Ekara scenarios.
220221
221222
=item B<--timeframe>
222223
223-
Set timeframe period in seconds. (default: 900)
224-
Example: --timeframe='3600' will check the last hour
225-
226-
224+
Set timeframe period in seconds. (default: 7500)
225+
Example: C<--timeframe='3600'> will check the last hour.
226+
Note: If the API/Poller is overloaded, it is preferable to refine
227+
this value according to the highest check frequency in the scenario.
227228
228229
=item B<--filter-type>
229230

tests/resources/spellcheck/stopwords.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ dfsrevent
6666
--display-transform-src
6767
dns-resolve-time
6868
--dyn-mode
69+
Ekara
6970
-EncodedCommand
7071
env
7172
ESX

0 commit comments

Comments
 (0)