Fl4m3Ph03n1x
(Pedro Miguel Pereira Serrano Martins)
1
Background
I am logging messages in Graylog2 and I need to evaluate messages based on the order they arrive.
Upon making a search Graylog presents me the information ordered by Timestamp, which is very useful:
For Graylog, that’s an opaque blob in the “message” field, not a unique timestamp. If you want to further process the JSON blob from the “message” field, you’ll have to extract it using a JSON extractor or a processing pipeline rule.
Fl4m3Ph03n1x
(Pedro Miguel Pereira Serrano Martins)
3
Oh, I am aware of that. I don’t care about that field, I am merely using it to identify where a message should be. If in the web interface the message with that specific ID is in row 1, then in the CSV I expected the same.
As for the issue you linked to, I take it Graylog2 is using the _doc flag. I have a few questions:
Does it mean it is incapable of giving me a CSV in the correct order because it is “working as intended”?
Do I need to make a REST GET request to ElasticSearch to get the CSV file I need in the order I expect?
Given that the issue was created in 2016, the fact that it is still open means that someone is working on a fix for it or that it is at least acknowledged as a bug?
From a user standpoint, I must say this behavior is rather counter-intuitive.
Either you use the Elasticsearch HTTP API directly (although it doesn’t support CSV) or you post-process the CSV file if order is important to your use case.
Fl4m3Ph03n1x
(Pedro Miguel Pereira Serrano Martins)
5
Thanks. Could you give me some input regarding my last question?