Hi,
in the past hours i am working on a script for monitoring vmware snapshots. Snapshoting is a great technique for backing up esx guests but snapshots also consume lots of storage und memory.
until now we monitor our snapshots via e-mail. at 6 AM a powershell enums all snapshots and generates a excel list which is sent by mail. this is ok but not working very well cause we are not reading our mails daily ;)
now here is a working script vor monitoring snapshot status for each guest. The Script is working fine but the prtg sensor is not going down when snapshot is older then one day. here is the tricky part
if ( $snap.Created -lt (Get-Date).AddDays( -$Age ) ) { $datework = $snap.Created -replace ":" , "-" Write-Host "2:Error - Snapshotname=" $snap.Name "; Groesse in MB = " $snap.SizeMB "; Erzeugt am= " $datework} }
in prtg the sensor always shows "up".
can someone give me a hint?
Add comment