I am looking for a heat map visualization that's not exactly what Kibana (in 7.3 to 7.12 at least) provides. We want to display the parameter of interest, let's say one of the CPU usage stats collected by Metricbeat, in a "point in time" display like an annunciator panel, where each node or system would have a square with a color corresponding to the level or intensity of utilization. It would look like:
Does Kibana have a visualization that can provide something like this? Or can one of the out of the box visualizations be tweaked into this form? We're OK with not seeing 'where we've been" on this particular viz, since we can get that information from the standard heat map.
With apologies for the lateness of my response (I was on a dive trip with exceptionally limited connectivity): That is very much what we need, yes - thank you! I don't know if I'll be able to figure out how to include it on a dashboard with other visualizations, but if that's not possible we'll survive with having two places to check enclave status. Again, thank you!
Your question piqued my interest and I tried to implement a custom Vega visualization. I tested this in 7.15.0 so I'm not sure if it will work in 7.12.0.
It's not as pretty as the Metrics app, but should be embeddable into a dashboard.
Let me know if you are able to use it.
{
$schema: https://vega.github.io/schema/vega-lite/v4.json
title: Metrics by Node
data: {
url: {
/*
An object instead of a string for the "url" param is treated as an Elasticsearch query. Anything inside this object is not part of the Vega language, but only understood by Kibana and Elasticsearch server. This query calculates the average CPU percent for each unique host name for the time interval selected in the Time Picker.
Kibana has a special handling for the fields surrounded by "%". They are processed before the the query is sent to Elasticsearch. This way the query becomes context aware, and can use the time range and the dashboard filters.
*/
// Apply dashboard context filters when set.
%context%: true
%timefield%: @timestamp
index: metricbeat-*
body: {
aggs: {
nodes: {
terms: {
field: host.name
}
aggs: {
avg_cpu: {
avg: {
field: system.cpu.total.pct
}
}
}
}
}
size: 0
}
}
format: {
property: aggregations.nodes.buckets
}
}
/**
Use a facet operator to split the panels into three columns.
However, I can't figure out how to get rid of the labels above each square.
But you could remove the second object in the layer array below if you don't
mind the label being above the square.
*/
columns: 3
facet: {
field: key
type: ordinal
header: {
title: false
}
}
spec: {
encoding: {
/**
Here we take the value from the avg_cpu aggregation above
and use that to determine the color.
*/
color: {
field: avg_cpu.value
type: quantitative
}
}
/**
We use multiple layers to support creating both the squares
and the text labels centered on the square.
*/
layer: [
{
mark: square
}
{
mark: {
type: text
}
encoding: {
text: {
field: key
}
color: {
value: black
}
}
}
]
}
config: {
square: {
// Set each square size in pixel area (128px * 128px).
size: 16384
}
}
}
@bhavyarm@nickpeihl The Vega visualization works in 7.13 too. Since I posted the question I've changed roles - still in Elasticsearch but different company and focus - but between the built-in metrics app and the Vega viz I think my successors will be able to get the monitoring functionality they need. Thank you both for the assistance!
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.