05-11-2014 02:28 PM - edited 03-01-2019 01:38 PM
UCS Communities Login ID: robbeck
Twitter handle (optional): TechBeck03
Have you read the Official Rules of the Contest and do you accept the terms and conditions Yes [X ] No [ ]
Are you a Cisco employee Yes [ X] No [ ]
Does the script run on an emulator - Yes [ X ] No [ ]
If yes which version? 2.2(x) for full compatibility
v2.5 Edit: Added a new check for the Firmware Auto Sync Policy (credit to Marcello Turano)
v2.4 Edit: Added support for Ucs PowerTool 2.x and fixed timestamp
v2.3 Edit: Fixed FC uplink SAN performance data and added single psu support
.DESCRIPTION
Script for polling multiple UCS Domains and creating an html report
of the domain inventory, configuration, and overall health
.PREREQUISITES
Powershell version 3.0 or higher
Connection to the internet
UCS PowerTool version 1.1.1 or higher
VIDEO TUTORIAL
.SCRIPT USAGE NOTES
Before generating the report select option 1) from the root menu
and connect to target UCS Domains. Cache domain credentials after
connecting to speed up future script executions.
You must have an active internet connection to view the report as it
streams some javascript and css files to build report
Use the UsedCache, RunReport, Silent, and Email switch options to automate
script execution (especially if scheduling script as a task)
Ex: .\UCS_Health_Check_v2.5.ps1 -UseCached -RunReport -Silent -Email user@domain.com
.REPORT USAGE NOTES
The generated html report supports multiple domains worth of data. Use the Domain
dropdown at the top of the page to switch between UCS Domains. Some of the table
entries can be clicked for a more detailed view. There are help icons with tooltips to
help explain the capabilities of each table.
Include your script here:
I had the same issue. I found that the .html file calls the .css and .js files from the script output to compile the web page on the fly (dataTables.bootstrap.css, etc). So despite its "offline" nomenclature, the .html file requires access to the other files in the same folder/directory as the script. Try copying your output .html file into the source folder of the v2.2 script and open it from there.
I have ran this script but it seems to just stay at 72% completion. Using local admin creds but I think it is possible that a proxy server could or could not be the issue. No errors or anything like that just sits there forever. I'll let you know as I am going to do some additional testing.. I might try it from a less secure server.
Chadwick,
The progress bar is a best effort at keeping you informed of the overall progress but each section of the report can vary in terms of completion times. There is usually a stall at the 72% mark due to the amount of data being processed in that particular section. The completion time can vary greatly based on the amount of CPU and memory on the executing host along with the latency of your connection to ucsm.
I've seen the same report take 2 minutes to complete at one location and 20 minutes to complete at another. Try monitoring your cpu and memory resources while running the script. This shouldn't be a proxy issue or other parts of the script would fail as well.
Thanks
This should be fixed now. Please let me know if you still have issues though.
Thanks
I am trying to run this as a scheduled task, can you tell me how I can populate the ucs_cache.ucs file with the correct information? I have the UCS credentials in the file however when I try to run the script I get the error 'There are currently no connected UCS domains.'
Frank,
You will need to cache the credentials for all domains you want to run the report against. This is done under menu 1 (sounds like you've already done this). Next, you need to execute the script with the following syntax:
.\UCS_Health_Check_v2.3.ps1 -UseCached -RunReport -Silent
or
.\UCS_Health_Check_v2.3.ps1 -UseCached -RunReport -Silent -Email user@domain.com
For the latter option you'll need to define the smtp variables at the beginning of the script. Below is a description of the parameters
UseCached - connects to all domains stored in the ucs cache file. The cache file needs to be located in the same directory as the executing script
RunReport - Runs the health check report without having to navigate the menu (still requires you name the report)
Silent - Same as run report with the addition of auto naming the deliverable file and exiting the script after execution
Email - emails the report to the specified email account (requires smtp variables to be configured at top of script)
If you still have issues let me know and we can troubleshoot over a webex.
Thanks!
Brandon
Brandon,
Can you provide an example of what my ucs_cache.ucs file should look like? The script runs great manually, I would just like to get this running as a task.
Thanks,
Frank
Frank,
Does it work when you execute the script with
.\UCS_Health_Check_v2.3.ps1 -UseCached
locally from powershell? If this works then it should also work as a scheduled task. Here's an example entry from a ucs cache file
10.90.5.50,readonly,01000000d08c9ddf0115d1118c7a00c04fc297eb01000000513f07d55b38184f8c403af336810cd20000000002000000000010660000000100002000000066be6ca56627eabcd266100a33415f25b41a7cf263e67d412e9e21e1400af4b8000000000e8000000002000020000000007d152a0ba8739d2c66cf15cb1e30fc1a4730a400b0a466f526cc992a503fda200000005debff6faa96eb7446062339eb2b19078fb7e6d7ed96985a5625278a727b0f58400000002b7f34167155c77ea445dbc08e9e0f2b729bc12101ebc4f3d54930455af955991bc62d398cf2775752819428a49e6000bcc677dfdeb742ab133183c6b409fceb
This is all one line. The first value is the dns or ip of the virtual IP for the domain, second is the username, and third is the hashed password. If you cache multiple domains then you would have one line per domain in your cache file. When passing the -UseCached parameter, the health check script will iterate through each of these lines and attempt to connect to each using the cached credentials.
Thanks
This worked, thanks!
Hi Robbeck
Can you please tell me what are new features added from new version UCS_Health_Check_Offline_v2.3.
Thank you
To get UCS HealthCheck v2.3 to work with PowerTool Suite version 2+ just replace the four references to ‘CiscoUcsPs’ with ‘Cisco.UCSManager’
http://www.advancednetworktraining.com/ucs-healthcheck-v2-3-with-powertool-suite-version-2-0-1/
Hi Robert
Once i generate the report using UCS HealthCheck v2.3 from the html report date shows 10/25/2015 and not providing actual date.
Can you please check and suggest me.
Thanks in Advance
Hi Mohan,
You would think that that would be the report date, but actually that date appears to be the date of the script version: it is just dead text. If you do a search for it you will find it about line 78. You could:
Would be great if someone could make that the current time.
Hi Rob
Thanks for guiding me.I followed your instructions and its works.
Point 1:Deleted the Date and generated the report again and report shows without date.
Point 2:added "DATE_REPLACE"instead of date & generated the report again, Report generated with date but SAN tab SAN UPlink details not showed the report.
Thanks Again.
Hi Rob
FInally add the DATE_REPLACE on 78th line below place.Its generating report with Date with SAN UP Link details.
"float:right;"><span class="navbar-brand">DATE_REPLACE</span> </div></div></div><div class="container">
Thank you.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: