How to Track Script Execution and Exit Status?
Asked by
CuriousCat42
I'm managing multiple scripts across various systems and I'm on the lookout for a tool, preferably open-source, that can help me monitor the run status of these scripts—specifically whether they ran successfully or encountered any errors based on their exit codes. Ideally, I'd like to set up a server that allows me to make REST API calls to log whether a script executed and what its outcome was. A dashboard for easy viewing of this information would be fantastic! For context, my scripts are primarily running on Windows servers, but I also have a bunch of Linux servers with various open-source utilities. Currently, I'm handling reporting through email, but that's becoming a bit overwhelming.
Answers
Don't forget about Jenkins! It's widely used and can track script execution as well.
Reply to this answer
My company didn't want to invest in software, so to keep things simple, I made my script update a number in a single-column Excel sheet. One column tracks the status, and another logs the exit codes.
Reply to this answer
Have you considered using Nagios Core? It's good for this kind of thing, especially with the NRDP. You can send XML data with the exit codes and visualize it through graphs.
Reply to this answer
I usually log outputs to files and then use PowerBI to visualize everything nicely. You might also want to check out Grafana; it can do a similar job and help you track metrics.
Reply to this answer
I'm in the process of using Azure Log Analytics for my PowerShell scripts. It's a paid option, charging about $2-$3 per GB of data, but it can handle quite a bit in terms of metrics. You would need a fair amount of data to hit a GB, though.
Reply to this answer
We use VisualCron at my workplace. It includes all the functionality you’re looking for and seems to be a solid solution for tracking.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions