bosun-monitor / bosun

Time Series Alerting Framework
http://bosun.org
MIT License
3.4k stars 494 forks source link

[CLOSED] Get Cpu Usage percentage stats #505

Closed maddyblue closed 9 years ago

maddyblue commented 9 years ago

Issue by pranavparuchuri Wednesday Oct 15, 2014 at 05:26 GMT Originally opened as https://github.com/bosun-monitor/scollector/issues/79


cpu idle percentage I am trying to get cpu usage percentage stats so i tried win.cpu metric but all the values are in trillions.I tried win.cpu.load metric this worked on windows 7 but on windows 2012 server all metrics in the function c_cpu_info_windows are missing there was some error in the wmi query i tried to debug it but couldn't get the error.Any guidance would be appreciated.

maddyblue commented 9 years ago

Comment by mjibson Wednesday Oct 15, 2014 at 06:21 GMT


Try the os.cpu metric.

maddyblue commented 9 years ago

Comment by mjibson Wednesday Oct 15, 2014 at 06:22 GMT


And a screenshot of the WMI error would be useful, too.

maddyblue commented 9 years ago

Comment by pranavparuchuri Wednesday Oct 15, 2014 at 07:14 GMT


Thanks for your response. I tried the os.cpu metric already that was also a very large value. os.cpu 1413356998 1305781044913 host=pranav-pc I debugged the earlier error it was due to the presence of CurrentVoltage in Win32_Processor.We were running it in aws so that was an issue once i removed it win.cpu.load was working fine.

maddyblue commented 9 years ago

Comment by mjibson Wednesday Oct 15, 2014 at 07:17 GMT


When graphed as a counter it'll show you percent used per second. Something like sum:rate{counter,,1}:os.cpu{host=*}

screen shot 2014-10-15 at 3 15 49 am

maddyblue commented 9 years ago

Comment by mjibson Wednesday Oct 15, 2014 at 07:20 GMT


Ok. I've opened #80 to try to fix that problem, too. I think it's an easy fix but need to test.

maddyblue commented 9 years ago

Comment by pranavparuchuri Wednesday Oct 15, 2014 at 08:04 GMT


That fixed the issue thanks for your help.