# Citrix monitoring plugin

# Introduction

We have chosen a number of modules "base" based on our experience in monitoring systems and the optimal parameters to diagnose potential bottlenecks on these servers. To extract the information is used:

- The software already installed on the system (WMI, Performance Counters, Powershell) for monitoring performed by the plugin without having to install third-party libraries or utilities.
- The system, which integrates with the Windows agent and has the ability to distribute file collections, so that the plugin can be distributed on one side and the file collections individually—by agent—and/or by policy.

# Compatibility Matrix

<table border="1" id="bkmrk-sistemas-donde-se-ha-1" style="width: 99.8765%;"><tbody><tr><td style="width: 33.6653%;">**System where it has been tested**</td><td style="width: 66.3245%;">Windows Server 2008, Citrix XenApp 6</td></tr><tr><td style="width: 33.6653%;">**Systems on which it is expected to run**</td><td style="width: 66.3245%;">Same system or higher</td></tr></tbody></table>

Depending on the type of operating system and language, the format of the performance counters may change and need to be adapted accordingly.

# Prerequisites

The requirements to run the plugin are:

- System with Powershell and WMI enabled.
- Agent PandoraFMS with permissions to run Powershell scripts.

# Configuration

##### **Instalation**

Copy the plugin in the plugin directory of agent or distributing by file collections. Same with the config files. The execution from the agent will be similar to this, but using the paths where the plugin and confs are installed.

```bash
module_plugin "<powershell-path>\powershell.exe" -file C:\'<plugin-path>\pandora_citrix.ps1' -perf C:\'<conf-path>\counters_data.txt' -serv C:\'<conf-path>\services.txt’ -inc C:\'<conf-path>\counters_inc.txt' 2> error.log
```

If we want no monitor any perf counter or only a specific type, would have to carry out these executions:

- Only with generic\_data counters:

```
module_plugin "<powershell-path>\powershell.exe" -file C:\'<plugin-path>\pandora_citrix.ps1' -perf C:\'<conf-path>\counters_data.txt' -serv C:\'<conf-path>\services.txt' 2> error.log
```

- Only with generic\_inc counters:

```
module_plugin "<powershell-path>\powershell.exe" -file C:\'<plugin-path>\pandora_ citrix.ps1' -perf none -serv C:\'<conf-path>\services.txt'   -inc C:\'<conf-path>\counters_inc.txt'' 2> error.log
```

- Without counters:

```bash
module_plugin "<powershell-path>\powershell.exe" -file C:\'<plugin-path>\pandora_ citrix.ps1' -perf none -serv C:\'<conf-path>\services.txt' 2> error.log
```

- With counters and without services:

```bash
module_plugin "<powershell-path>\powershell.exe" -file C:\'<plugin-path>\pandora_ citrix.ps1' -perf C:\'<conf-path5>\counters_data.txt' -inc C:\'<conf-path>\counters_inc.txt' 2> error.log
```

**Configuration**

First of all we have enabled the plugin execution from powershell For this, we must run this command in a powershell terminal:

```powershell
set-executionPolicy -Scope Process -ExecutionPolicy Bypass
```

or

```powershell
set-executionPolicy RemoteSigned
```

If we run the plugin from the terminal and returns the information correctly, but if you execute it in from Pandora agent and returns no results, and in debug mode tells us that remote\_signed not enabled, we should add the next module to be activated within the execution of the agent. This, you have to add only the first time, then stay enabled and we won´t have problems.

```powershell
module_begin 
module_name Remote_signed 
module_type generic_data_string 
module_exec powershell.exe –command set-executionPolicy -Scope Process -ExecutionPolicy bypass 
module_end
```

or

```powershell
module_begin 
module_name Remote_signed 
module_type generic_data_string
module_exec powershell.exe -command set-executionPolicy RemoteSigned 
module_end
```

As we noted in the plugin implementation, it is accompanied by two or three configuration files, one with the name of the services and another two as the name of the performance counters to be monitored. At one we indicate the counters that we can see as generic\_data type and in the second we will use the incremental type (generic\_data\_inc). In the event that the incremental type is not used should not be added at runtime. Each service, each performance counter should be on one line and if If you do not want monitor any counter or service, delete it from the list.

**Configuration files examples**

*Services.txt*

