Skip to content

Instantly share code, notes, and snippets.

cjlyons81

Block or report user

Report or block cjlyons81

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@cjlyons81
cjlyons81 / json-to-event.rb
Last active Aug 20, 2019
Ruby filter for parsing json and adding to event in a Logstash pipeline
View json-to-event.rb
# ruby {
# path => "/etc/logstash/ancillary/ruby-scripts/json-to-event.rb" <--Example path to ruby file, be sure to update with yours
# script_params => {
# "json_field" => "notes" <--Specify the field you want to extract json from (default: message)
# "array" => true <--Do you want to flatten arrays within the json (default: false)
# "target" => "parent" <--Specify root level name if wanted (default: root of document)
# "tag_match_failure" => true <--Do you want to tag event when json regex match fails (defaults: false)
# }
# }
You can’t perform that action at this time.