PowerCLI

 View Only
  • 1.  Data not being captured by scripts like vCheck5

    Posted Feb 03, 2012 12:55 PM

    Hello All,

    I am hoping someone can help. I have been using vcheck on and off for the past year or two. A few months ago I resumed using it but discovered that some of the most important data I wanted to capture does not show up in the reports. Of most importance is the data on: recently created vm's, recently deleted vm's, vm's with recent changes, etc.

    I have combed through the report at least a dozen times to ensure I am not missing something. It looks identical to how it was months ago when it did work. I have a sneaking suspision that somehow my vCenter database is missing the tables that house this information, or attributes have been removed or something.

    So really, I am looking to get back the ability to report on this information but I am not sure where to start.

    Any direction or suggestions would be greatly appreciated.

    Thanks



  • 2.  RE: Data not being captured by scripts like vCheck5

    Posted Feb 03, 2012 01:29 PM

    thread moved to VMware vSphere™ PowerCLI Community



  • 3.  RE: Data not being captured by scripts like vCheck5

    Posted Feb 03, 2012 01:38 PM

    I think Alan mentioned that his vCheck v6 would be appearing soon.

    Perhaps it's better to wait and watch Alan's blog.



  • 4.  RE: Data not being captured by scripts like vCheck5

    Posted Feb 03, 2012 09:50 PM

    I am hoping someone can help. I have been using vcheck on and off for the past year or two. A few months ago I resumed using it but discovered that some of the most important data I wanted to capture does not show up in the reports. Of most importance is the data on: recently created vm's, recently deleted vm's, vm's with recent changes, etc.

    There is a hard-coded entry in vCheck for how many lines in your event logs get searched - this is currently 10,000.  This is around line 1536 or so in the 5.47 code.

         If ($ShowCreated){
                Write-CustomOut "..Checking for created or cloned VMs"
                $VIEvent = Get-VIEvent -maxsamples 10000 -Start ($Date).AddDays(-$VMsNewRemovedAge)

    Change the 10000 to a larger number but be aware that the searches will take longer.  You can manually export the output from Get-VIEvent to a file and then try to calculate how far back you want to go.  If you're only going back a day or 2, the number can be a log smaller than say if you want to report on all of the created/deleted VMs for the last 14 or 30 days.

    You'll find the 10000 number hard-coded multiple times so search every section to see if it's important for you to change.



  • 5.  RE: Data not being captured by scripts like vCheck5

    Posted Feb 03, 2012 10:02 PM

    Just for the record, the safest way of doing that would be to replace the 10000 by

    [int]::MaxValue 

    Or at least test if the number you want to enter is less or equal to that value.