fleetdm / fleet

Open-source platform for IT, security, and infrastructure teams. (Linux, macOS, Chrome, Windows, cloud, data center)
https://fleetdm.com
Other
2.98k stars 413 forks source link

Add real-time logging of script execution #19583

Open glacieryc opened 3 months ago

glacieryc commented 3 months ago

Problem

We often encounter situations where scripts can run longer than they should. For example, we run a script that installs chrome on an employee's laptop. This script sometimes runs for 2 minutes, sometimes for 10 minutes. It is impossible to understand what is happening, because the result of the script execution comes only after it is executed or after the timeout is over. We would like to see real-time what happens when the script is executed

noahtalerman commented 3 months ago

@glacieryc make sense.

Let's say Fleet adds a real-time feed of the script execution. What does this enable you to do?

For example, I imagine if a script is taking longer than expected, you might cancel it, and try again.

glacieryc commented 3 months ago

This will help us understand if the script is running and if we should take any action. For example, as you said, perhaps if the script is stuck it is worth canceling the script and starting over. Or, on the contrary, the script is running and we should just wait.