vCheck (Daily Report) in VCenter


vCheck is a vCenter checking script, the script is designed to run as a scheduled task before you get into the office to present you with key information via an email directly to your inbox in a nice easily readable format.

The following items are checked for by default but these can be disabled individually to make the script run faster and remove unwanted items from the report, see “Configuring the script” below for details.

  • General Details
    • Number of Hosts
    • Number of VMs
    • Number of Templates
    • Number of Clusters
    • Number of Datastores
    • Number of Active VMs
    • Number of Inactive VMs
    • Number of DRS Migrations for the last days
  • Snapshots over x Days old
  • Datastores with less than x% free space
  • VMs created over the last x days
  • VMs removed over the last x days
  • VMs with No Tools
  • VMs with CD-Roms connected
  • VMs with Floppy Drives Connected
  • VMs with CPU ready over x%
  • VMs with over x amount of vCPUs
  • List of DRS Migrations
  • Hosts in Maintenance Mode
  • Hosts in disconnected state
  • NTP Server check for a given NTP Name
  • NTP Service check
  • vmkernel warning messages ov the last x days
  • VC Error Events over the last x days
  • VC Windows Event Log Errors for the last x days with VMware in the details
  • VC VMware Service details
  • VMs stored on datastores attached to only one host
  • VM active alerts
  • Cluster Active Alerts
  • If HA Cluster is set to use host datastore for swapfile, check the host has a swapfile location set
  • Host active Alerts
  • Dead SCSI Luns
  • VMs with over x amount of vCPUs
  • vSphere check: Slot Sizes
  • vSphere check: Outdated VM Hardware (Less than V7)
  • VMs in Inconsistent folders (the name of the folder is not the same as the name)
  • VMs with high CPU usage
  • Guest disk size check
  • Host over committing memory check
  • VM Swap and Ballooning
  • ESXi hosts without Lockdown enabled
  • ESXi hosts with unsupported mode enabled
  • General Capacity information based on CPU/MEM usage of the VMs
  • vSwitch free ports
  • Disk over commit check
  • Host configuration issues
  • VCB Garbage (left snapshots)
  • HA VM restarts and resets
  • Inaccessible VMs

Prerequisites

The following will need to be installed for you to run this script:

  • PowerShell V2
  • PowerCLU 4.0 U1 or later version
  • vCenter 2.5 or later version

 

Changing the email information

Just after the comments you will find the following information:

view sourceprint?1 # You can change the following defaults by altering the below settings: #

2 # Set  the SMTP Server address $SMTPSRV = “mysmtpserver.mydomain.local”

3 # Set the Email  address to recieve from

4 $EmailFrom = “me@mydomain.local”

5 # Set the Email address  to send the email to

6 $EmailTo = “me@mydomain.local”
If you wish to add multiple recipients then change the $EmailTo to the following:

view sourceprint?
1 $EmailTo = “user@domain.com,user2@domain.com”

An example is setting the ntp server, to do this change the current setting to match your configuration:

Before

view sourceprint?
1 # The NTP server to check

2 $ntpserver = “pool.ntp.org”
After

view sourceprint?
1 # The NTP server to check

2 $ntpserver = “ntp.mycompany.mydomainname.internal”

Running the script

.\vCheck5.ps1 vCenter01

Note: You should have vcenter powercli or quest power gui to run the script.

Script download link : http://www.virtu-al.net/?wpdmact=process&did=Ny5ob3RsaW5r

or http://www.4shared.com/file/PfgZqfme/vCheck5.html

 

 

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: