FlowState is a tool for visualising the runtime dependency graph of a Salt highstate.
It takes the json output of state.show_highstate or state.show_sls
from Salt and produces a program written in dot, which is a tool from
Graphviz for defining an acyclic graph.
States are nodes and dependencies are edges. require and require_in are blue; watch and watch_in are red.
Some examples, with the dot programs rendered as png:
The tool expects the JSON output of show_highstate or show_sls over stdin.
It outputs dot code representing the dependency graph. The dot code defines a
single digraph called “states”.
For example, if you have a salt master running:
salt 'minion1' state.show_highstate --out json | flowstateYou can write the dot output to a file, or pipe it further into the `dot` tool from GraphViz. In this example, we produce a png called `output.png`:
salt 'minion*' state.show_highstate --out json \
| flowstate \
| dot -Tpng -o output.pngThe tool currently only supports rendering the output from one minion. If you give it output with two minions, it’ll report an error.
Install directly from PyPi:
pip install flowstateOr clone this repository and use setup.py:
python setup.py installUnfortunately, the version of the pydot package in PyPi doesn’t work in
Python 2.7+. We’re working on getting this up to date. In the meantime, please
use this fork to install the `pydot` package first:
https://github.com/nlhepler/pydot
Most operating systems have a package for it, usually as part of GraphViz.
- Debian / Ubuntu
apt-get install graphviz - OSX with homebrew
brew install graphviz
- FlowState is forked from the salt-state-graph project by @ceralena.

