ansible / awx

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is one of the upstream projects for Red Hat Ansible Automation Platform.
Other
14.02k stars 3.42k forks source link

Job results as matrix/table #8814

Open jplitza opened 3 years ago

jplitza commented 3 years ago
ISSUE TYPE
SUMMARY

Especially when using non-serial strategy plugins (like host_pinned), the stdout view of a Job is totally useless with many hosts.

I would prefer having a table view of tasks vs. hosts with colored table cells: grafik

That actually is a screenshot of some JS that I hacked together as an external HTML page. Would something like that as a PR be integrated into AWX itself?

wenottingham commented 3 years ago

From a look, that would not necessarily scale to 100s of tasks, or 1000s of hosts. The stdout view also doesn't really, but I would be curious what could be constructed here that has a chance of handling that.

jplitza commented 3 years ago

Do you mean visually or performance-wise?

Visually, I had already implemented grouping tasks by role and making roles collapsible (but had to remove the functionality again because of #8810). But in the host-dimension, there's not much one can do, except for maybe filtering out unreachables on demand, or maybe group hosts with identical columns. Also, one can always transpose the table if that produces a better fit.

Peformance-wise, the script currently scrapes almost all runner_* job_events, resulting in at least "# of tasks × # of hosts" result sets. With ~400 hosts and ~20 tasks, it already takes ~30 seconds to load all that data from the API (also because there is no way to filter what data the API returns, giving us all kind of information we do not need). The visualization in the browser doesn't seem to be a problem, however.

All in all, I understand your argument that AWX wants to handle huge environments well, but currently the output IMO doesn't even scale to mid-size environments, so this could be a real improvement.

piroux commented 3 years ago

I have less than 100 servers to manage and I am highly interested in this visualization. Indeed, this seems to be undeniably a more thorough overview of tasks results on a single screen, digging a big deeper than the final stats metrics available at the end of the playbook.

Maybe it could be available as an opt-in, so only after activating it in the settings, and/or only if there are less than K hosts for an inventory ?

jplitza commented 3 years ago

So the performance of the API for large jobs seems to be abysmal (or I'm using it wrong): #8883

jplitza commented 12 months ago

The API performance improved in the last 3 years. I polished the code a little bit, added filtering and released it here: https://github.com/PLUTEX/awx-matrix Using it with ~10k events (so e.g. 40 tasks on 250 hosts) still takes considerable time to load, but it works.