VCHECK (DAILY REPORT)
http://www.virtu-al.net/vcheck-pluginsheaders/vcheck/
Introduction
vCheck is a PowerShell HTML framework 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.
This script picks on the key known issues and potential issues scripted as plugins for various technologies written as PowerShell scripts and reports it all in one place so all you do in the morning is check your email.
One of they key things about this report is if there is no issue in a particular place you will not receive that section in the email, for example if there are no datastores with less than 5% free space (configurable) then the disk space section in the virtual infrastructure version of this script, it will not show in the email, this ensures that you have only the information you need in front of you when you get into the office.
This script is not to be confused with an Audit script, although the reporting framework can also be used for auditing scripts too. I don’t want to remind you that you have 5 hosts and what there names are and how many CPU’s they have each and every day as you don’t want to read that kind of information unless you need it, this script will only tell you about problem areas with your infrastructure.
What’s new
vCheck has been updated to be more community driven and easier to expand, the checks have been removed and put into separate plugins which make it easier for people to contribute.
The HTML output has been reformatted to work with newer versions of Outlook.
A Setup Wizard has been added for easy setup and no more need to reference the vCenter address as a parameter of the script.
As the plugins have been moved out it makes this HTML report framework easy to adapt to other PowerShell enabled products like VMware vCD, Sharepoint, Exchange, vShield, VMware View, SQL, Active Directory and more. – please contact me if your interested to start your own using this template.
A header image has been added to the HTML report.
And much much more.
Github
All scripts are now available via Github and can be modified as part of the Github website where I will approve the changes after checking, this enables everyone to get involved and add new features fast!
It also enables people to log issues in an easy way and control when they are fixed. Please do log your issues on the site rather than a comment on my blog.
To download the script check out the below example screenshot and click the “Download Zip” for each of the versions of vCheck, download links follow in this page for each of the versions.
Download vCheck
Currently there is a vCheck report for each of the following areas:
Download Link | Github Project | Example Output Page |
vCheck for vSphere | Click here | Click here |
vCheck for Exchange 2010 | Click here | Click here |
vCheck for vCD | Click here | Coming soon |
vCheck for SCVMM | Click here | Click here |
vCD Audit script | Click here | Click here |
vCloud Air Audit | Click here | Click here |
Cisco UCS | Click here | Clone the repo and check out the Example-Report.html in root |
Now follow the video below to set up the vCheck script.
Plugins
vCheck has been designed to add output from any script (.ps1 file) in the plugins folder, each one of these will be run in numerical or alphabetical order and the output included in the vCheck report. If you are not interested in the information for one of the checks it is highly recommended you remove the file as this will make the report faster.
For a great way to manage these make sure you check out Jake’s post here, he will show you how to use PowerCLI to easily check for new plugins and plugins which you do not have installed, you can even install them in a single command.
Headers
The Header.jpg in the root of the vCheck folder will be used and displayed in the title bar of the report (unless your email client does not support embedded base64 encoded images), this can be replaced with any image file of your choice but it is advised you stick to the same length and width as the current image.
A selection of headers can be found on the Headers page of this site.
Prerequisites for vSphere version of vCheck
The following will need to be installed for you to run this script and report on your VMware environment:
- PowerShell V2
- PowerCLI 5.01 or later version
- vCenter 2.5 or later version
Configuring the script
The first time you run this script it will go through a configuration menu, this configuration will be saved and used for all future runs of the script. If you want to go back through the configuration or you add new plugins to the script then please run the script with the –config parameter as follows:
1 |
|
Output File
Some people like to save a copy of the HTML for future reference or so they can go back and see when a problem started happening, to do this use the –OutputPath parameter and specify a location where the HTML will be saved, to do this run the script as follows:
1 |
|
Running the script
The following video will show how to run the script for the first time and any subsequent runs after this:
Adjusting connection information
In some cases you will need to adjust the connection information used by the connect-viserver cmdlet to connect to your vCenter, this can be adjusted through the config wizard or if extra credentials are needed please edit the 00 Connection Plugin for vCenter.ps1 file in the 00 Initialize folder as below or use the New-VICredentialStoreItem to store connection credentials:
Before
1 |
|
After
1 |
|
Learn more
Want to learn more about the vCheck Project? Recently I spoke about it at the PowerShell Summit, you can watch the video here:
FAQ
Q. How do I add multiple Email recipients ?
A. Edit the Global Variables.ps1 file and replace the line starting $EmailTo to the following:
1 |
|
Issues or feature requests?
If you have issues when you run this script or just wish it could do something different or new, add your thoughts to the github issues section here: https://github.com/alanrenouf/vCheck-vSphere/issues?state=open
SHARE THIS:
LIKE THIS:
Loading...
899 THOUGHTS ON “VCHECK (DAILY REPORT)”
-
Gangadhar Raju
Hi All, I have requirement to run vcheck report at one time on multiple vcenters with same credentials. Please let me what need to be added or modified in vcenter connections settings.
-
Hi, thanks for your great work with the scripst.
Just a simple question the report work on the vCenter 7.0? had did tested anyone? -
Krish
Is there any updates with powercli version 12
-
Raju Banerjee
Hi Alan
That’s a great tools to get the infra health. I am using this for long time. With the current script, is there any way to get the datastore usege details irrespective of threshold. Since I am not getting any storage usage report unless its hit the threshold.-
Yes, you can adjust the script in the plugin
-
-
Hi Alan,
i am using you script since last 4 years, it’s very nice and useful.
Just one query. It is possible instead of generating the HTML output can we generate the report in word or excel format.-
any response for my query
-
In theory yes it could be adjusted to do so but it’s not planned by me so you would need to do the work
-
-
Ramesh Badam
Hi Alan, Frederic,
I have enabled ‘VMKernel warnings’ plugin and renamed the PS script file as well however I did not get the report output. Could you please advise how to enable this to get a report -
Troy Edwards
Single Storage VM’s Plugin: Trying to use a wildcard (*) for certain local datastores, but fails everytime. Thoughts?
parsing “*-INF-SPS00*” – Quantifier {x,y} following nothing.
At C:\BIN\VCHECK\Plugins\60 VM\30 Single Storage VMs.ps1:20 char:52
+ … ere-Object {$_.Name -notmatch $LDSDoNotInclude -and -not $_.summary.m …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException -
running this with powercli 6.5 R1 against vcasa 6.5 produce several errors. can you figure out what is the issue?
—————————- 1
Method invocation failed because [System.Object[]] does not contain a method named ‘op_Division’
At D:\scripts\vCheck-vSphere-master\Plugins\20 Cluster\71 Capacity Planning.ps1:38 char:7
+ $VmCpuAverage = $CluCpuUsageAvg/($cluvmlist.count)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (op_Division:String) [], RuntimeException
+ FullyQualifiedErrorId : MethodNotFound—————————————— 2
Exception calling “Add” with “2” argument(s): “Item has already been added. Key in dictionary: ‘HostSystem-host-58’
Key being added: ‘HostSystem-host-58′”
At D:\scripts\vCheck-vSphere-master\Plugins\60 VM\45 VMs needing snapshot consolidation.ps1:13 char:31
+ … ach-Object {$htabHostVersion.Add($_.MoRef,$_.config.product.version)} …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ArgumentException——————————————— 3
Get-NetworkAdapter : The input object cannot be bound to any parameters for the command either because the command
does not take pipeline input or the input and its properties do not match any of the parameters that take pipeline
input.
At D:\scripts\vCheck-vSphere-master\Plugins\60 VM\200 VMs on ephemeral portgroup.ps1:13 char:7
+ $VM | Get-NetworkAdapter | Where-Object {$_.NetworkName -contains $Ep …
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (VMware.Vim.VirtualMachine:PSObject) [Get-NetworkAdapter], ParameterBin
dingException
+ FullyQualifiedErrorId : InputObjectNotBound,VMware.VimAutomation.ViCore.Cmdlets.Commands.VirtualDevice.GetNetwor
kAdapter -
Vithoba
Hi,
i want to monitor VCSA 6.5, can you please help me out here. -
Aludden
Is it just me or is anyone having issues with the credentials.xml file being saved while running with powercli 6.5 ?
-
sokimex
So this is my 2nd run with this script and for some reason the License portion of the report is not matching what is in Web client.
-
-
Hans
Hey Alan, your suggestion for Adjusting connection information isnt working with the script version 6.25.
I guess there’s a syntax error in the line.
In your new script there is:
$VIConnection = Connect-VIServer -Server $VIServer -Port $PortSo, how is the correct syntax to fit in:
$VIConnection = Connect-VIServer $VIServer –user “AlternateUsername” –Pass “Alternatepassword” –Protocol HttpsBR
Han