Checks against projected future values #21
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Support alerting against a linear projection into the future of the time series retrieved from Graphite. E.g.
--projection 30min
means that a future value will be calculated using linear regression and that value will be offered to nagios_check for evaluation against warning/critical thresholds. The check also presents the p-value of that projection so that ops people has a chance of judging whether the alarm is the result of noisy data.Using a simple projection is superior to looking at current value in some use cases (for example disk usage) where the rate of change is relatively stable, because it saves us from having to estimate the rate of change. Instead we can just say e.g.: "Give me 6 hours advance notice on the disk filling up" and it will do this even if the rate of change varies. By comparison, the traditional value requires giving thresholds with safety margins that is estimated from the rate of change.
This PR also adds a spread of versions to the Travis build to make sure that no breakage is introduced.
This PR introduces the simple linear-regression gem to perform the linear regression calculation. The gem contributes a mere 16 kb and has no runtime dependencies.
This is PR 1 of 2. See https://github.com/burtcorp/check-graphite/pull/3/files for upcoming PR.