```powershell
Citrix Independent Management Architecture
Citrix XML
Citrix XTE Server
Citrix CPU Utilization Management/Resource Management
Citrix CPU Utilization Management/User Session sync
Citrix CPU Utilization Management/CPU Rebalancer Services states
Citrix Print Manager
Citrix Virtual Memory Optimization
Citrix MF COM Remote Desktop Services/Terminal Services
Citrix WMI
Citrix Client Network
Citrix Streaming/Citrix Streaming Helper
Server
Netlogon
Remote Procedure Call (RPC)
Workstation
Print Spooler
```

*Counters\_data.txt*

```powershell
\Processor(*)\% Processor Time
\System\Processor Queue Length
\Memory\Available Bytes
\Memory\Pages /sec
\Paging File\% Usage
\PhysicalDisk(_Total)\% Free Space
\LogicalDisk(_Total)\% Free Space
\LogicalDisk(_Total)\% Disk Time
\PhysicalDisk(_Total)\Current Disk Queue Length
\LogicalDisk(_Total)\Current Disk Queue Length
\LogicalDisk(_Total)\ Avg. Disk Sec/Read
\LogicalDisk(_Total)\ Avg. Disk Sec/Write
\LogicalDisk(_Total)\ Avg. Disk Sec/Transfer
\PhysicalDisk(_Total)\ Avg. Disk Sec/Read
\PhysicalDisk(_Total)\ Avg. Disk Sec/Write
\PhysicalDisk(_Total)\ Avg. Disk Sec/Transfer
\Citrix MetaFrame Presentation Server\Application Resolution Time (ms)
\Citrix MetaFrame Presentation Server\DataStore Connection Failure
\Citrix MetaFrame Presentation Server\Number of busy XML threads
\Citrix MetaFrame Presentation Server\Resolution WorkItem Queue Ready Count
\Citrix MetaFrame Presentation Server\WorkItem Queue Ready Count
\Citrix Licensing\Citrix Licensing - License Server Connection Failure
\Citrix Licensing\Citrix Licensing - Last Recorded License Check - Out Response Time
\Process(ImaSrv)\Private Bytes
```

# Most Important Citrix Performance Counters

1.- System Performance Counters (Citrix )

**\\Processor(\*)\\% Processor Time -&gt;** This counter is the main indicator of processor activity and shows the average percentage of time observed during the sampling interval. It is calculated by monitoring the time the service is idle and subtracting that value from 100%. The manufacturer indicates that between 80% and 90% over a 15-minute period should be set to Warning status and over 90% to Critical status.

**\\System\\Processor Queue Length -&gt;** This is the current size in bytes of the virtual address space the process is using. The use of virtual address space does not necessarily imply corresponding use of either disk or main memory pages. Virtual space is finite, and the process can limit its ability to load libraries.

**\\Memory\\Available Bytes -&gt;** Available memory indicates the amount of memory remaining after non-paged block allocation, paged block allocations, working sets, and all file system cache memory have taken their share. &lt;30% RAM in warning state, &lt;15% RAM in critical state.

**\\Memory\\Pages /sec -&gt;** This is the speed at which pages are read or written to disk to resolve serious page faults. Warning status between 10 and 20, Critical &gt; 20.

**\\Paging File\\% Usage -&gt;** This is the percentage of the page file instance in use. Warning 40-70%, Critical &gt; 70%.

**\\PhysicalDisk(\_Total)\\% Free Space -&gt;** This is the percentage of total usable space on the selected physical disk that is free. Critical &lt;5%, Warning 5-10%.

**\\LogicalDisk(\_Total)\\% Free Space -&gt;** This is the percentage of total usable space on the selected logical disk that is free. Critical &lt;5%, Warning 5-10%.

**\\LogicalDisk(\_Total)\\% Disk Time -&gt;** This indicates how busy the disk is. Warning &gt; 70% consistently and Critical &gt; 90%.

**\\PhysicalDisk(\_Total)\\Current Disk Queue Length -&gt;** This indicates the number of I/O operations waiting for the hard disk to become available. If the value here is greater than twice the number of spindles, it means that the disk itself may be the bottleneck. &gt;=1 Warning, &gt;=2 Critical.

