Hi, we have been using Graylog and it’s been working really well for us.
We are in the process of upgrading from 3.1 to 4.0.1 and have found the API for searching has changed significantly. We have resolved everything we are aware of except for getting a count of unique values of a field via the API.
We currently use something along the lines of:
curl http://hptb032.dev.hou.compute.pgs.com:9000/api/search/universal/relative/terms?field=container_id&query=*&range=30
The part we care about in the result is:
"terms": {
"a7e59aed4309e57823b4cba53409ed043e6b9150f3d3f4b045eef60ad7c2626f": 3,
"5530c8589ec51dde61ed7ca5c1d51003880c14336a34604d7d0c624cc19d23bc": 1,
"d34895780edc14af512d005d3e05d42c36b91c4feb01bf37520db8512dbf3376": 6,
"8b6a1b6b68a728c10309a26c5e5ef246e663cef5371e795e05d4677042ec5680": 1,
"0cd9553dd183b6ead34cdc96142f47c7fd4cffc9a74c852bc023f448739d0952": 30,
"764264d1b906ee40cf8201a7280c0b320db32f7b987214db80f05b141088f51e": 1,
"278a14dcf709ebd88c4dd6abd747db524d2314dd49b0d5124aaba90d36dcb4cc": 1,
"4111ec2210bf9cec0cd7657975e5b48594ec47643e5f79b0c0513986bc79f2f2": 1
},
What I am trying to figure out is how I would construct a similar query to list the unique values of a field plus their count with release 4 of Graylog?
I have found plenty of responses using the terms endpoint, but so far nothing that helps for newer versions. Any pointers would be much appreciated.