Icinga / icinga-powershell-plugins

A collection of Windows check plugins for the Icinga PowerShell Framework
GNU General Public License v2.0
51 stars 28 forks source link

CPU _total perfdata on one core should be the same #120

Closed mkayontour closed 2 weeks ago

mkayontour commented 3 years ago

Maybe I don't understand it right, but should be the _total of one core also be the same value?

'/usr/lib64/nagios/plugins/check_by_powershell' '--icingacmd' 'Invoke-IcingaCheckCPU -Core *' '--password' 'x' '--user' 'x' '-H' '192.168.x' '-p' '5985' '--no-tls'
[OK] Check package "CPU Load"
| 'core_0'=40.65101%;;;0;100 'core_total'=15.64072%;;;0;100
LordHepipud commented 3 years ago

Yes the values should be equal. I will have a look on this in which scenario the values might be different. Maybe there was a peak between fetching the values, as each value is fetched individually and read directly from the Performance Counter library.

mkayontour commented 3 years ago

Ok, then I understand. And yes, there is a peak but exactly at the time where I execute the check, so I guess the actual core 1 value should be fetched maybe from the same source as the total?

Nevertheless, thanks for helping! :)

LordHepipud commented 3 years ago

The issue here is that both values are already fetched from the same source, but because of some initialsation delays for loading the counters there might be an offset taking place. I will try to find a solution for this.

LordHepipud commented 2 weeks ago

This has already been fixed in current versions of the plugin.