1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
local g = import '../g.libsonnet';
local prometheusQuery = g.query.prometheus;
local variables = import '../variables.libsonnet';
{
indexedDocuments:
prometheusQuery.new(
'$' + variables.datasource.name,
|||
elasticsearch_indices_docs{cluster=~"$cluster"}
|||
),
indexSize:
prometheusQuery.new(
'$' + variables.datasource.name,
|||
elasticsearch_indices_store_size_bytes{cluster=~"$cluster"}
|||
),
indexRate:
prometheusQuery.new(
'$' + variables.datasource.name,
|||
rate(elasticsearch_indices_indexing_index_total{cluster=~"$cluster"}[$__rate_interval])
|||
)
+ prometheusQuery.withLegendFormat('{{name}}'),
queryRate:
prometheusQuery.new(
'$' + variables.datasource.name,
|||
rate(elasticsearch_indices_search_query_total{cluster=~"$cluster"}[$__rate_interval])
|||
)
+ prometheusQuery.withLegendFormat('{{name}}'),
queueCount:
prometheusQuery.new(
'$' + variables.datasource.name,
|||
sum(elasticsearch_thread_pool_queue_count{cluster=~"$cluster",type!="management"}) by (type)
|||
)
+ prometheusQuery.withLegendFormat('{{type}}'),
}
|