Wednesday, September 8, 2010

Check Snapshot on VMware

Check Snapshot on VMware

To find the snapshot on the VMware ESX host use the below script . I found this on Nagios Exchange :


Add the following to your ESX server in the /etc/snmp/snmpd.conf and restart the snmpd deamon
exec .1.3.6.1.4.1.6876.99999.2 snapshots /etc/snmp/snapshots.sh


snapshot.sh should contains these lines.
#!/bin/sh
/usr/bin/find /vmfs/volumes/ -name '*delta*.vmdk' -printf %f' '%s'\n'

make sure it's executable by using the following command
chmod a+x /etc/snmp/snapshots.sh

Add a datastore in zenoss of snmp type and call this from there :

snmpwalk -v 2c -c $community $device .1.3.6.1.4.1.6876.99999.2.101 |\
grep vmdk | awk {' print $4,$5 '} |\
sed 's/ /_size:/g' | sed 's/\"//g'`

No comments:

Post a Comment