Hopefully I can explain what I’m trying to do here…I have a pretty extensive dashboard for aggregating a bunch of data from our 3 Citrix sites. One panel that I’m trying make is a “user sessions” line chart that shows user growth/shrink over the day. I’ve been using a UDMonitor to do that but the problem there is every time the page is refreshed it starts over. I understand why. So what I’m trying to do is instead use a scheduled endpoint to write my data out to a text file, then use New-UdChart to display the data from the text file…A poor mans database…
So my scheduled endpoint is working without issue. I can see the text file, and I can see the data in it. (Essentially I’m just doing a count and writing that number out to the text file)
When I try to pull that data into the chart it shows 0. Here is my UDChart code:
New-UDChart -Title "Sessions Over Time" -Type Line -AutoRefresh -RefreshInterval 60 -Endpoint {
$SessionsCount = Get-Content -Path "Sessions.txt" -Raw
$SessionsCount | Out-UDChartData -DataProperty $_
}
This is what my sessions.txt file looks like.
Thanks!