Graylog2 / graylog-plugin-pipeline-processor

[DEPRECATED] Graylog Pipeline Message Processor Plugins
https://www.graylog.org/
GNU General Public License v3.0
21 stars 15 forks source link

Add support for JsonNode to ´set_fields()` #228

Closed joschi closed 6 years ago

joschi commented 6 years ago

Sometimes users might want to parse and merge the JSON payload of a message with the Graylog message without knowing the complete structure of the payload or without having a fixed structure which could be selectively merged by using the json_path() method.

This commit essentially adds the possiblity to create a pipeline rule emulating the existing JSON extractor:

rule "json"
when
  // some condition
then
  let json = parse_json(to_string($message.some_field));
  set_fields(json);
end

Refs: https://community.graylog.org/t/parse-unknown-json-with-pipelines/3293/7