Tag Archives: Citrix

PowerShell: Run a tool against Citrix Workergroup Servers

wg3

Intro

In my new job, I get to work on a dedicated Citrix team again and I’m  really enjoying it. I get the opportunity to work collaboratively with a group of experienced Citrix Admins/Engineers and also get the chance to do a lot of PowerShell. Recently, we had to run Helge Klein’s excellent Delprof2 against a set of servers because of space issues. After fixing the issue, I thought it would be a good chance to stretch my PowerShell skills and enhance a tool the team uses.

Original Script

The original script runs fine, it just runs against the entire farm which in this case is over 700 servers. I wanted to create a script for our XenApp 6.5 environment and leverage Worker Groups to group our servers. I also wanted to try a graphical interface for the script.

PowerShell…GUI…what’s wrong with you?

I know, I know. Using a GUI with a PowerShell script is not typical, but I felt it was the best way to present a list of Worker Groups. Your Citrix environment may be smaller or not using that many worker groups, so displaying a list in the console may make more sense. I found this post which outlined how to do a list box in PowerShell.

First, I modified the dimensions of the parts of the list box so it would display all my worker groups.

Then, I populated the list box with worker groups using get-xaworkergroup

Finally, I display the List box and wait for the user to select a Worker Group and click OK or Cancel and stop the script.

If the user does pick a worker group and clicks OK, then we iterate through the servers in the Work Group and run delprof2.exe against them. This is where you could implement your own tool or procedure.

Here’s the list box:

wg1

Selecting a Worker group and clicking OK, will run delprof2.exe against all the servers in the WG.

wg2

The script

You can get the script from Github.

Thanks for reading,
Alain Assaf

Application woes: Solarwinds Advanced Subnet Calculator

bg_adv_subnet_calc_top

Solarwinds Advanced Subnet Calculator (ASC) is a great, freely-available tool to generates lists of IP4 networks. I recently ran into an issue installing it in a Windows 7 virtual desktop. It would run fine for administrators, but regular users received errors like this and this.

I broke out Process Monitor and Regshot to investigate what was going on here. I found that regular users could not register the SWLogo.ocx file listed in the above link. This makes sense as I had applied reasonable security on non-admins.
I reinstalled the ASC as the local admin (i.e. non-domain administrator) and that fixed one error for users, but a new one popped up. Running Process Monitor again, I found that ASC was expecting read/write permissions on

c:\programdata\Solarwinds\VB\Banners.

asc_error

This folder contains a series of bitmap banner ads for Solarwinds products. Not at all unreasonable for a free tool. Once I modified permissions in the disk image to allow users to modify (ha!) this folder I was back in business.

Thanks,
Alain

The Cloud is Blind: Tricerat Simplify Monitoring

NOTE: I was not asked by Tricerat to review their product, but I am taking a look at it to see if it would provide better visibility to my current XenDesktop/XenApp environment.

Intro

It's always Citrix

Citrix is a blessing and a curse for any virtualization admin. A blessing, because it allows you to deliver your company’s resources in a very dynamic and flexible way. A curse, because Citrix touches every aspect of your company’s infrastructure, and as any Citrix admin knows, any fault or degradation in that infrastructure can be magnified in your Citrix environment. If you’re lucky, you have the tools to identify these faults and if you are really lucky, you can inform other support teams to fix their problem. More often than not, this is a luxury and you have to rely on EdgeSight and whatever troubleshooting skills you have developed to fix problems like this. I’m not knocking EdgeSight, but it still requires a dedicated resource to configure, manage, and monitor and has little to no visibility into the other layers that make up your environment.

With more and more environments moving to the cloud, reporting and monitoring can be hampered due to the following reasons:

  1. Your cloud provider only offers/supports one monitoring tool.
  2. Your cloud provider only allows access to the application layer so you cannot install an appliance on a hypervisor, so you must use a product like EdgeSight.
  3. Your cloud provider’s architecture is so abstracted that monitoring is very limited (i.e. Amazon’s Workspaces).
  4. Your cloud provider does not want you digging into their architecture and pointing fingers at them.

When you’re working in a cloud environment, there are more variables that are out of your control. I’m reviewing various monitoring solutions that I hope will help me deal with performance issues in my cloud deployment and give me insight to the Cloud Provider’s resources as well as issues with my corporate resources.

Tricerat

Tricerat, known for addressing the terrible state of printing in  virtual environments, has developed a monitoring solution that “…provides out-of-the-box functionality and setup wizards that enable administrators to monitor their XenApp and XenDesktop deployments across the physical and virtual infrastructure, to determine root causes and automate fix actions.”

Install

