GabCava
Enthusiast
Enthusiast

[vcheck] vCheck for multiple vCenter servers

Jump to solution

Hello I have a small problem and I ran out of ideas with my troubleshooting.

I have implemented vCheck reporting for multiple vCenter servers. No email sent, the outputs go to an IIS folder and I view the reports first thing in the morning.

vCheck uses a customised globalvariable.ps1 as well as an xml file (to  list plugins) for each venter server. Then I scheduled everything in the windows task scheduler, precisely a task scheduled for  each vcenter server report. Basically vcheck calls the appropriate plugin-VC1.xml file for vcenter VC1, which calls then for a dedicated globalvariables-VC1.ps1. All works fine. Each morning I get the reports.

Now, I added a new plugin. As per readme file the new plugin is properly formatted. It is laid out in the right folder and it is recognized by the selectplugin.ps1. This plugin works and if vcheck is run manually I get prompted for entering the value for it and the report that comes out includes it. Unfortunately this new plugin is not included in the scheduled reports and I cannot  figure out why!!! I confirm that I added the plugin in the list of each plugin-VCx.xml file..

Anyone incurred into something  like this??

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership

Just to confirm, you set this up just like I described in Re: run vCheck for mutliple VC ?

Perhaps a screenshot of plugin 00, the XML file and the command you use to run vCheck might help us to determine where it might go wrong.

And perhaps the content of new plugin.

If you replace the content of that new plugin with the content of an existing plugin, does it then get run?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
2 Replies
LucD
Leadership
Leadership

Just to confirm, you set this up just like I described in Re: run vCheck for mutliple VC ?

Perhaps a screenshot of plugin 00, the XML file and the command you use to run vCheck might help us to determine where it might go wrong.

And perhaps the content of new plugin.

If you replace the content of that new plugin with the content of an existing plugin, does it then get run?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
GabCava
Enthusiast
Enthusiast

sometimes I get so into a problem that I forget some basic troubleshooting steps! I replaced the new plugin content with a simple script and it worked. Thanks again Luc!

The new plugin contains a function that I loaded in the ISE profile that I normally use every day but it's not used by the scripts that run scheduled, so I created the $profile.ps1 and added the  function there...and it worked!

and no... I don't use the 00 plugin to call the vcenter servers actually I set the 00 plugin NOT to call anything..

$Title = "Connection settings for vCenter"

$Author = "Alan Renouf"

$PluginVersion = 1.20

$Header = "Connection Settings"

$Comments = "Connection Plugin for connecting to vSphere"

$Display = "None"

$PluginCategory = "vSphere"

# Start of Settings

# Please Specify the address (and optional port) of the vCenter server to connect to [servername(:port)]

#$Server = ""

# End of Settings

I instead created a global-variables-VCx.ps1 file for each vcenter server and edited it like this:

# Set the following to true to enable the setup wizard for first time run

$SetupWizard = $False

$Server = "VC1"

$diskformat = "thin"

$OverAllocation = 100

then the vcheck.ps1 invoke the right plugin-VC1.xml file which calls that global-variables-VC1.ps1

<vCheck>

  <globalVariables>global-variables-VC1.ps1</globalVariables>

  <plugins path="Plugins">

    <plugin>00 Connection Plugin for vCenter.ps1</plugin>

    <plugin>03 Datastore Information.ps1</plugin>

    <plugin>07 Hosts Overcommit State.ps1</plugin>

then anytime I need a report on the fly I run the scheduled task manually. Do you foresee any problems with my approach?

0 Kudos