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
|
local g = import '../g.libsonnet';
local prometheusQuery = g.query.prometheus;
local variables = import '../variables.libsonnet';
{
memoryUsage:
prometheusQuery.new(
'$' + variables.datasource.name,
|||
elasticsearch_jvm_memory_used_bytes{cluster=~"$cluster"}
|||
)
+ prometheusQuery.withLegendFormat('{{name}} {{area}}'),
memoryUsageAverage15:
prometheusQuery.new(
'$' + variables.datasource.name,
|||
avg_over_time(
elasticsearch_jvm_memory_used_bytes{cluster=~"$cluster"}[15m]
) /
elasticsearch_jvm_memory_max_bytes{cluster=~"$cluster"}
|||
)
+ prometheusQuery.withLegendFormat('{{name}} {{area}}'),
memoryMax:
prometheusQuery.new(
'$' + variables.datasource.name,
|||
elasticsearch_jvm_memory_max_bytes{cluster=~"$cluster"}
|||
)
+ prometheusQuery.withLegendFormat('{{name}} {{area}}'),
gcSeconds:
prometheusQuery.new(
'$' + variables.datasource.name,
|||
rate(
elasticsearch_jvm_gc_collection_seconds_sum{cluster=~"$cluster"}[$__rate_interval]
)
|||
)
+ prometheusQuery.withLegendFormat('{{name}} {{gc}}'),
}
|