blackstork-io / fabric

An open-source command-line tool for reporting workflow automation and a configuration language for reusable templates. Reporting-as-Code
https://blackstork.io/fabric/
Apache License 2.0
12 stars 0 forks source link

Extend `data.elasticsearch` data source parameters #113

Closed traut closed 3 months ago

traut commented 3 months ago

Background

When the number of alerts is high, it is better to rely on Elasticsearch for aggregations instead of in-memory JQ query.

Moreover, to avoid long .hits.hits[]._source prefixes in JQ queries, there should be a control that returns only the hits, not the metadata of the requests.

Design

Add 2 new parameters for the data source:

The data source should

traut commented 3 months ago

Similar to https://github.com/blackstork-io/fabric/issues/112, if only_hits is set to false but there are more than one raw response, the plugin should raise an error