Citrix XenDesktop Director shows no metrics
You might have seen a few tweets from me lately about an issue I was working on. At a customer we finished a Citrix XenDesktop environment and for some reason Director showed no metrics. What kind of metrics you might wonder, things like the connected session for example. Also any metric except the machine usage in the trend dashboards were missing. We looked through the database to see if we could find a clue, many community posts are written regarding this issue. As the project was done this was the only left over annoyance. So a Call was setup with Citrix, but before we got to the call we exchanged some ideas and the issue is resolved. Let me show you shortly what it was and how we fixed it.
The issue – where are my metrics?
As you see in the screenshot below there are not metrics reported. When however I look in Studio I see sessions connected. So this was strange.
The environment is a Citrix XenDesktop 7.11 version, deployed with VMware vSphere 6 (not XenServer as it kept crashing), NVIDIA M60, Citrix UPM and Citrix provisioning services. User work with SolidWorks and that kind of applications. Its a small environment but being worked on 24/7 from around the world.
Let’s get into the solution, no chit chat. We dit a pilot with this environment and the customer was so happy (yes they are happy with the environment) that they wanted to move on. So we didn’t rebuild and went straight on to production. This is one of the reason for the issues, not the root cause but one of the reasons. We looked a the VDA agent, the Desktop Delivery Controller and ended up with the conclusion it has to be in the database.
Citrix support also came along and thought with us, the day we had the appointment I got a KB article to look at. They pointed me in te right direction, so I opened SQL and took a look. There are two tables in the monitoring database that are of interest.
The screenshot you see above is from the MonitorData.DesktopGroup. Here the Delivery groups are stored. Below you see a screenshot of the actual environment. The CAD entry above shown in the table is not the same one as shown in Studio. To find the data you select the table and right click on it to select top 1000 rows or edit 200 rows.
So as the data in the table was some old stale data and for some reason did not cleanup itself, I helped out a bit. I selected the rows and deleted the old data. Next table to look at was the MonitorData.Catalog table.
Here you see the catalogs that are in use in your environment. Again I noticed that ome of the catalogs were long gone. The catalogs in use where also here (I accidentally hid it for you but both catalog we have are in the table. The old stale data was also there so I removed those rows.
Again if you want to get to this data, rightcick the table and select edit first 200 rows or select first 1000 rows.
Next up you need to restart the monitoring services on the Desktop Delivery Controllers and you are almost there. we still had some data not showing as it should be. So I contact Citrix support (won’t say his name as he might have a private life unlike us 😉 ) and they send me a script to clear some database issues.
The script is ran against the Monitor database from the SQL management studio console. If you are having issues and you want to resolve it yourself here is the script.
declare @did uniqueidentifier
set @did = ‘00000000-0000-0000-0000-000000000000’
delete from MonitorData.Session
where machineid in (Select Id from MonitorData.Machine
where DesktopGroupID = @did)
delete from MonitorData.Machine
where DesktopGroupId = @did
delete from MonitorData.DesktopGroup
where id = @did
— Script —–
So after clearing the stale data, running the script to clear the database (which showed 0 rows affected) and restarting the services we got metrics. Session count would go up again (where is everyone, two sessions?? really)and logon times are shown.
Also when we nog look in the user session details we get some information on UPM so they can see if it is functioning as it should be, before this was a grey field with an error in it.
and last but not least the logon details in the user session, the last three logon attempts of the user are shown with the breakdown. Not that bad looking at the numbers.
Citrix Director is a very nice console for day to day administration of your environment. So loosing all metrics is bad for a customer. Hopefully the steps described here might help some of you in the future to resolve your issues. Thanks Citrix support for the KB and the script.