Skip to content

Commit d64faaa

Browse files
authored
feat(okta): add rate_limit_early_limit configuration (#15835)
Add support for the rate_limit_early_limit parameter to enable starting rate-limiting before reaching the API response limit. Values less than 1 are treated as a percentage of the limit, while values greater than or equal to 1 are treated as the target remaining value. This can avoid causing alerts to Okta admins under bursts of system log activity by having the integration stop making requests as it gets close to the limit.
1 parent 061b0cc commit d64faaa

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

packages/okta/changelog.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# newer versions go on top
2+
- version: "3.11.0"
3+
changes:
4+
- description: Added support for rate_limit_early_limit configuration to start rate-limiting before reaching the API response limit.
5+
type: enhancement
6+
link: https://github.com/elastic/integrations/pull/15835
27
- version: "3.10.3"
38
changes:
49
- description: Optimize API pagination to prevent unnecessary requests when fewer logs than the limit are returned, reducing rate limit token consumption.

packages/okta/data_stream/system/agent/stream/httpjson.yml.hbs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ request.rate_limit:
1313
limit: '[[.last_response.header.Get "X-Rate-Limit-Limit"]]'
1414
remaining: '[[.last_response.header.Get "X-Rate-Limit-Remaining"]]'
1515
reset: '[[.last_response.header.Get "X-Rate-Limit-Reset"]]'
16+
{{#if rate_limit_early_limit}}
17+
early_limit: {{rate_limit_early_limit}}
18+
{{/if}}
1619

1720
{{#if ssl}}
1821
request.ssl: {{ssl}}

packages/okta/data_stream/system/manifest.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ streams:
5454
# This works around system tests not allowing an assert.hit_count > 500.
5555
- default
5656
- agentless
57+
- name: rate_limit_early_limit
58+
title: Rate Limit Early Limit
59+
description: Start rate-limiting before reaching the limit specified in the response. Values less than 1 are treated as a percentage of the limit (e.g. 0.9 means 90%). Values greater than or equal to 1 are treated as the target remaining value.
60+
type: text
61+
required: false
62+
show_user: false
63+
secret: false
5764

5865
template_path: httpjson.yml.hbs
5966
title: Okta system logs

packages/okta/manifest.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: okta
22
title: Okta
3-
version: "3.10.3"
3+
version: "3.11.0"
44
description: Collect and parse event logs from Okta API with Elastic Agent.
55
type: integration
66
format_version: "3.2.3"
@@ -149,11 +149,7 @@ policy_templates:
149149
required: false
150150
show_user: false
151151
description: >-
152-
The request tracer logs requests and responses to the agent's local file-system for debugging configurations.
153-
Enabling this request tracing compromises security and should only be used for debugging. Disabling the request
154-
tracer will delete any stored traces.
155-
See [documentation](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-httpjson.html#_request_tracer_filename)
156-
for details.
152+
The request tracer logs requests and responses to the agent's local file-system for debugging configurations. Enabling this request tracing compromises security and should only be used for debugging. Disabling the request tracer will delete any stored traces. See [documentation](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-httpjson.html#_request_tracer_filename) for details.
157153
- name: ssl
158154
type: yaml
159155
title: SSL

0 commit comments

Comments
 (0)