To get the system statistics for a specified host in a cluster, send the following request:
POST https://<IA_IP_address>:<port_number>/stats/v1/systemstats/<cluster_name>/<host_name>
Required header:
Cookie: px=<token>
Request body:
{
"from" : "date-time",
"to" : "date-time",
"bin" : "bin size"
}Options
IA_IP_address—The IP address of the NDR appliance running the NDR API.
port_number—The port number of the NDR appliance running the NDR API.
cluster_name—The name of the cluster.
host_name—The name of the host.
token—This token authenticates the session. By default, the session times out after 24 hours.
Query parameters
from—The UTC start time. The format is
yyyy-MM-dd'T'HH:mm:ss.SSS'Z.to—The UTC end time. The format is
yyyy-MM-dd'T'HH:mm:ss.SSS'Z.bin—The time range in minutes or hours. For example,
1mfor 1 minute or5hfor 5 hours. The minimum bin size is 1 minute. The maximum number of bins is 1,500.
Example
POST https://xxx.xxx.xxx.xxx:443/stats/v1/systemstats/ia150/ia141host
Required header:
Cookie: px=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Request body:
{
"from": "2016-04-29T15:20:00.236Z",
"to": "2016-04-29T15:40:59.237Z",
"bin": "10m"
}System statistics for a host: Response
HTTP/1.1 [Response Code] [Response Message] Server: [Server] Date: [Date] Content-Type: [Content Type] avg: [Average] max: [Maximum] min: [Minimum] count: [Count]
Response fields
Response Code—A standard HTTP response code.
Response Message—A standard HTTP response message.
Server—The server being used.
Date—Standard HTML date format.
Content Type—The response format.
Average—The average value of all the samples collected.
Maximum—The maximum value in the samples collected.
Minimum—The minimum value in the samples collected.
Count—The number of samples collected.
Example
HTTP/1.1 200 OK
Server: nginx
Date: Fri, 29 Apr 2016 17:22:00 GMT
Content-Type: application/json; charset=utf-8
{
"2016-09-07T15:00:00.000Z": {
"esDirCount": {
"avg": 2005,
"max": 2005,
"min": 2005,
"count": 9
},
"esDiskUsageInGB": {
"avg": 3007520.5,
"max": 3008025,
"min": 3006836,
"count": 9
},
"esFileCount": {
"avg": 39418.332,
"max": 83482,
"min": 31982,
"count": 9
},
"freeMemoryPercentage": {
"avg": 62,
"max": 62,
"min": 62,
"count": 9
},
"loadAverage15min": {
"avg": 2.7733333,
"max": 3.07,
"min": 2.51,
"count": 9
},
"loadAverage1min": {
"avg": 1.5577778,
"max": 3,
"min": 0.8,
"count": 9
},
"loadAverage5min": {
"avg": 2.8366666,
"max": 3.94,
"min": 2.11,
"count": 9
},
"totalMemoryInGB": {
"avg": 252,
"max": 252,
"min": 252,
"count": 9
},
"usedMemoryPercentage": {
"avg": 37,
"max": 37,
"min": 37,
"count": 9
}
},
"2016-09-07T16:00:00.000Z": {
[ . . . ]
}
}cURL code sample: System statistics for a host
curl -k -X POST -H "Content-Type: Application/json" --cookie "px=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" https://xxx.xxx.xxx.xxx:443/stats/v1/systemstats/ia150/ia141host -d '{"from": "2016-08-03T15:20:00.236Z", "to": "2016-08-03T15:40:59.237Z", "bin": "1h" }'This cURL sample includes the following options:
-k—This option explicitly allows cURL to perform insecure SSL connections and transfers, which allows you to test your SSL connection without installing a CA certificate.-X POST—This option changes the HTTP method to POST.-H "Content-Type: Application/json"—This header specifies that the request body is in JSON format.--cookie "px=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"—This option specifies the authentication token for this session.https://xxx.xxx.xxx.xxx:443/stats/v1/systemstats/ia150/ia141host—The statistics request URL. Replacexxx.xxx.xxx.xxxwith the IP address of your NDR appliance. Replaceia150with the cluster name of interest. Replaceia141hostwith the host name of interest.-d '{"from": "2016-08-03T15:20:00.236Z", "to": "2016-08-03T15:40:59.237Z", "bin": "1h" }'—The beginning and end of the time range to collect statistics.
Results
This example returns system statistics for a specified host in a cluster. The output is in JSON format.