From dd2b23035685250a53adec640528cbc297171f67 Mon Sep 17 00:00:00 2001 From: Marc Guasch Date: Fri, 1 Jul 2022 11:16:55 +0200 Subject: [PATCH 1/2] Fix rate limit --- packages/panw_cortex_xdr/changelog.yml | 5 +++++ .../data_stream/alerts/agent/stream/httpjson.yml.hbs | 5 ++++- packages/panw_cortex_xdr/manifest.yml | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/panw_cortex_xdr/changelog.yml b/packages/panw_cortex_xdr/changelog.yml index fefd8dd2000..e2e9507626a 100644 --- a/packages/panw_cortex_xdr/changelog.yml +++ b/packages/panw_cortex_xdr/changelog.yml @@ -1,4 +1,9 @@ # newer versions go on top +- version: "1.3.1" + changes: + - description: Fix rate limit. + type: bugfix + link: https://github.com/elastic/integrations/pull/ - version: "1.3.0" changes: - description: Update package to ECS 8.3.0. diff --git a/packages/panw_cortex_xdr/data_stream/alerts/agent/stream/httpjson.yml.hbs b/packages/panw_cortex_xdr/data_stream/alerts/agent/stream/httpjson.yml.hbs index 2056ceabb1b..4410a95a5bd 100644 --- a/packages/panw_cortex_xdr/data_stream/alerts/agent/stream/httpjson.yml.hbs +++ b/packages/panw_cortex_xdr/data_stream/alerts/agent/stream/httpjson.yml.hbs @@ -14,7 +14,10 @@ request.timeout: {{request_timeout}} {{#if proxy_url }} request.proxy_url: {{proxy_url}} {{/if}} - +request.rate_limit: + limit: '[[.last_response.header.Get "X-Rate-Limit-Limit"]]' + remaining: '[[.last_response.header.Get "X-Rate-Limit-Remaining"]]' + reset: '[[(parseDate (.last_response.header.Get "X-Rate-Limit-Reset")).Unix]]' request.transforms: - set: target: header.Authorization diff --git a/packages/panw_cortex_xdr/manifest.yml b/packages/panw_cortex_xdr/manifest.yml index 05024ad145d..f2f0c8d629b 100644 --- a/packages/panw_cortex_xdr/manifest.yml +++ b/packages/panw_cortex_xdr/manifest.yml @@ -1,6 +1,6 @@ name: panw_cortex_xdr title: Palo Alto Cortex XDR Logs -version: "1.3.0" +version: "1.3.1" release: ga description: Collect and parse logs from Palo Alto Cortex XDR API with Elastic Agent. type: integration From 0b842c9fed70acc386846c541f1c641308cae284 Mon Sep 17 00:00:00 2001 From: Marc Guasch Date: Fri, 1 Jul 2022 11:19:48 +0200 Subject: [PATCH 2/2] Add pr number --- packages/panw_cortex_xdr/changelog.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/panw_cortex_xdr/changelog.yml b/packages/panw_cortex_xdr/changelog.yml index e2e9507626a..d409fd3e821 100644 --- a/packages/panw_cortex_xdr/changelog.yml +++ b/packages/panw_cortex_xdr/changelog.yml @@ -3,7 +3,7 @@ changes: - description: Fix rate limit. type: bugfix - link: https://github.com/elastic/integrations/pull/ + link: https://github.com/elastic/integrations/pull/3635 - version: "1.3.0" changes: - description: Update package to ECS 8.3.0.