Most common automation requests and how to solve them: Ep 2

This is the second part of my new series where I answer common automation questions from our partners. Today I’m going to look at monitoring backups.

I’m creating backups of my network devices on that server and I’d like to monitor if the backup was saved locally. How do I do that?

While talking to this partner, I learned he backed up config files to a different folder for each device, and he wanted to monitor each folder individually. The basic premise was that, if there was no file written in the past 30 hours, the most recent backup had likely failed. If that happened, he wanted to receive an alert.

To do this, we created this automation policy. You can find it here in the Automation Cookbook.

The policy looks in a folder setup as an input parameter and then checks for the newest file. It checks that file for its age, and if it’s more than the preset number of hours old, it triggers an alert in SolarWinds® RMM. A version of the script for SolarWinds N-central® exists here.

If you want to go a bit further, you can modify the script to check for file count, file size, content, etc. You can do this either via native objects or, if you prefer, through a PowerShell script. Whichever way you want to do it, you can enhance this basic example to fit your needs.

That’s all for this week. Feel free to reach out to me if you want to discuss this further; my contact details are below.

 

This example and others to come are things you can do with automation within your platform. We provide the scripts as part of the Automation Cookbook and hope you will find them useful. If you have scripts you want to contribute to the cookbook, you can go to www.solarwindsmsp.com/cookbook and click the upload button there, or you can email me directly at [email protected].

 

Marc-Andre Tanguay is head automation nerd at SolarWinds MSP. You can follow him on Twitter at @automation_nerd.