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?
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:
This will result in one JSON object per line being logged. Documented here. The default output file location for this is
The JSON object has fields which we can use:
fun (the function name). In my case I want to filter for
fun = "state.apply".
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>