kibana/x-pack/platform/plugins
Ersin Erdal ed02db1782
Connector Rate Limiter (#224784)
This PR adds a rate limiter to control connector usage rate limiting.
It supports only `email` connector for now, but the other connectors can
be added by adding their connectorTypeId to the `validConnectorTypeIds`
list.

## To validate:

Add the below config to your `kibana.yml`
```
xpack.actions.rateLimiter.email
  lookbackWindow: '310s'
  limit: 4
```

And create a rule that triggers an email action every 1 minute.
On the 5th execution you should see an error message like: `Action
execution rate limit exceeded for connector: .email`

30 seconds after that the action should be successfully retried.

You can test with other connectors as well (e.g. .server-log). In order
to do that, the connectorTypeId should be added to the
`validConnectorTypeIds` list in the config file.
`const validConnectorTypeIds = new Set(['email']);` -> `const
validConnectorTypeIds = new Set(['email','server-log']);`

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-27 23:37:54 +02:00
..
private [ResponseOps][Reporting] Add callout to scheduled reports flyout when no supported report type is available (#225597) 2025-06-27 19:30:41 +03:00
shared Connector Rate Limiter (#224784) 2025-06-27 23:37:54 +02:00