In the new Observability Overview page, we're planning to show two charts to give the user a clear picture of which alert is active at the moment.
In this chart, we want to show all active instances for all observability plugins (APM/Logs/Uptime/Metrics) grouped by type.

And in this one, we want to show some alert detail and the number of active instances next to it.

Current situation:
In the current API to get this information I have to first call _find to get all created alerts, then filter by Observability plugins (APM/Logs/Uptime/Metrics), and make an HTTP call for each alert to get the active instances.
What a need:
An API that returns all active instances and the alert details, with the possibility to filter by consumer and alert type.
Example API:
alerting.getInstances({ active: true, consumers: ['apm', 'uptime', 'metrics'] })
Example response:
In the new Observability Overview page, we're planning to show two charts to give the user a clear picture of which alert is active at the moment.
In this chart, we want to show all active instances for all observability plugins (APM/Logs/Uptime/Metrics) grouped by type.

And in this one, we want to show some alert detail and the number of active instances next to it.

Current situation:
In the current API to get this information I have to first call
_findto get all created alerts, then filter by Observability plugins (APM/Logs/Uptime/Metrics), and make an HTTP call for each alert to get the active instances.What a need:
An API that returns all active instances and the alert details, with the possibility to filter by consumer and alert type.
Example API:
Example response:
[ { "id": "b5ef31a1-7c9f-47f5-a0d4-69169fc2f407", "params": { "threshold": 1, "aggregationType": "avg", "windowSize": 5, "windowUnit": "m", "transactionType": "request", "environment": "ENVIRONMENT_ALL", "serviceName": "opbeans-java" }, "consumer": "apm", "alertTypeId": "apm.transaction_duration", "schedule": { "interval": "10s" }, "actions": [ { "actionTypeId": ".webhook", "group": "threshold_met", "params": { "body": "{\"transaction\": \"transaction\"}" }, "id": "4e6a507f-1238-49c1-8b55-c19e42076543" } ], "tags": ["apm", "service.name:opbeans-java"], "name": "Transaction duration | opbeans-java", "throttle": "15s", "enabled": true, "apiKeyOwner": "elastic", "createdBy": "elastic", "updatedBy": "elastic", "createdAt": "2020-06-25T14:27:19.820Z", "muteAll": false, "mutedInstanceIds": [], "scheduledTaskId": "fad2cf20-b6ef-11ea-9623-a57005710a46", "updatedAt": "2020-06-25T14:27:21.257Z", //All active instances "alertInstances": [ { "state": {}, "meta": { "lastScheduledActions": { "group": "threshold_met", "date": "2020-06-29T08:31:38.802Z" } } } ] } ]