json extractor prefix #1646
json extractor prefix #1646
Comments
+1 Log messages like this cannot be processed by Graylog, causing them to be dropped, which I think is a really bad and surprising behaviour. At the very least, this should be documented in JSON extractor page about reserved fields: what they are, how to overwrite them correctly, etc. |
same problem with symfony exception JSON.... message field is override. |
I am also seeing a very similar issue with the JSON extractor not applying ISO8601 timestamp format correctly, then dropping the message. |
+1 |
This is a really big issue. Our messages all have a Processing messages like that with the JSON extractor leads to this error: "[MapperParsingException[failed to parse [level]]; nested: NumberFormatException[For input string: "INFO"];]" |
Are there any plans to get this feature added to the latest version of GrayLog2? Would love to be able to send JSON strings using FileBeat, and have GrayLog decode the messages. |
Is this only about adding a static prefix to the extractor configuration? |
@kroepke. Yes, When the extracted JSON fields get added to the event, it would be ideal if it was something like prefix_message, prefix_timestamp, prefix_level, etc. Events with keys like (message, timestamp, level), get dropped by the JSON extractor. |
@levisbakalinsky Ok, that seems easy enough to do. I'll put it into 2.1, should be a quick fix. |
As a workaround I found you can add a "replace with regex" extractor before the json extractor and use that to rename the offending json key with ugly regex hackery... |
@kroepke, thank you. Looking forward to that release. |
@ulope, is it possible to reg/replace message & level in one go? |
Right now you can not add a prefix to the json parser, this means if a json contains fields like timestamp or message the root field is overwritten.
In this case the message cannot be written to elasticsearch
This is the a sample field sensu:
With prefix graylog could create new fields like
sensu_level
sensu_message
...
The text was updated successfully, but these errors were encountered: