sensu-plugins / sensu-plugins-cpu-checks

This plugin provides native CPU instrumentation for monitoring and metrics collection, including: CPU usage and metrics for user, nice, system, idle, iowait, irq, softirq, steal, and guest.
http://sensu-plugins.io
MIT License
13 stars 34 forks source link

metrics-cpu-pcnt-usage.rb only samples CPU usage for 1 second #10

Open nomis opened 8 years ago

nomis commented 8 years ago

metrics-cpu-pcnt-usage.rb only samples CPU usage for a 1 second period, surely this should run for at least 1-5 minutes to provide meaningful data?

nomis commented 8 years ago

It looks like it would make more sense to just return raw values (converted to seconds) which could then be interpreted by comparison with the previous reading, like the disk metrics script does.

majormoses commented 7 years ago

@lp0 well if we were sampling for 5 minutes then the check would need to have a really high interval (greater than 5 minutes) to prevent multiple from running at the same time. I generally would use the interval + occurrences to make sure that people are not being alerted with super short lived spikes.