Metricbeat CPU usage total

Hiya,

Metricbeat is working nicely for me but what I want to see for my servers are how busy they are.
I get the CPU usage in parts (user, system, steal etc) and the idle %, what I want is the total usage as a percentage; the opposite of the idle percent value.

I expect the answer might be a TimeLion based one but I can't get that to work. Is there a really good TimeLion tutorial out there?

My solution in the end was to use logstash and a bit of ruby in the filter section like this:

if [@metadata][type] == "metricsets" {
    if [system][cpu][idle][pct] {
        ruby {
            code => "event.set('[system][cpu][busy][pct]', 1 - event.get('[system][cpu][idle][pct]'));"
        }
    }
}

Anything wrong with that, is there a better way to do this?

Thanks,
Gog

Perhaps I miss something but I think as your calculation is quite simple you could use Kibana script fields for that: https://www.elastic.co/guide/en/kibana/current/scripted-fields.html

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