Check out my new script for XenApp and XenDesktop 7.x: https://www.czerno.com/Blog/post/2019/10/11/xendesktop-and-xenapp-powershell-monitor-and-web-page
In a previous post I had mentioned my "homegrown monitoring service" so today I thought I would elaborate and share it.
While looking for some sort of monitoring script for XenApp, I found an excellent script written by Jason Poyner, XenApp Farm Health Report, http://deptive.co.nz/xenapp-farm-health-report/.
His script does a Health Check and emails an HTML report. The script checks just about everything concerning a XenApp Farm.
What I was looking for was something to check the servers and only send me an email if an issue is witnessed. So, as with most of my scripts, I took someone elses script to the next level. But kudos goes to Jason for laying the foundation, he did an excellent job.
I changed the script to log errors and send an email about the error, as they are witnessed. I added a lag time to the script so you can set how often to be emailed about the same error message. So in my scenario, the script runs every 15 minutes but I set the lag time to 3600 seconds. This way I am not alerted to the same error more than once per hour. If new errors occur an email is set anyway.
I then changed the script to write the report an HTML file. The script copies the HTML file and images to a web server instead of emailing it. The Web Page will auto-refresh so you could keep it open all day and the latest results will be displayed.
Here is what the Web Page looks like:
Here are the images used in the web page. Just place the images in the same folder as the script. You can replace the Citrix.PNG image with whatever you choose, just try to keep it a similar size.
Here is what an email alert looks like.
I disabled and stopped these services to get the email. The Script actually attempts to start services it finds that arenot running.
Below are the scripts. There is one for XenApp 6.x and one for XenApp 5. They are basically the same except for some column names.
XenApp 6.x
XenApp 5
The script requires the Powershell SDKs to be installed. The SDKs can be found here:
XenApp 6.5 https://www.citrix.com/downloads/xenapp/sdks/powershell-sdk.html
XenApp 5 http://blogs.citrix.com/2010/09/14/xenapp-5-powershell-sdk-tech-preview-3-released/
The script must run from a XenApp server. I schedule mine to run every 15 minutes.
[UPDATED 02/11/2015]
Below are Aaron Argent's contributions to the XenApp 6.x script. He has added a Multiple Zones option to the script that you can run from different ZDC's to reduce the script runtime. He has also added a PVS RAMCache and DiskCache Check as well.
Here is Aaron's XenApp 6.x Script:
Attached is Aaron's PVS Script:
Thanks Aaron for your contributions!
PVS_Cache.txt (10.5KB)