Help with Painless Script - Kibana Visualize


(Justin Hamblin) #1

I am using Metricbeats to monitor my system so I have the logs I need. I want to "Count" all the servers Where the CPU% is over 50%.

In the attached example, I would like to see a count of 2.

My specific question is how to write a calculation that will only show the count of servers with CPU% in the rang I am interested in. Again, a single number.


(Jon Budzenski) #2

I think this is close. With the painless script you can return 1 or 0 depending on whether it meets your criteria, and then add a series aggregation below it to combine sum the results.


(Justin Hamblin) #3

Can you show me? I am looking for a guide to this language, but I haven't found what I needed yet.


(system) #4

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