I have the following query:
application_id=12345 STATUS_CODE IN (300, 400, 500)| head 10
How can I modify this such that I can get 2 unique rows where STATUS_CODE is 300, 2 unique rows where STATUS_CODE is 400, 2 unique rows where STATUS_CODE is 500 and so on?
Above query ends up fetching 10 rows of the first ones it can find thus end up with all 10 rows as STATUS_CODE as 300 in correctly.
Pls advice. Thanks.
The dedup command will keep the first n events with unique field values.
index=foo application_id=12345 STATUS_CODE IN (300, 400, 500)
| dedup 2 STATUS_CODE
The dedup command will keep the first n events with unique field values.
index=foo application_id=12345 STATUS_CODE IN (300, 400, 500)
| dedup 2 STATUS_CODE