ifixit / alertinator Goto Github PK
View Code? Open in Web Editor NEWSimplistic team-based alerting through email, sms and phone calls.
Home Page: http://alertinator.readthedocs.org/
License: Other
Simplistic team-based alerting through email, sms and phone calls.
Home Page: http://alertinator.readthedocs.org/
License: Other
We need a system so that a consistently failing condition does not trigger an alert every time it is ran.
If we are checking for error conditions and triggering alerts every 5 minutes, we do not necessarily want to receive the exact same alert every 5 minutes.
It needs to support:
Imagined Interface as exposed to the rest of the system:
// Returns [(bool)$shouldAlert, $firstAlertTimestamp];
// $shouldAlert is true if an alert should be sent.
// $firstAlertTimestamp is the unix timestamp of the first
// occurrence of successive failures (or null if that info
// is unavailable).
//
// @param $isFailing -- bool indicating if the check is currently failing
// @param $level -- string identifying alert level
// @param $checkFunction -- string identifying check function
protected function shouldAlert($isFailing, $level, $checkFunction);
The default implementation will be simply return [$isFailing, null]
.
If $shouldAlert
is true, the caller of this function will format a nice message using the $firstAlertTimestamp
; something like "$alertMessage -- sustained for 30 minutes".
This code should live in a PHP Trait (the default implementation can be in the main class) so this trait can be included in a subclass if the user wants to utilize it.
There should be some unit tests to ensure it operates as expected.
Unwittingly, I designed Alertinator to use a subset of syslog's severity levels (defined in rfc5424). It seems reasonable to support the full set.
It does seem like perhaps a bit much, though - not only will users need to determine which alert level is appropriate, but it makes user config more complex, particularly since we don't have a good way of specifying "this level and up".
The all-clear notice gets called out to people. People don't like that.
Add an "all-clear" group to send messages to so users can determine where to send the all-clear, and then default to prior behavior in the absence of the all-clear group.
Right now you have to piece together the quick look and the API docs to figure out how to write an alert. We also don't at all cover manual triggering (throwing an AlertinatorException
from inside other code).
Is there a good reason to use a Python-y doc format for a PHP project on github? Markdown seems like the natural choice.
"Threshold of 0 reached ..." Is pretty useless as far as an alert title goes.
Let's get the message in there earlier:
No request stats recorded since ...
There are a number of pieces of data:
Not sure exactly how those should be arranged, but the current behavior is pretty wonky.
We hardcode USA, Let's make numbers internationalize-able
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.