Does Salt have the equivalent of Puppet's last_run_summary.yaml? If not, what's the suggested way to monitor the success or failure of executions on individual salt minions?
Asked
Active
Viewed 70 times
2 Answers
1
I think I found a reasonable way to get this information written to the file system.
We can modify the minion config (on Linux I believe the default location is /etc/salt/minion
) to add:
returners: rawfile_json
This will result in one JSON object per line being logged. Documented here. The default output file location for this is /var/log/salt/events
.
The JSON object has fields which we can use:
retcode
, success
, and fun
(the function name). In my case I want to filter for fun = "state.apply"
.

user162988
- 13
- 5
0
I think you can use the jobs.exit_success command to do so
The only thing is you need to retrieve the job_id first
salt-run jobs.list_jobs
salt-run jobs.exit_success <jobid>

agm650
- 36
- 4