Sensor Events Routing
Important
🚨 If you define the filter format incorrectly, you won’t get any reaction and the event will be ignored. Additionally, no logging will be emitted unless your system is running in debug mode.
A sensor event is a single positional string, delimited by |:
sensor-id|listener|action[@specifier]|exit-code
Where:
sensor-idis the ID of the sensor that emitted the event (e.g.,my-tmp-dir— a check you run)listeneris the listener ID that processed the sensor (e.g.,sys.filesystem— the sensor plugin that runs the check)actionis the action the sensor emits. For example, forsys.filesystemlistener, the action is the event type likecreated,changed,deletedspecifieris an optional part that can be used to further specify the event details, like a specific file path or a glob pattern. For example,created@/tmp/$.exit-codeis always0for sensor events, since they don’t have a return code like actions do
An event routing is essentially defined like this:
sensors:
tmp-watch:
...
events:
tmp-watch|some-sensor|result-action|0:
...
Each segment can be wildcarded using $.
Example: tmp-watch|sys.filesystem|$|0
Events for sensors are defined with the following synopsis:
events:
<sensor-id>|<listener>|action[@specifier]|0:
handlers:
- handler-id
- handler-id
- ...
handler-id:
# handler configuration
...
Each event handler has its own configuration. Please refer to the documentation of each handler for more details on how to set them up and use them effectively.