AppDynamics Monitoring Extension for Citrix NetScaler

Use Case

Citrix NetScaler is an all-in-one web application delivery controller (ADC) that makes applications run up to five times faster, cuts web application ownership costs with server offloading, and makes sure that applications are always available with its application load balancing capabilities.

NetScaler VPX provides the complete NetScaler web and application load balancing, secure and remote access, acceleration, security and offload feature set in a simple, easy-to-install virtual appliance.

The AppDynamics monitoring extension for NetScaler provides metrics collected by the NetScaler appliance about the usage of its features and corresponding resources using the NITRO API. These metrics can be classified under the following groups:

  1. Core System Metrics

  2. Service Resource metrics

  3. Load Balancing metrics

Prerequisites

Before the extension is installed, the prerequisites mentioned here need to be met. Please do not proceed with the extension installation if the specified prerequisites are not met.

The extension needs to be able to connect to the NetScaler NITRO API in order to be able to collect and send the metrics. To do this, you will have to either establish a remote connection in between the extension and the product, or have an agent on the same machine running the product in order for the extension to collect and send the metrics.

The NetScaler extension connects to the Citrix Netscaler appliance using the NITRO REST API.

Installation

  1. To build from source, clone this repository and run 'mvn clean install'. This will produce a NetScalerMonitor-VERSION.zip in the target directory Alternatively, download the latest release archive from Github
  2. Unzip the file NetScalerMonitor-[version].zip into <MACHINE_AGENT_HOME>/monitors/
  3. In the newly created directory "NetScalerMonitor", edit the config.yml configuring the parameters (See Configuration section below)
  4. Restart the machine agent

Configuration

  1. Edit the file config.yml located at <MachineAgent_Dir>/monitors/ The metricPrefix of the extension has to be configured as specified here. Please make sure that the right metricPrefix is chosen based on your machine agent deployment, otherwise this could lead to metrics not being visible in the controller.

    Here is a sample config.yml file

    metricPrefix: "Server|Component:|Custom Metrics|Netscaler Monitor|"
    
    servers:
     - name: ""
        host: ""
        port: ""
        username: ""
        password: ""
        encryptedPassword: ""
    
    encryptionKey:
    numberOfThreads: 20
    
  2. Configure the path to the config.yml & metrics.xml by editing thein the monitor.xml file in the <MACHINE_AGENT_HOME>/monitors/NetScalerMonitor/ directory. Below is the sample

    <task-arguments> <!-- config file--> <argument name="config-file" is-required="true" default-value="monitors/NetScalerMonitor/config.yml" /> <argument name="metric-file" is-required="true" default-value="monitors/NetScalerMonitor/metrics.xml" /> .... </task-arguments>

  3. Restart the machine agent.

Metrics

Here is a summary of the metrics published by this extension. You can add/remove metrics of your choosing by modifying the provided metrics.xml file by using the correct stat names as per the Citrix documentation

Metric ClassDescription
Load Balancing
MetricDescription
tothitsTotal number of hits
totalrequestsTotal number of requests
totalresponsesTotal number of responses
cursrvrconnectionsNumber of connections to the server behind the virtual server
curclntconnectionsNumber of client connections
stateCurrent state of the system. Possible values: - Down: 0 - Up: 1 - Unknown: 2 - Out of Service: 3 - Transition out of service: 4 - Down when going out of service: 5

Service Resource

MetricDescription
throughputThroughput in mbps
avgsvrttfbAverage time to first byte
totalrequestsTotal number of responses
totalresponsesTotal number of responses
cursrvrconnectionsNumber of connections to the server
curclntconnectionsNumber of client connections
activetransactionsNumber of active transactions handled by the service
stateCurrent state of the system. Possible values: - Down: 0 - Up: 1 - Unknown: 2 - Out of Service: 3 - Transition out of service: 4 - Down when going out of service: 5

System

MetricDescription
cpuusagepcntCPU Utilization Percentage
memsizembCurrently allocated memory in MB
memusagepcntPercentage of memory utilization

Credentials Encryption

Please visit this page to get detailed instructions on password encryption. The steps in this document will guide you through the whole process.

Extensions Workbench

Workbench is an inbuilt feature provided with each extension in order to assist you to fine tune the extension setup before you actually deploy it on the controller. Please review the following document for how to use the Extensions WorkBench

Troubleshooting

Please look at the troubleshooting document and make sure that everything is followed correctly.

Support Tickets

If after going through the Troubleshooting Document you have not been able to get your extension working, please file a ticket and add the following information.

Please provide the following in order for us to assist you better.

  1. Stop the running machine agent .
  2. Delete all existing logs under/logs .
  3. Please enable debug logging by editing the file/conf/logging/log4j.xml. Change the level value of the followingelements to debug. <logger name="com.singularity"> <logger name="com.appdynamics">
  4. Start the machine agent and please let it run for 10 mins. Then zip and upload all the logs in the directory/logs/*.
  5. Attach the zipped/conf/* directory here. 6. Attach the zipped/monitors/NetScalerMonitor directory here .

For any support related questions, you can also contact help@appdynamics.com.

Contributing

Always feel free to fork and contribute any changes directly via GitHub.

Compatibility

NameVersion
Extension Version1.0.0
Controller Compatibility3.7+
Product Tested OnNetScaler VPX 10.x on AWS
Last Update04/02/2018
List of ChangesChange log