Product Documentation

Examples

Sep 23, 2016

The following examples show how to export Monitor Service data using the OData API.

Example 1 - Raw XML

  1. Place the URL for each data set into a web browser that is running with the appropriate administrative permissions for the XenApp or XenDesktop Site. Citrix recommends using the Chrome browser with the Advanced Rest Client add-in.
  2. View the source.

Example 2 - PowerPivot with Excel

These instructions assume that you have already installed Microsoft Excel and PowerPivot.

Open Excel (running with the appropriate administrative permissions for the XenApp or XenDesktop Site).

If you are using Excel 2010:

  1. Click the PowerPivot tab.
  2. Click PowerPivot Window.
  3. Click From Data Feeds in the ribbon.
  4. Choose a Friendly Connection Name (for example: XenDesktop Monitoring Data) and enter the data feed url: http://{dc-host}/Citrix/Monitor/OData/v2/Data (or https: if you are using TLS).
  5. Click Next.
  6. Select the tables you want to import into Excel and click Finish. The data is retrieved.
  7. You can now use PowerPivot to view and analyze the data with PivotTables and PivotCharts. For more information, see the Learning Center: http://www.microsoft.com/en-us/bi/LearningCenter.aspx

If you are using Excel 2013:

  1. Click the Data tab.
  2. Choose From Other Sources > From OData Data Feed
  3. Enter the data feed url: http://{dc-host}/Citrix/Monitor/OData/v1/Data (or https: if you are using TLS) and click Next.
  4. Select the tables you want to import into Excel and click Next.
  5. Accept name defaults or customize names and click Finish.
  6. Choose Connection Only or Pivot Report. The data is retrieved.
  7. You can now use PowerPivot to view and analyze the data with PivotTables and PivotCharts. For more information, see the Learning Center: http://www.microsoft.com/en-us/bi/LearningCenter.aspx

Example 3 - LINQPad

These instructions assume that you have already installed LINQPad.

  1. Run LinqPad with the appropriate administrative permissions for the XenApp or XenDesktop Site.
    Tip: the easiest way is to download, install and run on the Delivery Controller.
  2. Click the Add connection link.
  3. Choose WCF Data Services 5.1 (OData 3) and click Next.
  4. Enter the data feed URL: http://{dc-host}/Citrix/Monitor/OData/v2/Data (or https: if you are using TLS). If necessary, enter the username and password to access the Delivery Controller. Click OK.
  5. You can now run LINQ queries against the data feed and export the data as needed. For example, right-click Catalogs and choose Catalogs.Take(100). This returns the first 100 Catalogs in the database. Choose Export>Export to Excel with formatting.

For further worked examples of how to use the API with LINQPad, see http://blogs.citrix.com/2014/01/14/creating-director-custom-reports-for-monitoring-xendesktop/.