Hey, Marcos!
Absolutely great work you did with the script, it`s awesome.
I just wanted to share with you the bug I found that leads to improper building of HTML file, resulting in troubles showing pictures.
I was able to rack the issue, it raises in "per Cluster" part of report, when you building string <img src= and Cluster names has spaces in it.
For cluster names without spaces it works fine, but for cluster name like this:
ERP HA - EVC Westmere
I get this source code in HTML:
<img src="Cluster_ERP" ha="" evc="" westmere_datastore_usage.png="" />
And as a result, the image fail.
It happens in "per Cluster" part of report for CPU/RAM/Datastore.
I am not too good with HTML, so I was able to track the issue, but haven't yet found how to resolve it properly.
Something need to be adjusted in this part of code:
| # CHART | ||
| Create-Chart -ChartType Bar -ChartTitle "Monthly Average Host CPU Usage Percentage" -FileName ("Cluster_" + ` | ||
| $ClusterTemp.Name + "_CPU_Usage") -ChartWidth 1750 -ChartHeight 650 -NameArray $global:ArrayOfNames -ValueArray $global:ArrayOfValues | ||
| $HTMLBody += "<IMG SRC=Cluster_" + $ClusterTemp.Name + "_CPU_Usage.png>" | ||
| $Attachments += "Cluster_" + $ClusterTemp.Name + "_CPU_Usage.png" |