Downloading the 30-day trial is as simple as providing some contact info and downloading the setup file (both 32-bit and 64-bit available). It is recommended that you perform the install with an account that is a domain admin and also a farm admin of your XenApp, XenDesktop, and PVS farms.

Setup

(I’m using Slideshare to present the install screenshots)

 

Note:If you are installing Simplify Monitoring on a system that already hosts a web site, you should run MonitorITCFU.exe which is located in the \Program FIles (x86)\Simplify Monitoring\Bin folder. This utility will allow you to change the HTTP port to something other than 80 which is the default. When you open it, you must go to File –> Open and select the Default.btc file to make change. Once you’ve saved your changes, then stop and restart the “MonitorIT Server Service”.

First Launch (after a reboot)

Hey, look! A desktop icon. Let’s click on it:

firstlaunch1

If you’ve looked at several monitoring solutions, the below interface will look familiar…

firstlaunch2

This is the same monitoring product that Goliath Technologies has OEM’d to other companies. Let’s give Tricerat the benefit of the doubt and see what their years of experience gives us.

First, there is a Help Guide:

firstlaunch3

My environment is based on VMWare, so let’s see how that is configured.

firstlaunch4

I added my vCenter server…

firstlaunch5

…and my hosts were added…

firstlaunch6

Clicking Next goes to the Host Licensing screen. You are limited to 10 hosts in the 30-day trial:

firstlaunch7

After completion, you are presented with an option to install Simplify Monitoring’s Console as a Plug-In into vCenter.

firstlaunch8

After you exit this wizard, you presented with a next step configuration guide.

firstlaunch9

So, I want to “See alerts and the health of your system” to see if there are any red flags I did not know about.

firstlaunch10

Hey, one of my servers is showing yellow. As you can see from the icons, we’ve got the typical RYG alert, the type of system (ESX, Linux, Windows), and the system status. After a few seconds, I got lots of red…

firstlaunch11

Time to panic? Let’s dive in and see what the alert is about (you can sort the system status to only show faults and to move all the faults to the top – which is why the above picture only shows red). The first system is a virtual NetScaler, so I’ll click on one of my XenDesktops to see what is triggering the alert.

firstlaunch12

The alert is due to available logical drive space. Clicking on the Watch/Alert Detail (the icon under Inf in the above picture) gives us…

firstlaunch13

Again, this environment is very new to me. The above location is created when MCS is used. I know that PVS was used in this environment, but it is not active now, so this alert is correct, but not relevant. Let’s see if we can silence this alert and see what else is going on. Going back to the Configuration Guide, I’m going to click on “View or Modify default alerting conditions and thresholds”

firstlaunch14

To configure Monitoring rules, click on the Configure tab and then Monitoring Rules.

firstlaunch15

The rule we want, “VMWare Virtual Machnine Alert” covers all major metrics.

firstlaunch16

I added the path (not including the drive letter) that was causing an issue to the Exclude field and then acknowledged those existing issues. Now back to the dashboard to see what we can see.

firstlaunch17

Yeah, but what about my Citrix environment?

Simplify Monitoring provides many different built-in rule sets that cover all major components of a Citrix environment:

image

Note the Windows and SQL dependency checks that are related to delivering Citrix XenApp. Each rule can be assigned to a server or set of servers. When you select a rule you can click on Edit to get more detail.

image

This screen allows you to assign the rule to a group of servers. If you click on the Service radio button, the screen changes to show the service that is monitored and all systems that are running an agent. This may be easier to assign the rule in your environment:

image

You can also configure the schedule of the alert…

image

…the method of notification…

image
image  image image
image

…and any remediation methods…

image

You can also recreate custom rules to monitor any number of items/systems:

image

How do I see it all?

To see your alerts you go to the Monitor Tab. The first screen will be the groups (if any) that were configured.

image

You can click on Categories to see your infrastructure grouped:

image

Status will show all detected devices in your environment:

image

Alerts will list all currently detected alerts.

image

If you click CPU, Memory, Storage, and Availability you will get a high-level look at these metrics. You can sort on any column by clicking on it.

image
image
image

You can also see your datastores from the perspective of your hypervisor if you click on Virtual Storage.

image

Tricerat has also included a nice graphing module and covers the main pain points of monitoring a system holistically. I unfortunately do not have any graphs from my environment available, but I grabbed a screen shot from a presentation here to give you an idea:

image

You setup a dashboard and add graphs to it.  It’s a nice view of your system and you can cycle through different dashboards to show you your VMWare, XenApp, and  XenDesktop environments.

Reports

You can also schedule and run reports on most metrics in your environment. I’m not able to show any screen shots of this, but I would recommend viewing a nice video of the major features of Tricerat Simplify Monitoring here:

Thanks,
Alain