Single or multiple recurring scripts on a policy

I’m just curious as to what others are doing with their recurring monitoring scripts. Currently, I have a few PowerShell scripts I use for daily monitoring of certain things (like Veeam backups) attached to various policies I have. For example, I have one called “Windows Workstation Monitoring” attached to a policy that does its thing every morning at 6AM. I was thinking that as I add things to monitor to that script, it will grow to be quite large. I was wondering if it would be better to split each monitored item into it’s own script file to attach to my policy.

How are you doing it? Have you found a method that works best?

one script for each item. I’d perhaps consider having one monster daily monitoring script, but the larger the script gets and the more unrelated stuff it does the harder it is to re-use and troubleshoot.

Do you have any issues with Syncro not running the individual scripts (or some of them)? I’m thinking of the issue many of us had back in December with random recurring scripts not firing.

I currently have my script organized into functions, so it would be very easy to break it out into individual files.

Interesting question, is it safer to do a cross country flight in a single engine airplane or in a 4-engine airplane that can safely fly on 2? The 4-engine airplane has 4 times the chances of an engine failure but is less than half as likely to be unable to fly.

So with scripts if you have some intermittent number of scripts failing to run, if you only one 1 monitor script either it runs or it doesn’t. If you have that one broken into several you might still get some visibility into the asset and just be missing some metrics, unfortunately there is no good way to monitor script runs in Syncro to know if scripts are failing to schedule so I really can’t tell you if I had better or worse visibility when scripts were failing than if they had all been in one big script. My perspective is that that is not the point, because I’m not planning for Syncro to have a random failure rate. I plan for making scripts maintainable and making sure I can find and fix errors quickly, and if Syncro is failing to run some % of the time I open a ticket and they fix it.

I separate them based on function and how often they need to run. So things that apply to only certain types of devices are typically separate. Things that are more one-time or in certain circumstances tasks I will have them separate. For things that apply to most/all devices and are simple I’d be more inclined to have several in one script as long as they need to run at similar intervals. The more scripts and recurrences you have the more it clogs up the activity history.

1 Like