GET Aggregated Events +path
Queries Operations for Logs for groups of events.
Specifies constraints on the events to retrieve. See the specifying constraints section of /events for details.
The maximum number of events to retrieve.
The time to wait for a response. If the complete result is not
available within that time, a partially result is returned and the
complete
flag is set to false
.
The format of query results in the reponse.
The namespace of a content pack to take fields from. If provided, fields defined in the given content-pack are returned in the response, in addition to static fields. Specify this parameter more than once to extract fields from several content packs. If this parameter is not specified, then only static fields are returned in the response payload
The time-span of time range bins, in milliseconds.
The aggregation function to use. One of the following values:
- COUNT: The count of the events in each bin is returned
- SAMPLE: An arbitrary event from each bin is returned
- UCOUNT: The count of unique values in the bin
- MIN: The minimum value in the bin
- MAX: The maximum value in the bin
- SUM: The sum of the values in the bin
- STDDEV: The standard deviation of the values in the bin
- VARIANCE: The variance of the values in the bin
The field to aggregate. This parameter is required for all
aggregation functions, except COUNT
and SAMPLE
. It is not
supported for COUNT
and SAMPLE
.
Specify additional GROUP BY fields. Use subsequent key=value pairs to specify custom bins for numeric fields: use bin-width=12345 to specify fixed-width bins; use bins=10,100,500 to specify a specific set of bin boundaries; if neither is specified then each individual value of the field is assigned to its own bucket.
The aggregation function to use for ordering the bins. Those are
the same functions as in the aggregation-function query
parameter, with the exception of SAMPLE
which is not supported.
The field to sort by.
The sort direction.
{
"complete": true,
"duration": 90,
"results": [
{
"minTimestamp": 0,
"maxTimestamp": 9223372036828800000,
"event_type": "v4_4a6fdf4b",
"COUNT(event)": 50,
"SAMPLE(event)": {
"text": "[2017-06-13 15:27:22.606] ...",
"timestamp": 1497353242606,
"timestampString": "2017-06-13 15:27:22.606 GMT+04:00",
"appname": "Vpxa",
"event_type": "v4_df1bc800",
"hostname": "li-qe-esx5.vmware.com",
"source": "127.0.0.1"
}
},
{
"minTimestamp": 0,
"maxTimestamp": 9223372036828800000,
"event_type": "v4_dc0c9904",
"COUNT(event)": 100,
"SAMPLE(event)": {
"text": "[2017-06-13 15:27:52.491-0700] ...",
"timestamp": 1497353272491,
"timestampString": "2017-06-13 15:27:52.491 GMT+04:00",
"event_type": "v4_dc0c9904",
"source": "127.0.0.1"
}
}
]
}
curl -H 'Authorization: <value>' https://{api_host}/api/v2/aggregated-events/{+path}?group-by-field=v