sensu / sensu-go-fatigue-check-filter

An event filter for Sensu Go for managing alert fatigue
MIT License
6 stars 8 forks source link

Ability to set defaults with annotations #23

Closed ichilton closed 4 years ago

ichilton commented 4 years ago

The filter defaults are hard coded and the only way of overriding these are with annotations on all entities or all checks if the default values are not desired.

This feature request is for the fatigue filter to accept annotations on the filter itself, to provide the ability to have custom defaults (which can then be overridden with annotations on a specific entity or check if required).

Thanks,

Ian

nixwiz commented 4 years ago

Within the past week I added the following.

https://github.com/nixwiz/sensu-go-fatigue-check-filter#arguments

Does this not accomplish what you are looking for?

ichilton commented 4 years ago

Actually, looking at the code, the definition of the method is:

function fatigue_check(event, occurrences, interval) {

So you can actually call the filter as follows to do 2 occurrences:

fatigue_check(event, 2)

Would be good to make this more obvious in the documentation that this is a the way to override some of the defaults (occurrences and interval).

It still would be nice to be able to set annotations to be able to override everything though.

ichilton commented 4 years ago

Snap! - yes, sorry, I just spotted that! - that's great - though it would be useful to be able to do annotations to override everything and be consistent with other assets.

nixwiz commented 4 years ago

@ichilton is this issue okay to close now?

ichilton commented 4 years ago

Yep, will do!

Thanks.