**\\LogicalDisk(\_Total)\\Current Disk Queue Length -&gt;** Provides a primary measure of disk congestion. It is an indication of the number of transactions waiting to be processed. &gt;=1 Warning, &gt;=2 Consistently Critical, possibility of creating it with FF Threshold 2.

**\\LogicalDisk(\_Total)\\ Avg. Disk Sec/Read -&gt;** Shows the average time in seconds for a read from or to a disk. &gt;= 15 ms Warning, &gt;=20 ms Critical.

**\\LogicalDisk(\_Total)\\ Avg. Disk Sec/Write -&gt;** Shows the average time in seconds for a write from or to a disk. &gt;= 15 ms Warning, &gt;=20 ms Critical.

**\\LogicalDisk(\_Total)\\ Avg. Disk Sec/Transfer -&gt;** Shows the average time in seconds for a transfer from or to a disk. &gt;= 15 ms Warning, &gt;=20 ms Critical.

**\\PhysicalDisk(\_Total)\\ Avg. Disk Sec/Read -&gt;** Shows the average time in seconds for a read from or to a disk. &gt;= 15 ms Warning, &gt;=20 ms Critical.

**\\PhysicalDisk(\_Total)\\ Avg. Disk Sec/Write -&gt;** Shows the average time in seconds for a write from or to a disk. &gt;= 15 ms Warning, &gt;=20 ms Critical.

**\\PhysicalDisk(\_Total)\\ Avg. Disk Sec/Transfer -&gt;** Shows the average time in seconds for a transfer from or to a disk. &gt;= 15 ms Warning, &gt;=20 ms Critical.

**\\Network Interface (\*)\\ Bytes Total/sec -&gt;** Shows the speed at which the network adapter processes data bytes. This counter includes all data files and applications, as well as protocol information such as packet headers.

Note: The names of all these counters may vary depending on the version and language of the OS used.

2.- XenApp Performance Counters

**\\Citrix MetaFrame Presentation Server\\Application Resolution Time (ms) -&gt;** The time in milliseconds that resolution was completed. This is also the time required to determine the “least loaded” server during application launch. A baseline would need to be established in the environment in order to accurately set threshold values.

**\\Citrix MetaFrame Presentation Server\\DataStore Connection Failure -&gt;** The number of minutes that the XenApp server has been disconnected from the data store. Thresholds should take into account events such as reboots and scheduled maintenance.

**\\Citrix MetaFrame Presentation Server\\Number of busy XML threads -&gt;** The number of XML threads currently being processed. There are 16 worker threads in the Citrix XML Service. A count of 16 or more shows that XML requests are not being processed in a timely manner.

**\\Citrix MetaFrame Presentation Server\\Resolution WorkItem Queue Ready Count -&gt;** The number of resolution work items (related to application launches) that are ready to be executed. A value greater than 0 indicates that requests are queued while IMA handles other requests.

**\\Citrix MetaFrame Presentation Server\\WorkItem Queue Ready Count -&gt;** The number of work items that are ready to be executed. A value greater than 0 indicates that requests are queued while IMA handles other requests. This counter should not be greater than 1 for an extended period of time.

**\\Citrix Licensing\\Citrix Licensing - License Server Connection Failure -&gt;** Shows the number of minutes that XenApp has been disconnected from the license server. Warning &gt; 1 minute. &gt; 1440 minutes Critical.

**\\Citrix Licensing\\Citrix Licensing – Last Recorded License Check – Out Response Time -&gt;** Shows the last recorded license check - out response time in milliseconds. A value greater than 5,000 milliseconds indicates a performance issue on the license server.

**\\Process(ImaSrv)\\Private Bytes -&gt;** The current size in bytes of memory that this process (IMA) has allocated and cannot be shared with other processes.

If we want to monitor the % usage of the different processes that are running:  
**\\Process(Process\_Name)\\% Processor Time -&gt;** % CPU in use by the process in question.

3.- Web Interface Performance Counters

**\\ASP.NET\\Request Queued -&gt;** The number of requests waiting to be processed by ASP. A baseline must be established in the environment in order to accurately set threshold values.

**\\ASP.NET\\Request rejected -&gt;** The number of requests rejected because the request queue was full.

**\\ASP.NET\\Request Current -&gt;** The current number of requests, both running and queued.

