Thursday, 18 August 2011

Creating a low disk space alert with EdgeSight

EdgeSight is most useful when it actively alerts you about issues with your farm, rather than keeping it to itself and waiting for someone to notice.  By default it will take in lots of Alerts but not have any useful actions.  If you have not already done this, consider going to Configure > Alerts > Actions and creating an Alert for each event you are bothered about (in Configure > Alerts > Rules), sending an email if nothing else.

By default Edgesight DOES monitor disk space, even in Basic mode.  You can pull off a nice report on free disk space in Browse > System Disk Usage, which is lovely as long as you do this on a regular basis.  If you don’t, and don’t have any other monitoring software, you could have Citrix servers operating with almost no space free. 

This is how to monitor for disk space alerts using the Event Log record a full server will generate anyway:

  • In EdgeSight, log in as an Admin and click Alerts (under Company Configuration) > Rules
  • Click New Alert Rule
  • Select System Alerts and click next
  • Select Windows Event Log and click Next
  • Give the rule a name (“Disk Space Alert”?), enter System as the Event Log Name, with Type as “Warning”, Source as “srv” and Event ID as “2013”.  This should match alerts you will get on a Windows system with a full drive.
  • Click Next and Next (not Finish – you need an Action too), then select the part of the server tree you want to monitor – probably “All” at the top to select everything.  You might need to click this again on the next screen to select it properly.  Do this and click Next again.
  • Select “Create a new Alert Action” and click Next. 
  • Now you decide what to do – SNMP might be useful here, or sending an alert MS SysOps.  I’m just sending an email, so select “Sent an Email notification”
  • Enter a name for the Action and a subject, then select an address to send to.  Click Test Action to check you get something.
  • Click Next and Finish and you should see your new alert under Rules and Actions
  • You should now get emails when someone fills your servers up!

Wednesday, 17 August 2011

Citrix IMA and MFCom services hung at Starting…

Recently we had a bit of a Data Collector Election storm on a XenApp 6 farm, and about the same time noticed that newly built servers joining the farm or being moved from one data centre to another had a problem with the “Citrix MFCOM Service” (MFcom) and “Citrix Independent Management Architecture” (IMAservice) services hung at Starting. 

The initial fix was removing them from the farm and rejoining them, which was a little time consuming.

We later found that if the local host cache (each server has one of these, its a record of the farm it exists in) was recreated, the server should be able to participate in the farm again.  This required the IMA and MFCOM services to be forced to close since they were hung on starting, so we used this script, with an attempt at a graceful stop of the services (with pings to give it time to stop), followed by TASKKILL to make sure the service was over, then a reboot.  Hopefully this will be useful to someone!

Copy the following text into a new batch file and run it (As Administrator, if you use UAC) on a server with hung services, it should sort it out:

sc stop mfcom
ping localhost -n 10 > nul
sc stop CitrixWMIService
ping localhost -n 5 > nul
sc stop imaservice
ping localhost -n 10 > nul
taskkill /IM imasrv.exe /F
taskkill /IM IMAAdvanceSrv.exe /F
taskkill /IM mfcom.exe /F
dsmaint recreatelhc
dsmaint recreaterade
shutdown -r -t 10


Thanks to this post for pointing us in the right direction: