Can we get events related to specific check in sensu-go?

I was trying to get events related to a specific sensu check using curl i.e., all the events related to specific sensu check on all entities.
But as per the documentation, it seems like there is no way to do so. But, I found a way to get for specific entity and check but not for a check alone.
Please help me how to get events related to specific check.


I believe you can use the field selector commercial feature with curl when using the official sensu-backend binaries to get the behavior you want by filtering on the field ‘’.

Here’s an example using an Sensu API key that will give me all events matching the check name ‘keepalive’

curl -H "Authorization: Key $SENSU_API_KEY" -G --data-urlencode ' == "keepalive"'

You can combine field selector expressions, for example I can get all keepalive events outside of default namespace thusly:

curl -H "Authorization: Key $SENSU_API_KEY" -G --data-urlencode ' == "keepalive && event.namespace != "default""'

Field selectors are covered here:

With selectors, you should be able to do some good selections.

As a note, last time I drilled into this the selector is a string match. This means you can’t filter based on integer comparisons (e.g. “event.check.status >= 1” to be either in warning or in critical – so you’ll need to use inequalities, ‘notin’ to form some of your queries).

We have a similar use case where we an external systemd wanted to see if a particular check was failing and not silenced. Similar to Jef’s examples above.

curl -sS -G \
  -H "Authorization: Key $SENSU_API_KEY" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \ --data-urlencode 'fieldSelector=event.check.status == "2" && event.is_silenced == "false" && == "prod-tax-heartbeat-alert"'