**\\ASP.NET\\Request Execution Time -&gt;** The amount of time (in milliseconds) it took to execute the most recent request.

**\\Web Service\\Concurrent Connections -&gt;** Current connections is the current number of connections established with the web service.

4.- Xen Desktop Performance Counters

**\\Citrix Broker Service\\Database Avg. Transaction Time -&gt;** Average time, in seconds, to execute a database transaction. A baseline must be established in the environment in order to accurately set threshold values.

**\\Citrix Broker Service\\Database Connected -&gt;** Indicates whether this service is in contact with its database. (1 is connected, 0 is not connected).

**\\Citrix Broker Service\\Database Transaction Errors/sec -&gt;** The rate at which database transactions are failing.

**\\Citrix Broker Service\\Brokered Sessions -&gt;** The number of virtual desktop sessions brokered by the Citrix Service Broker.

**\\Citrix XML Service\\Avg. Transaction Time -&gt;** The number of virtual desktop sessions brokered by the Citrix Service Broker.

5.- Other Citrix Performance Counters

<div id="bkmrk-depending-on-the-os-" style="text-align: justify;"><div>Depending on the OS version and language can change performance counters. For a complete list of ALL the counters that we have installed in this system we can run the following command and extract in a file as follows:</div><div>  
</div></div>```powershell
Get-Counter –listSet * | Select-Object -ExpandProperty Paths > counters.txt 
```

