Quote from the docs: “In Sensu Go, the occurrences attribute is not part of the check definition like it was in Sensu Core”. Okay, what’s the equivalent in Sensu Go?
I have a proxy check with:
spec: command: http-check --url https://foo.bar interval: 10 timeout: 9 proxy_entity_name: my-site publish: true round_robin: true handlers: - slack
I have this filter:
--- type: EventFilter api_version: core/v2 metadata: name: ignore_1_failure spec: action: deny expressions: - event.check.occurrences == 1 && event.check.state == 'failing' runtime_assets: 
Which is then used by the handler:
--- api_version: core/v2 type: Handler metadata: name: slack spec: type: pipe command: sensu-slack-handler --channel '#sensu-test' --username 'sensu-test' env_vars: - SLACK_WEBHOOK_URL=https://hooks.slack.com/services/XXXXXXXXXXXXXXX filters: - is_incident - not_silenced - state_change_only - ignore_1_failure runtime_assets: - sensu-slack-handler timeout: 10
But when the check is restored, the status:resolved notification is still pushed. Also, because of state_change_only, I actually lose the failure notifications.
What was a trivial setting in the old Sensu became much more convoluted in the new one.