To get the pipeline statistics for a specified cluster, send the following request:
POST https://<IA_IP_address>:<port_number>/stats/v1/pipelinestats/<cluster_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.
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/pipelinestats/ia150
Required header:
Cookie: px=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Request body:
{
"from": "2016-04-29T15:20:00.236Z",
"to": "2016-04-29T15:40:59.237Z",
"bin": "10m"
}Pipeline statistics for a cluster: Response
HTTP/1.1 [Response Code] [Response Message] Server: [Server] Date: [Date] Content-Type: [Content Type] indexedRecords: [Indexed Records] droppedRecords: [Dropped Records]
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.
Indexed Records—The number of documents successfully indexed into Elasticsearch.
Dropped Records—The number of documents that are not indexed into Elasticsearch due to an error.
Example
HTTP/1.1 200 OK
Server: nginx
Date: Fri, 29 Apr 2016 18:18:18 GMT
Content-Type: application/json; charset=utf-8
{
"ia141cluster": {
"2016-04-29T15:20:00.000Z": {
"indexedRecords": 578951,
"droppedRecords": 0
},
"2016-04-29T15:30:00.000Z": {
"indexedRecords": 806765,
"droppedRecords": 0
},
"2016-04-29T15:40:00.000Z": {
"indexedRecords": 79897,
"droppedRecords": 0
},
"2016-04-29T15:50:00.000Z": {
"indexedRecords": 0,
"droppedRecords": 0
}
}
}cURL code sample: Pipeline statistics for a cluster
curl -k -X POST -H "Content-Type: Application/json" --cookie "px=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" https://xxx.xxx.xxx.xxx:443/stats/v1/pipelinestats/ia141cluster -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/pipelinestats/ia141cluster—The statistics request URL. Replacexxx.xxx.xxx.xxxwith the IP address of your NDR appliance. Replaceia141clusterwith the cluster 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 pipeline statistics for a specified cluster. The output is in JSON format.