Events are an integral part of almost everything Salt does. However, for the most part, these events are designed to be invisible and are designed to work behind the scenes to provide interprocess communication and make a complex system feel simple and friendly to the user.
We can also leverage the event system for our own purposes.
Before you learn about reacting to events or firing our own, let's inspect some of these events that are happening all the time in Salt. A Salt runner function (
state.event) is provided for this purpose.
If we run it with no arguments, it will automatically connect to the master event bus and print all events that come through that bus:
# sudo salt-run state.event
Note that if you don't see any events, the easiest way to create events is by running a job (such as
test.ping) from your master.
Here is the job I ran in one terminal window while
state.event was running in another:
# sudo salt '*' test.ping myminion: True...