Kibana visualization - Aggregating data for dashboard

Hello,

we're trying to come up with a dashboard to monitor our services running in a Kubernetes cluster.

We use prometheus to scrape metrics and push them to Elastic Kibana via remove write feature. We managed to get the data into Kibana using an Elastic Agent and prometheus integration policy.

When working on dashboards, we want to aggregate the data that we get from prometheus by a timestamp field.

For example, if we were to create a chart which shows the amount of requests that we received and then break down the data by Label_A (where Lebel_A is a part of the document), we would need to make a calculation similar to this:

*sum(counter_value_at_the_end_of_the_date_range) - sum(counter_value_at_the_start_the_date_range)*

Is something like this possible using visualization library?

Thank you.

1 Like

Hi @mislav.kuzmic

the counter_value_at_the_start_the_date_range is the complex part.
The best that is currently possible is to find the difference between the last values of this and the previous time window:

sum( counter_value ) - sum( counter_value, shift="previous" )