Comments (5)
How about something like this where I could keep my default of 1? My arguments being most checks I have ever worked on I would prefer notification on first failure and this has been out long enough with this as the default that I don't want to break anybody's implementation by changing it.
function fatigue_check(event, occurrences = 1) {
// my defaults
// remove this var occurrences = 1; // only the first occurrence
var interval = 1800; // and every 30 minutes thereafter
var allow_resolution = true; // allow resolution events through
var suppress_flapping = true; // suppress when flapping
Where the resource would be:
{
"type": "EventFilter",
"api_version": "core/v2",
"metadata": {
"name": "fatigue_check_allow_two_failures",
"namespace": "default"
},
"spec": {
"action": "allow",
"expressions": [
"fatigue_check(event, 2)"
],
"runtime_assets": [
"fatigue-check-filter"
]
}
}
This way by using this filter you could then have this as the default for any check that has this filter assigned to its handler(s).
from sensu-go-fatigue-check-filter.
Sure, that will be an easy non-breaking change and i'll work on it this weekend. I'll wind up spending more time on the unit tests for it than the actual code.
from sensu-go-fatigue-check-filter.
Awesome, thanks mate.
from sensu-go-fatigue-check-filter.
Yes, that was exactly what I was thinking of. I didn't want to change default values in code, only have option to override them if someone wants to.
from sensu-go-fatigue-check-filter.
Done and available in version 0.6.1 and is on Bonsai.
Closed by #18
from sensu-go-fatigue-check-filter.
Related Issues (15)
- Need to properly deal with disparity of check interval and filter check interval
- Filter blocks every message random logs HOT 4
- Update docs to include bonsai integration (sensuctl asset add) in examples
- Feature request: Add support for filtering based on entity annotations HOT 2
- incorrect notification interval HOT 3
- Issues with default parameters HOT 3
- Find a way to test with Otto as well
- Ability to set defaults with annotations HOT 5
- Allow alerts which do not repeat HOT 2
- Resolution events not suppressed. HOT 5
- Alert on occurrences only when within a time window HOT 2
- Can't make fatigue filter work with proxy entities HOT 2
- Fix to work with cron scheduled checks HOT 1
- Annotations precedence convention working opposite of sdk
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sensu-go-fatigue-check-filter.