Send events based on a script's stdout
Example Config
engines:
- script:
cmd: /some/script.py -a 1 -b 2
output: json
interval: 5
onchange: false
Script engine configs:
Script or command to execute
Any available saltstack deserializer
How often in seconds to execute the command
New in version 3006.0.
Only fire an event if the tag-specific output changes. Defaults to False.
Parse stdout of a command and generate an event
The script engine will scrap stdout of the given script and generate an event based on the presence of the 'tag' key and its value.
If there is a data obj available, that will also be fired along with the tag.
Example
Given the following json output from a script:
{ "tag" : "lots/of/tacos", "data" : { "toppings" : "cilantro" } }
This will fire the event 'lots/of/tacos' on the event bus with the data obj as is.
cmd -- The command to execute
output -- How to deserialize stdout of the script
interval -- How often to execute the script
onchange -- Only fire an event if the tag-specific output changes