Check occurences

Ok so we are in the process of migrating from sensu-core to sensu-go.

With the old check implementation we had the possibility to set occurrences for a specific check. On some checks you might want to reduce the number of irelevant alerts, eg for load.

For that reason we increased occurrences for some checks. Is there some way to do the same in sensu-go?

Welcome @dhpower!

Since all check results are now events in Sensu Go, a simple way to achieve this is to apply a filter to your handlers that would discard events with an occurrences number below a given threshold, e.g.:

You could then get creative and have this filter only target checks that have a specific label if you don’t want it applying on all checks etc.

Let us know if you any other questions!

Hi @dhpower, you might also consider looking at This makes creating an occurrence filter a bit easier, as occurrence would be handled through annotations.

1 Like