Creating multiple proxy entities from a single check

Hi,

we are using Sensu in a setup where all our metrics are stored in an InfluxDB2 and we query that influxdb to generate events. We run those queries through checks configured on a sensu agent.

A common use-case is that a single query can determine events for multiple proxy entities and running a query for every proxy entity would be wasteful. Unfortunately we could not figure out how to express this in sensu. A single check run can not generate multiple events for different entities or an event cannot belong to multiple proxy entities.

Is there another way to get this behavior?

Regards
Philipp

a quick thought would be to use a script, to parse out the data pulled from your influx query into seperate objects (dictionaries, json bodies etc…) Then in the script, loop through the objects and make api calls to sensu backend to create the events, instead of having a check run the script

@jtenzer Yes, we used to run our checks as influx tasks and used the API to report events. This works poorly because events created via the API lack almost all useful information (timestamps, first issued etc.) so we quickly abandoned it.