Nagios Check: VMware Virtual Machine Snapshot Age

As you might know it is a VMware best practice to keep snapshots for more than 24-72 hours. To monitor aged snapshots using Nagios i created a perl script that checks the whole vCenter for snapshots. The script throws a warning because i think this is still not a critical event. You can easily change the behavior by changing the exit code to 2.

I set the allowed age to 3 days, based on VMware  KB1025279. You can change the maximum allowed age to whatever you want by changing the subroutine check_age.

You can use this script as source for Nagios. There is also a multiple line output which allows you to see the virtual machine that caused the warning event.Read More »Nagios Check: VMware Virtual Machine Snapshot Age