Suggestions for visualizing complex query - Kubernetes cpu requested vs available

Hi people,
I'm using metricbeat to gather Kubernetes metrics, and I'm trying to find ways to create the visualizations and insight we need. One metric we need is to know the total amount of cpu which our applications request, compared to the amount of cpu available. I have created an elasticsearch query, but I'm having a hard time figuring out how to visualize it. Any help appreciated. Find the query here: https://gist.github.com/babadofar/a960cbab8fe7ac235c4c8931b2da6e18

A TSVB visualization with Math aggregation should pretty cover the case.
Something like in this post:

1 Like

I need to aggregate on the node.name to get the cpu available, and on the pod.name to get the cpu requested. Which means I need to create two different series, since the TSVB only allows one level of terms aggregation(?). Is it possible to calculate with data from two different series in a script?

this issue? https://github.com/elastic/kibana/issues/22866

Yeah, you are going to have multiple charts. one for each node.
I'd suggest an Input Control Visualization, where you can select the node.name (which will filter to all the data available for that node.name) and then do the calculations in TSVB with just a split by pod.name.

OK that would work somewhat, but ideally, I would like to have unlimited (or more than one at least) nested terms aggregations in TSVB , the ability to inspect queries in TSVB, and of course, if we could have bucket script aggregations in the common Kibana visualizations, that would make it a lot easier.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.