prometheus-es-exporter
prometheus-es-exporter copied to clipboard
allow url parameters in query configuration
Aggregation query results may be polluted by extra fields which implies many useless metrics.
To filter there fields, one may use ?filter_path=
parameters to url.
Thus a query configuration options should be usefull to add this query string on called URL.
here is an example :
with following aggregator, the exporter will return my_query_le_doc_count
and my_query_le_to
:
"aggs": {
"le": {
"range": {
"field": "time_request",
"ranges": [
{ "to": "1", "key": "1" },
{ "to": "10", "key": "10" },
{ "to": "100", "key": "100" },
{ "from": "100", "key": "+Inf" }
]
}
}
Metric my_query_le_doc_count
may be use as an histogram metric and quantile function works directly on it
On the other hand, metric my_query_le_to
is useless, thus i may appe,nd to the url ?filter_path=aggregations.le.buckets.key,aggregations.le.buckets.doc_count
to filter out "to" field.
But the exporter has no way to specify this parameter