Tag Archives: Perl

How to Install VMware vSphere Perl SDK on Debian 9 (stretch)

Download the latest Perl SDK for your vSphere version from code.vmware.com and copy it to the system. The download is free, but an My VMware account is required.

Make sure that your system up to date:

# apt-get update && apt-get upgrade -y

Read more »

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 »