Helices
Helices

Reputation: 19

How to know which minions failed to execute a Salt state

suppose I am running:

salt '*' state.highstate 

over a great number of minions.

I get some output for each of them with information about the statuses run and a short summary at the end (succeded, failed, total).

My problem is that, since output is so large, I am unable to tell at a glance if any of the minions failed on some statuses. I could of course redirect the output to a text file and search it or grep it but I would really appreciate some kind of "gross summary" at the end of every execution that told me how many and which nodes failed.

Is there any way to do that that I have been overlooking? I haven't been able to find anything on the Internet.

Thanks and regards.

Upvotes: 1

Views: 1460

Answers (1)

Utah_Dave
Utah_Dave

Reputation: 4581

You have a few options that might give you the type of output you want.

First, if you add a -v to your command you'll get more info on which minions didn't respond, etc.

Second, in your master config try setting state_output: mixed. This will give you a short one-liner for states that were successful, and the full output for states that failed. This should make it a bit easier to find the failed states.

Third, in your master config set state_verbose: False and that will cause Salt to only display failed states.

Upvotes: 2

Related Questions