Home > Citrix, Edgesight > Using Citrix Edgesight to report Access Gateway logins.

Using Citrix Edgesight to report Access Gateway logins.

Edgesight has at best some mediocre reports. The reports seem really useful at first glance, but when you are after a specific set of data it can be hard to come by. Below is a step by step guide to reporting external connections into your Citrix environment.

First, we need to uniquely identify users as they come through the access gateway. To do this we change the web interface site to tag workstation names differently for access gateway connections.

Log into your web interface and Identify the site used for your access gateway.

  • For Web Interface 4.5 and 4.6
    • edit the session.aspxf file located in the C:\inetpub\wwwroot\Citrix\<site name>\app_data\site\serverscripts folder.
  • For Web Interface 5.0
    • edit the SessionUtils.java file located in the C:\inetpub\wwwroot\Citrix\<site name>\app_code\PagesJava\com\citrix\wi\pageutils folder.
  • In either case, change the following line
From: deviceInfo.setClientName(clientName);
To: deviceInfo.setClientName(clientName.Replace("WI_","AG_"));

Note: The length of the client name must remain the same. For example, WEB0 cannot be substituted for WI_

Now that your users will be uniquely identified with their client name starting with AG_, time to move to edgesight and write your custom user group:

Open the Edgesight client, and browse to user configuration:

Select user groups from the left hand menu

Select new user group

Name the user group something relevant e.g. Access gateway users, and press “Create user group”.

Select Queries and choose next

again, give the query a relevant name, and enter the following in the query:

Select sessid from vw_es_usergroup_ica_users where client_name like "ag_%"

Save the query, then click back, then next again.

Choose the new query you have created from the list, then choose Add query below.

Now select Finish.

Now we wait until the next data upload occurs. This is configured in your agent properties…

Once the data upload has occured, move to the Browse tab in edgesight

Find the report near the bottom called “user login details for a user group”

Select the user group you specified from the user group dropdown, then choose Group by Date, then by user then by all.

you should now get a meaningful report on access gateway connections:

  1. Pat smith
    September 9, 2011 at 5:36 pm

    received error message : Access Gateway Users Query must contain the column ‘sessid’.
    when I create the new query.
    Is it suppose to work with version edgesight 5.3

  2. September 11, 2011 at 7:49 pm

    Hi Pat,

    try the following command in 5.3 and let me know if it works so I can update post:

    Select sessid from vw_es_usergroup_ica_users where client_name like "ag_%"

    if it fails, try replacing the “”

  3. Brian Thornton
    February 13, 2012 at 11:32 am


    We like our users to be able to pull there sessions with them when they move from being on our LAN to working remotely. I remember seeing reading soemwhere that if you change the sessionID WorkSpace Control won’t work correctly. I can’t find the article now but will post the link if I do. Do you know if it affects workspace control ?


    • February 13, 2012 at 11:33 am

      Hi Brian,

      I’ve been using this in production for some time now and haven’t experienced any issues with workspace control.



  4. Brian
    May 17, 2012 at 2:36 pm

    Is there a way to configure this to return the computername after the “AG_” instead of the random ID?

  5. May 18, 2012 at 9:25 am

    Hi Brian,

    Short answer is no I’m afraid.

    The web interface naming convention is handled by the following check box: http://www.freeimagehosting.net/r9vf6

    if you uncheck that box the client name string is a fixed size, meaning you can’t add any more characters to it without a buffer overflow. I’ve spent the morning testing this and have given up 🙂

    • May 18, 2012 at 9:54 am

      and just for reference, here is what i was doing: (this is written in J#)

      String clientStr = clientName;
      String agStr = “AG_”;

  6. johnkim
    December 6, 2012 at 4:58 am

    just wondering how to collect CAG users from PNAgent access?

    • December 6, 2012 at 12:13 pm

      Hi John,

      Not sure what you are trying to achieve, drop me an email. My details are on my about page.


  7. johnkim
    December 6, 2012 at 9:56 pm

    I cannot apply the above to PNagent site as it appears that PNagent directory(Xenapp Services Sites) doesn’t seem to contain “SessionUtils.java” file
    I’ve got users connecting to XA from web interface(via browser) as well as from receiver(PNAgent)
    So your solution works for web interface, however not for receiver
    Any ideas?

  8. john kim
    December 18, 2012 at 10:18 pm

    Andrew has helped me out with get ES CAG Access reporting working with PNAgent.

    The fix is described as below.

    Modified the default.ica file for the PNAsite to set the computer name to ag_mobiledevice. This satisfied the report in edge sight but the down side was that every client computer connecting had the same computer name.
    This downside had no ill effects, just a cosmetic thing.

    Open up default.ica and
    add below

  1. November 18, 2011 at 3:04 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

<span>%d</span> bloggers like this: