Closed whiteinge closed 7 years ago
See also: #11199, #8341, #8180, #7664, #6580.
I dealt with this exact limitation yesterday when trying to structure output of minions that didn't return for different reasons. An output aggregator is sorely needed.
I don't really understand how anyone is using salt in large deployments at the moment. We don't have a large deployment, it's only 8 boxes. But we have maybe up to a 500-1000 states and salt is very hard to use in a reliable manner. If there are failures one has to scroll through a large amount of output, and it is unclear how to invoke code based in changes or failures, for example to create a central log which just listed "things which failed or changed". I've raised this in a mailing list post before but ultimately didn't find much useful to go on.
@pwaller Wow! That's a lot of states!
This is a problem we're aware of and working on. I want to sit down with some of our community members sometime who manage large infrastructures, and pick their brains about their workflows with salt. My guess is that many of them are using some custom tooling to parse the large output of salt. Hopefully we can get some salt-conf talks on this subject. We also want to improve the outputter such that instead of just outputting on a per-minion basis we can output based on the complete results of the run, and get statistics that way. Maybe print a summary of all failures across all minions at the bottom of the state run, for example. Plus success/changed/failed statistics from the whole run, in addition to a per-minion basis.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
The current
--out
flag is minion-centric which means it can't be used to display summary or aggregate data. We've worked around this recently by adding additional output options to the CLI. Unfortunately this output is only available via the CLI and not at the Python-level and it is not available as structured output (e.g. JSON).I'd like to propose a new flag that uses existing outputter modules (as well as new, yet-to-be-written outputter modules) that are run once at the end.
Benefits & features:
return
key for the minion returns. This will allow us to addsummary
orfailure
or similar extra data. No need to retain backward compat since we're not modifying--out
.--format-json-arg1-arg2
or--format-json --format-json-arg1 --format-json-arg2
?