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.
This enables to set a cache file that will be used to save the last execution of the acuire_cpu_stats, removing the need for sleeping for a period of time to get accurate results.
At the next check execution, the acquired cpu data is compared to the cached file, thus the effective period of time is the same as the check interval.
Sleeping causes problems when restarting the sensu-client, if the sleep time is over 10 seconds (the timeout to wait for the service to stop).
Pull Request Checklist
Is this in reference to an existing issue?
General
[ ] Update Changelog following the conventions laid out on Keep A Changelog
[ ] Update README with any necessary configuration snippets
[ ] Binstubs are created if needed
[ ] RuboCop passes
[ ] Existing tests pass
New Plugins
[ ] Tests
[ ] Add the plugin to the README
[ ] Does it have a complete header as outlined here
This enables to set a cache file that will be used to save the last execution of the acuire_cpu_stats, removing the need for sleeping for a period of time to get accurate results. At the next check execution, the acquired cpu data is compared to the cached file, thus the effective period of time is the same as the check interval.
Sleeping causes problems when restarting the sensu-client, if the sleep time is over 10 seconds (the timeout to wait for the service to stop).
Pull Request Checklist
Is this in reference to an existing issue?
General
[ ] Update Changelog following the conventions laid out on Keep A Changelog
[ ] Update README with any necessary configuration snippets
[ ] Binstubs are created if needed
[ ] RuboCop passes
[ ] Existing tests pass
New Plugins
[ ] Tests
[ ] Add the plugin to the README
[ ] Does it have a complete header as outlined here
Purpose
Known Compatablity Issues