Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example to include PowerCLI data #288

Open
ibeerens opened this issue Mar 14, 2018 · 5 comments
Open

Example to include PowerCLI data #288

ibeerens opened this issue Mar 14, 2018 · 5 comments

Comments

@ibeerens
Copy link

Are there examples to include VMware PowerCLI data in tables and diagrams?

@adamdriscoll
Copy link
Owner

adamdriscoll commented Mar 19, 2018

@ibeerens There is actually a problem with PowerCLI and UD at the moment. See ironmansoftware/universal-dashboard#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.

@apetitjean
Copy link

Any update on this one? Because I'm facing the exact same bug...

@jorioux
Copy link

jorioux commented May 29, 2018

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>
}

@fitsegreat
Copy link

@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

@Deurnieur
Copy link

Any update ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants