poshprotools
poshprotools copied to clipboard
Example to include PowerCLI data
Are there examples to include VMware PowerCLI data in tables and diagrams?
@ibeerens There is actually a problem with PowerCLI and UD at the moment. See https://github.com/ironmansoftware/universal-dashboard/issues/25
Once this is resolved, I'll make sure to put together some examples.
It probably possible to work around this by using Invoke-Command to use local remoting to run all the PowerCLI commands but it will be slow.
Any update on this one? Because I'm facing the exact same bug...
I found a solution. The New-UDDashboard function has a EndpointInitializationScript parameter to define scripts to be executed only once per runscape:
New-UDDashboard -Title $Title -Content {
New-UdMonitor -Title "CPU (% processor time)" -Type Line -DataPointHistory 20 -RefreshInterval 5 -ChartBackgroundColor '#80FF6B63' -ChartBorderColor '#FFFF6B63' -Endpoint {
(get-vmhost host1 | get-stat -stat mem.usage.average -MaxSamples 10|measure Value -Average)| Select-Object -ExpandProperty Average| Out-UDMonitorData
}
} -EndpointInitializationScript {
connect-viserver <viserver>
}
@jorioux the sample code works prefectly prior to version 2.0.0 (I have tested it on version 1.7.0), but as of version 2.0.0 the "EndpointInitializationScript" is removed
Any update ?