Product Documentation

Retrieving Statistics of NetScaler Resources

Jun 14, 2016

The NetScaler appliance collects statistics about the usage of its features and the corresponding resources. NITRO can retrieve these statistics.

  • To get statistics of a feature, the URL format must be: http://<netscaler-ip-address>/nitro/v1/stat/<feature_name>.
  • To get statistics of a resource, the URL format must be: http://<netscaler-ip-address>/nitro/v1/stat/<resource_type>/<resource_name>.
  • To get statistics of the services and service groups that are bound to a load balancing virtual server, the URL format must be: http://<netscaler-ip-address>/nitro/v1/stat/lbvserver/<name>?statbindings=yes.

For example, to get the statistics of a load balancing virtual server named MyFirstLbVServer:

  • Request:

    HTTP Method
    GET
    URL
    http://<netscaler-ip-address>/nitro/v1/stat/lbvserver/MyFirstLbVServer
    Request Headers
    Cookie:NITRO_AUTH_TOKEN=<tokenvalue> 
    Accept:application/vnd.com.citrix.netscaler.lbvserver+json
    
  • Response:

    HTTP Status Code on Success
    200 OK
    HTTP Status Code on Failure
    4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error.
    Response Header
    Content-Type:application/vnd.com.citrix.netscaler.lbvserver+json
    
    Response Payload
    { 
        "lbvserver": 
        [ 
            { 
                "name":"MyFirstLbVServer", 
                "establishedconn":0, 
                "vslbhealth":0, 
                "primaryipaddress":"0.0.0.0", 
                ... 
            }   
        ] 
    }
    
Note: Not all NetScaler features and resources have statistic objects associated with them.