Trouble visualizing CPU utilization

I am using metricbeat to visualize system and network performance across my fleet. It works great! One thing I' having a hard time with is getting CPU used vs. CPU idle. I would like to be able to subtract system.cpu.idle.pct
from 100 to get the current utilization. The following forum post suggested using scripted fields:

I created a scripted field with the following attributes:

Index -> metricbeat-*
Name -> cpuutilization
Language -> expression
Type: number
Format -> default
Script -> 100 - doc['system.cpu.idle.pct'].value

And used the following video as a starting point:

My field isn't showing up under discover and refreshing the fields doesn't appear to help. First off, is this the ideal way to get actual utilization? Second, any idea why the cpuutilization field isn't showing up?

I solved by own problem. The system.cpu.* values returned by metricbeat are percentages so I needed to set format to a percentage. Now my graphs are rendering correctly.

2 Likes

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