<div id="bkmrk-once-we-have-all-the" style="text-align: justify;"><div>Once we have all the counters available in the system, we can copy all counters in a txt file that comes with the implementation of the plugin and it will create in PandoraFMS one module per token added.</div><div>  
</div></div><div id="bkmrk-%5Ccitrix-cpu-utilizat" style="text-align: justify;"><div><div>**\\Citrix CPU Utilization Mgmt User\\CPU Entitlement -&gt;** The percentage of CPU resource that Citrix CPU Utilization Management makes available to a user at a given time.</div>  
<div>**\\Citrix CPU Utilization Mgmt User\\CPU Reservation -&gt;** The percentage of total computer CPU resource reserved for a user, should that user require it.</div>  
<div>**\\Citrix CPU Utilization Mgmt User\\CPU Shares -&gt;** The proportion of CPU resource assigned to a user.</div>  
<div>**\\Citrix CPU Utilization Mgmt User\\CPU Usage -&gt;** The percentage of CPU resource consumed by a user at a given time, averaged over a few seconds.</div>  
<div>**\\Citrix CPU Utilization Mgmt User\\Long-term CPU Usage -&gt;** The percentage of CPU resource consumed by a user, averaged over a longer period than the CPU Usage counter.</div>  
<div>**\\Citrix IMA Networking\\Bytes Received/sec -&gt;** The inbound bytes per second.</div>  
<div>**\\Citrix IMA Networking\\Bytes Sent/sec -&gt;** The outbound bytes per second.</div>  
<div>**\\Citrix IMA Networking\\Network Connections -&gt;** The number of active IMA network connections to other IMA servers.</div>  
<div>**\\Citrix Licensing\\Average License Check-In Response Time (ms) -&gt;** The average license check-in response time in milliseconds.</div>  
<div>**\\Citrix Licensing\\Average License Check-Out Response Time (ms) -&gt;** The average license checkout response time in milliseconds.</div>  
<div>**\\Citrix Licensing\\Last Recorded License Check-In Response Time (ms) -&gt;**The last recorded license check-in response time in milliseconds.</div>  
<div>**\\Citrix Licensing\\Last Recorded License Check-Out Response Time (ms) -&gt;** The last recorded license check-out response time in milliseconds.</div>  
<div>**\\Citrix Licensing\\License Server Connection Failure -&gt;** The number of minutes that the XenApp server has been disconnected from the License Server.</div>  
<div>**\\Citrix Licensing\\Maximum License Check-In Response Time -&gt;** The maximum license check-in response time in milliseconds.</div>  
<div>**\\Citrix Licensing\\Maximum License Check-Out Response Time -&gt;**The maximum license check-out response time in milliseconds.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\Application Enumeration/sec -&gt;** The number of application enumerations per second.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\Application Resolution Time (ms) -&gt;** The time in milliseconds that a resolution took to complete.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\Application Resolutions Failed/sec -&gt;** The number of application resolutions failed per second.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\Application Resolutions/sec -&gt;** The number of resolutions completed per second.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\Cumulative Server Load -&gt;** The combined processor utilization and connected XenApp user session loads for this server.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\DataStore Connection Failure -&gt;** The number of minutes that the XenApp server has been disconnected from the data store.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\DataStore bytes read -&gt;** The number of bytes read from the data store.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\DataStore bytes read/sec -&gt;** The number of bytes of data store data read per second.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\DataStore bytes written/sec -&gt;** The number of bytes of data store data written per second.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\DataStore reads -&gt;** The number of times data was read from the data store.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\DataStore reads/sec -&gt;** The number of times data was read from the data store per second.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\DataStore writes/sec -&gt;** The number of times data was written to the data store per second.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\DynamicStore bytes read/sec -&gt;** El número de bytes de datos del almacén dinámico leídox por segundo. The number of bytes of dynamic store data read per second.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\DynamicStore bytes written/sec -&gt;** The number of bytes of dynamic store data written per second.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\DynamicStore Gateway Update Count -&gt;** The number of dynamic store update packets sent to remote data collectors.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\DynamicStore Gateway Update, Bytes Sent -&gt;** The number of bytes of data sent across gateways to remote data collectors.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\DynamicStore Query Count -&gt;** The number of dynamic store queries that were performed.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\DynamicStore Query Request, Bytes Received -&gt;** The number of bytes of data received in dynamic store query request packets.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\DynamicStore Query Response, Bytes Sent -&gt;** The number of bytes of data sent in response to dynamic store queries.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\DynamicStore reads/sec -&gt;** The number of times data was read from the dynamic store per second.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\DynamicStore Update Bytes Received -&gt;** The number of bytes of data received in dynamic store update packets.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\DynamicStore Update Packets Received -&gt;** The number of update packets received by the dynamic store.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\DynamicStore Update Response Bytes Sent -&gt;** The number of bytes of data sent in response to dynamic store update packets.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\DynamicStore writes/sec -&gt;** The number of times data was written to the dynamic store per second.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\Filtered Application Enumerations/sec -&gt;** The number of filtered application enumerations per second.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\ICA Roundtrip Latency Median -&gt;** The median time of ICA roundtrip latency for all sessions on the server.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\LocalHostCache bytes read/sec -&gt;** The number of bytes of IMA local host cache data read per second.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\LocalHostCache bytes written/sec -&gt;** The number of bytes of IMA local host cache data written per second.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\LocalHostCache reads/sec -&gt;** The number of times data was read from the IMA local host cache per second.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\LocalHostCache writes/sec -&gt;** The number of times data was written to the IMA local host cache per second.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\Maximum number of XML threads -&gt;** The maximum number of threads allocated to service Web-based sessions since the server restarted.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\Number of busy XML threads -&gt;** The number of busy threads.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\Number of XML threads -&gt;** The number of threads allocated to service Web-based sessions.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\Resolution WorkItem Queue Executing Count -&gt;** The number of resolution work items that are currently being executed.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\Resolution WorkItem Queue Ready Count -&gt;** The number of resolution work items that are ready to be executed.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\WorkItem Queue Executing Count -&gt;** The number of work items that are currently being executed.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\WorkItem Queue Pending Count -&gt;** The number of work items that are not yet ready to be executed.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\WorkItem Queue Ready Count -&gt;** The number of work items that are ready to be executed.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\Zone Elections -&gt;** The number of zone elections. This value starts at zero each time the IMA Service starts and is incremented each time a zone election takes place.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\Zone Elections Triggered -&gt;**The number of times a server triggers a zone election.</div>  
<div>**\\Citrix MetaFrame Presentation Server\\Zone Elections Won -&gt;** The number of times a server wins a zone election.</div>  
<div>**\\ICA Session\\Input Audio Bandwidth -&gt;** The bandwidth, measured in bps, used when playing sound in an ICA session.</div>  
<div>**\\ICA Session\\Input Clipboard Bandwidth -&gt;** The bandwidth, measured in bps, used when performing clipboard operations such as cut-and-paste between the ICA session and the local window.</div>  
<div>**\\ICA Session\\Input COM 1 Bandwidth -&gt;** The bandwidth, measured in bps, used when routing a print job through an ICA session that does not support a spooler to a client printer attached to the client COM 1 port.</div>  
<div>**\\ICA Session\\Input COM 2 Bandwidth -&gt;** The bandwidth, measured in bps, used when routing a print job through an ICA session that does not support a spooler to a client printer attached to the client COM 2 port.</div>  
<div>**\\ICA Session\\Input COM Bandwidth -&gt;** The bandwidth, measured in bps, used when sending data to the client COM port.</div>  
<div>**\\ICA Session\\Input Control Channel Bandwidth -&gt;** The bandwidth, measured in bps, used when executing LongCommandLine parameters of a published application.</div>  
<div>**\\ICA Session\\Input Drive Bandwidth -&gt;** The bandwidth, measured in bps, used when performing file operations between the client and server drives during an ICA session.</div>  
<div>**\\ICA Session\\Input Font Data Bandwidth -&gt;** The bandwidth, measured in bps, used when initiating font changes within a SpeedScreen-enabled ICA session.</div>  
<div>**\\ICA Session\\Input HDX Mediastream for Flash Data Bandwidth -&gt;** The bandwidth, measured in bps, used when streaming Flash data in an HDX-enabled session.</div>  
<div>**\\ICA Session\\Input Licensing Bandwidth -&gt;** The bandwidth, measured in bps, used to negotiate licensing during the session establishment phase. Often, no data for this counter is available, as this negotiation takes place before logon.</div>  
<div>**\\ICA Session\\Input LPT 1 Bandwidth -&gt;** The bandwidth on the virtual channel that prints to a client printer attached to the client LPT 1 port through an ICA session that does not support a spooler. This is measured in bps.</div>  
<div>**\\ICA Session\\Input LPT 2 Bandwidth -&gt;** The bandwidth on the virtual channel that prints to a client printer attached to the client LPT 2 port through an ICA session that does not support a spooler. This is measured in bps.</div>  
<div>**\\ICA Session\\Input Printer Bandwidth -&gt;**The bandwidth, measured in bps, used when printing to a client printer through a client that has print spooler support enabled.</div>  
<div>**\\ICA Session\\Input Seamless Bandwidth -&gt;** The bandwidth, measured in bps, used for published applications that are not embedded in a session window.</div>  
<div>**\\ICA Session\\Input Session Bandwidth-&gt;** The bandwidth, measured in bps, used from client to server for a session.</div>  
<div>**\\ICA Session\\Input Session Compression -&gt;** The compression ratio used from client to server for a session.</div>  
<div>**\\ICA Session\\Input Session Line Speed -&gt;** The line speed, measured in bps, used from client to server for a session.</div>  
<div>**\\ICA Session\\Input SpeedScreen Data Channel Bandwidth -&gt;** The bandwidth, measured in bps, used from client to server for data channel traffic.</div>  
<div>**\\ICA Session\\Input Text Echo Bandwidth -&gt;** The bandwidth, measured in bps, used for text echoing.</div>  
<div>**\\ICA Session\\Input ThinWire Bandwidth -&gt;** The bandwidth, measured in bps, used from client to server for ThinWire traffic.</div>  
<div>**\\ICA Session\\Latency - Last Recorded -&gt;** The last recorded latency measurement for the session.</div>  
<div>**\\ICA Session\\Latency - Session Average -&gt;** The average client latency over the lifetime of a session.</div>  
<div>**\\ICA Session\\Latency - Session Deviation -&gt;** The difference between the minimum and maximum measured latency values for a session.</div>  
<div>**\\ICA Session\\Output Audio Bandwidth -&gt;** The bandwidth, measured in bps, used for playing sound in an ICA session.</div>  
<div>**\\ICA Session\\Output Clipboard Bandwidth -&gt;** The bandwidth, measured in bps, used for clipboard operations such as cut-and-paste between the ICA session and the local window.</div>  
<div>**\\ICA Session\\Output COM 1 Bandwidth -&gt;** The bandwidth, measured in bps, used when routing a print job through an ICA session that does not support a spooler to a client printer attached to the client COM 1 port.</div>  
<div>**\\ICA Session\\Output COM 2 Bandwidth -&gt;** The bandwidth, measured in bps, used when routing a print job through an ICA session that does not support a spooler to a client printer attached to the client COM 2 port.</div>  
<div>**\\ICA Session\\Output COM Bandwidth -&gt;** The bandwidth, measured in bps, used when receiving data from the client COM port.</div>  
<div>**\\ICA Session\\Output Control Channel Bandwidth -&gt;** The bandwidth, measured in bps, used when executing LongCommandLine parameters of a published application.</div>  
<div>**\\ICA Session\\Output Drive Bandwidth -&gt;** The bandwidth, measured in bps, used when performing file operations between the client and server drives during an ICA session.</div>  
<div>**\\ICA Session\\Output Font Data Bandwidth -&gt;** The bandwidth, measured in bps, used when initiating font changes within a SpeedScreen-enabled ICA session.</div>  
<div>**\\ICA Session\\Output Licensing Bandwidth -&gt;** The bandwidth, measured in bps, used to negotiate licensing during the session establishment phase. Often, no data for this counter is available, as this negotiation takes place before logon.</div>  
<div>**\\ICA Session\\Output HDX Mediastream for Flash Data Bandwidth -&gt;** The bandwidth, measured in bps, used when streaming Flash data in an HDX-enabled session.</div>  
<div>**\\ICA Session\\Output LPT 1 Bandwidth -&gt;** The bandwidth, measured in bps, used when routing a print job through an ICA session that does not support a spooler to a client printer attached to the client LPT 1 port.</div>  
<div>**\\ICA Session\\Output LPT 2 Bandwidth -&gt;** The bandwidth, measured in bps, used when routing a print job through an ICA session that does not support a spooler to a client printer attached to the client LPT 2 port.</div>  
<div>**\\ICA Session\\Output Management Bandwidth -&gt;** The bandwidth, measured in bps, used when performing management functions.</div>  
<div>**\\ICA Session\\Output Printer Bandwidth -&gt;** The bandwidth, measured in bps, used when printing to a client printer through a client that has print spooler support enabled.</div>  
<div>**\\ICA Session\\Output Seamless Bandwidth -&gt;** The bandwidth, measured in bps, used for published applications that are not embedded in a session window.</div>  
<div>**\\ICA Session\\Output Session Bandwidth-&gt;** The bandwidth, measured in bps, used from server to client for a session.</div>  
<div>**\\ICA Session\\Output Session Compression -&gt;** The compression ratio used from server to client for a session.</div>  
<div>**\\ICA Session\\Output Session Line Speed -&gt;** The line speed, measured in bps, used from server to client for a session.</div>  
<div>**\\ICA Session\\Output SpeedScreen Data Channel Bandwidth -&gt;** The bandwidth, measured in bps, used from server to client for data channel traffic.</div>  
<div>**\\ICA Session\\Output Text Echo Bandwidth -&gt;** The bandwidth, measured in bps, used for text echoing.</div>  
<div>**\\ICA Session\\Output ThinWire Bandwidth -&gt;** The bandwidth, measured in bps, used from server to client for ThinWire traffic.</div>  
<div>**\\ICA Session\\Resource Shares -&gt;** The total number of shares used by the session.</div></div></div><div id="bkmrk-"><div style="text-align: justify;">  
</div></div>

