Return Unique Field Values


(Steve Applegate) #1

Greetings! I would like to be able to run a search that would return a list of messages that have only unique values in the client_ip field. Is this possible? I need to export the resulting list for processing in another application. When I report on all IP addresses, the result contains millions of records and is too large to process. I just need a list of unique IP addresses, which is only a few thousand


(Pedro Miguel Pereira Serrano Martins) #2

I am not sure this is possible wit the current querying language ( I think its not ):

http://docs.graylog.org/en/2.4/pages/queries.html

But what I know is possible, is that you can:

  1. Do your search
  2. Export the Data as CSV
  3. post process this data with a script and pick only unique IPs

As long as output order doesn’t matter, this should have you covered.

Another solution would be to create your own Plugin for Graylog2 that does that:

http://docs.graylog.org/en/2.4/pages/plugins.html


#3

This has been requested a handful of times in the past. Its a shame that it isn’t possible without the steps noted above since other Elasticsearch backed logging systems are able to do this without the extra steps.


(system) #4

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.