tag:blogger.com,1999:blog-7242837870074734322.post6120712237999163330..comments2023-10-17T15:30:31.577+01:00Comments on Zenapp.blogspot.com: Creating a Server Monitoring Graph in XenApp 6.0 and 6.5Labmousehttp://www.blogger.com/profile/17845725822582163949noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-7242837870074734322.post-55643948988034461132012-08-22T14:54:51.838+01:002012-08-22T14:54:51.838+01:00Awsome. Just what I was looking for. I've slig...Awsome. Just what I was looking for. I've slightly changed the script so it runs on non-XA servers but with the SDK installed. It connects to our data collector:<br /><br />$ErrorActionPreference = "SilentlyContinue"<br /><br />Add-PSSnapin Citrix* <br /><br />$filter = "SOMESERVER*" <br />$sServerZDC = "DataCollector"<br /><br />$oFarm = Get-XAFarm -ComputerName $sServerZDC<br />$oServers = Get-XAServer -ComputerName $sServerZDC | Where-Object {$_.ServerName -like $filter}<br /><br />$servercounts = @{} <br />foreach ($servername in $oServers) <br />{ <br /> $sessionsactive = Get-XASession -Farm -ComputerName $servername | where-object {$_.State -eq "Active" }<br /> $countActive = @($sessionsactive | where-object {$_.ServerName -eq $servername.ServerName }| Select-Object SessionId -unique) <br /> $servercounts.add($servername.ServerName, $countActive.Count) <br />} <br />$servercounts = $servercounts.GetEnumerator() | sort Name <br /><br />#echo $servercounts<br /><br />Some of servers are listed in the farm, but don't actually exist. As a result it can take a while to generate the chart as it has to timeout on each non-existent server. Maybe someone known a way to reduce the timeout.Woternoreply@blogger.comtag:blogger.com,1999:blog-7242837870074734322.post-34315788190457577502012-02-27T09:20:16.870+00:002012-02-27T09:20:16.870+00:00Great article. I would just add a couple of change...Great article. I would just add a couple of changes:<br /><br />Add-PSSnapin Citrix* -ErrorAction SilentlyContinue<br /><br />This removes the error messages if you have already loded the snapins...<br /><br />$Chart.ChartAreas[0].AxisX.LabelStyle.Angle = -45<br />$Chart.ChartAreas[0].AxisX.Interval = 1<br /><br />These two lines just before the foreach loop make the legend word better if you have more than 10 server (otherwise the graph scales and you will read one name every ten).<br /><br />Regards,<br /><br />Francesco Dipietromaria<br />http://www.dpmworld.netFDhttps://www.blogger.com/profile/11377787218121295741noreply@blogger.comtag:blogger.com,1999:blog-7242837870074734322.post-54152018772988731052011-09-09T21:21:13.703+01:002011-09-09T21:21:13.703+01:00You should look at Zenoss. I do basically the same...You should look at Zenoss. I do basically the same thing, but I use my powershell to write a txt file that my monitoring system picks up and graphs with RRD. If I could attach something I would show you what mine looks like. Plus zenoss fits into an overall network management strategy. <br /><br />-Jace Jenkins-Jacehttps://www.blogger.com/profile/17750325546226279311noreply@blogger.com