# Additional citrix monitoring

##### **Network modules**

We can remotely monitor the different ports that must be operative in our Citrix environment, here's the essential, but in the following catalog has details of all ports used by different components of Citrix

[http://support.citrix.com/content/dam/supportWS/kA460000000Cc9tCAC/Communication\_Ports\_ Used\_By\_Citrix.pdf](http://support.citrix.com/content/dam/supportWS/kA460000000Cc9tCAC/Communication_Ports_%20Used_By_Citrix.pdf)

1\. Controller, Console Director and StoreFront

Ports 80 and/or 443 TCP

2.- License Server

Ports 7279, 27000, 8083, 8082 TCP

It may do this through port monitoring server or network PandoraFMS through local modules from the same server or another we wanted to use for this purpose.

**Windows:**

```powershell
module_begin
module_name Check port 80
module_type generic_proc
module_tcpcheck IP_Citrix_server
module_port 80
module_end
```

**Linux:**

```bash
module_begin
module_name Check port 80
module_type generic_proc
module_exec nmap IP_Citrix_server  | grep 80/tcp | awk '{print $2}' | grep open | wc -l
module_end
```

##### **Monitoring Citrix Events**

We can monitor any of the Citrix events writtent to the Event Log.

For them we can use module logevent type.

```powershell
module_begin 
module_name Event Citrix 
module_type async_string 
module_source Application  #Source (Application, System, or Security)
module_eventtype Information #Severity: Error, Information,
module_eventcode # Event ID 
module_description 
module_end
```

In the links below you can find details of all the events that are generated on the Citrix server:

[Event Codes generated by PVS ](https://support.citrix.com/support-home/kbsearch/article?articleNumber=CTX126407)

[XenDesktop Broker LogEvents ](https://support.citrix.com/support-home/kbsearch/article?articleNumber=CTX133153)

[XenDesktop VDA LogEvents](https://support.citrix.com/support-home/home)

[XenDesktop MCS LogEvents ](https://support.citrix.com/support-home/home)

[Web Interface LogEvents](https://support.citrix.com/support-home/home)

As an example some of the most important events are listed below. Recall that all these configurations should be added to the agent configuration file (pandora\_agent.conf)

```
module_begin
module_name EventControllerWrongUserAccount
module_description
module_type async_string
module_logevent module_source Application
module_eventcode 1000
module_end

module_begin
module_name EventBrokerThrottleStartupException
module_descriptio
nmodule_type async_string
module_logevent
module_source Application
module_eventcode 1004
module_end 

module_begin
module_name NoDatabaseConnectivity
module_description
module_type async_string
module_logevent
module_source Application
module_eventcode 1202
module_end 

module_begin
module_name Event_1388
module_description Citrix internal monitoring
module_type async_string
module_logevent
module_source Application
module_eventcode 1388
module_application HCAService
module_end 

module_begin
module_name Event_3621
module_description Citrix cannot connect SQL server
module_type async_string
module_logevent
module_source Application
module_eventtype Error
module_eventcode 3621
module_end 

module_begin
module_name Event_3961
module_description The Data Collector is out of memory, and the Dynamic Store data might be out of sync. Please elect a new Data Collector and make sure you have enough memory on the new Data Collector
module_type async_string
module_logevent
module_source System
module_eventcode 3961
module_end 

module_begin
module_name Event_5774
module_description Server goes to grace period (Not enough licences)
module_type async_string
module_logevent
module_source system
module_eventtype Error
module_eventcode 5774
module_application MetaFrame
module_end 

module_begin
module_name Event_9014
module_description Invalid licence
module_type async_string
module_logevent
module_source system
module_eventtype Error
module_eventcode 9014
module_application MetaFrame
module_end
```

# Modules generated by the plugin

The plugin generates the following modules:

- Users Connect.
- Citrix Sessions

##### **Service statuses**

1.- **XenApp Servers**

- Citrix Independent Management Architecture.
- Citrix XML.
- Citrix XTE Server.
- Citrix CPU Utilization Management/Resource Management.
- Citrix CPU Utilization Management/User Session sync.
- Citrix CPU Utilization Management/CPU Rebalancer Estados Servicios.
- Citrix Print Manager.
- Citrix Virtual Memory Optimization.
- Citrix MF COM.
- Remote Desktop Services/Terminal Services.
- Citrix WMI.
- Citrix Client Network.
- Citrix Streaming/Citrix Streaming Helper.
- Server.
- Netlogon.
- Remote Procedure Call (RPC).
- Workstation.
- Print Spooler.

2.- **XenDesktop Services**

- Citrix AD Identity.
- Citrix Broker.
- Citrix Configuration.
- Citrix Diagnostic Facility COM Server.
- Citrix Host.
- Citrix Machine Creation.
- Citrix Machine Identity .

3.- **Provisioning Services**

- Citrix PVS PXE.
- Citrix PVS Stream.
- Citrix PVS SOAP.
- Citrix PVS TFTP .
- Citrix PVS Two Stage Boot .

4.- **Licensing Services**

- Citrix License.
- Citrix Licensing WMI

5.- **Web Interface Services**

- World Wide Web Publishing Service

##### **Most important performance counters**

Another thing we can monitor with this plugin is any of the performance counters we deem necessary. Below are the most important ones for detecting bottlenecks in Citrix and a list of all those available.