This repository has been archived on 2023-04-02. You can view files and clone it, but cannot push or open issues or pull requests.
gitops-tbrnt/monitoring/vendor/github.com/grafana/grafonnet-lib/grafonnet/elasticsearch.libsonnet
Tobias Brunner 301e297d45
All checks were successful
continuous-integration/drone/push Build is passing
update monitoring stack to latest
2020-05-12 19:42:23 +02:00

42 lines
722 B
Plaintext

{
/**
* @name elasticsearch.target
*/
target(
query,
timeField,
id=null,
datasource=null,
metrics=[{
field: 'value',
id: null,
type: 'percentiles',
settings: {
percents: [
'90',
],
},
}],
bucketAggs=[{
field: 'timestamp',
id: null,
type: 'date_histogram',
settings: {
interval: '1s',
min_doc_count: 0,
trimEdges: 0,
},
}],
alias=null,
):: {
[if datasource != null then 'datasource']: datasource,
query: query,
id: id,
timeField: timeField,
bucketAggs: bucketAggs,
metrics: metrics,
alias: alias,
// TODO: generate bucket ids
},
}