Identifying and working with Salt event types
To work with Salt events, one of the most important aspects is to identify the type of Salt event. In this recipe, we will look at some of the Salt event types and how we can identify and work with them.
How to do it...
- A preconfigured Python script is available to listen to Salt events continuously. Download the file from the following location on the Salt master and run it using the Python command:
[root@salt-master ~]# wget https://raw.github.com/saltstack/salt/develop/tests/eventlisten.py [root@salt-master ~]# python eventlisten.py
- Configure a new minion and start the
salt-minion
service daemon on the minion. - Observe the events being captured on the Salt master; there should be outputs as follows: ...
Get Salt Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.