Search code examples
command-line-interfaceprovisioningsalt-projectorchestration

Filtering SaltStack output


When running commands on lots of salt minions, it can be difficult to properly make sense of the output. What we usually do was

salt '*somefilter*' state.apply some.thing

Now, if there are 50 guests and a few have a problem, this can get lost in the commandline output.

Is there a way to filter the output to only get feedback about failed states? Or in general a better way to 'parse' the output (as a human) than scrollback a huge buffer?


Solution

  • We use the following alias for salt to get less output: alias salt='salt --state-output=mixed --state-verbose=False' - on 50 minions it is still not a breeze to read the output - but it is a bit better than the full response.

    Read more about the options in the cli docs and the highstate docs.