Product Documentation

Retrieving Statistics of NetScaler Resources

Sep 01, 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/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 Payload 복사

{
    "lbvserver":
     [
         {
               "name":"MyFirstLbVServer",
               "establishedconn":0,
               "vslbhealth":0,
               "primaryipaddress":"0.0.0.0",
               ...
         }
     ]
}

메모

Not all NetScaler features and resources have statistic objects associated with them.

To get statistics of the bound entities, use statbindings=yes.

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

  • Request

HTTP Method
         GET

URL
        http://<netscaler-ip-address>/nitro/v1/stat/lbvserver/MyFirstLbVServer?statbindings=yes

 

Request Headers 복사

Cookie:NITRO_AUTH_TOKEN=<tokenvalue>
Accept:application/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/json

Response Payload 복사

{

  "lbvserver": [{

    "name": "MyFirstLbVServer",

    "sortorder": "descending",

    "vsvrsurgecount": "0",

    "establishedconn": "0",

     ...

     ...

    "service": [{

        "name": "s1",

         "throughput": "0",

         "throughputrate": 0,

          "avgsvrttfb": "0",  

           "primaryipaddress": "1.2.3.5",

           "primaryport": 80,

           "servicetype": "HTTP",

           "state": "DOWN",

            "totalrequests": "0",

            "requestsrate": 0,

            ...

 

            ...

            }]

    }]

}