VCHECK (DAILY REPORT) &VCHECK(每日报告)

357 篇文章 146 订阅
81 篇文章 2 订阅

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 LinkGithub ProjectExample Output Page
vCheck for vSphereClick hereClick here
vCheck for Exchange 2010Click hereClick here
vCheck for vCDClick hereComing soon
vCheck for SCVMMClick hereClick here
vCD Audit scriptClick hereClick here
vCloud Air AuditClick hereClick here
Cisco UCSClick hereClone 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

.\vCheck.ps1 –config

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

.\vCheck.ps1 –OutputPath C:\vCheckOutput\DailyReports

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

$VIConnection = Connect-VIServer $VIServer

After

1

$VIConnection = Connect-VIServer $VIServer –user “AlternateUsername” –Pass “Alternatepassword” –Protocol Https

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

$EmailTo ="user01@example.com,user02@example.com"

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

-Alan

SHARE THIS:

LIKE THIS:

Loading...

899 THOUGHTS ON “VCHECK (DAILY REPORT)”

  1. Gangadhar Raju

    DECEMBER 17, 2020 AT 06:14

    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.

    REPLY

  2. chardros

    NOVEMBER 12, 2020 AT 05:59

    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?

    REPLY

  3. Krish

    NOVEMBER 1, 2020 AT 11:14

    Is there any updates with powercli version 12

    REPLY

  4. Raju Banerjee

    JULY 20, 2020 AT 10:28

    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.

    REPLY

    1. Alan

      JULY 20, 2020 AT 15:31

      Yes, you can adjust the script in the plugin

      REPLY

  5. nizamuddin

    MAY 6, 2020 AT 08:20

    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.

    REPLY

    1. nizamuddin

      MAY 8, 2020 AT 08:32

      any response for my query

      REPLY

    2. Alan

      MAY 8, 2020 AT 17:30

      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

      REPLY

  6. Ramesh Badam

    MARCH 13, 2020 AT 12:16

    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

    REPLY

  7. Troy Edwards

    MAY 3, 2019 AT 08:48

    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

    REPLY

  8. Troy

    JANUARY 6, 2019 AT 00:10

    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

    REPLY

  9. Vithoba

    DECEMBER 11, 2018 AT 08:03

    Hi,
    i want to monitor VCSA 6.5, can you please help me out here.

    REPLY

  10. Aludden

    MAY 2, 2018 AT 08:03

    Is it just me or is anyone having issues with the credentials.xml file being saved while running with powercli 6.5 ?

    REPLY

    1. sokimex

      SEPTEMBER 27, 2018 AT 14:59

      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.

      REPLY

  11. Hans

    JANUARY 19, 2018 AT 02:47

    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 $Port

    So, how is the correct syntax to fit in:
    $VIConnection = Connect-VIServer $VIServer –user “AlternateUsername” –Pass “Alternatepassword” –Protocol Https

    BR
    Han

    REPLY

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值