FLUENT CUSTOM PLUGIN #4045
Unanswered
kandula-uday
asked this question in
Q&A
Replies: 1 comment 4 replies
-
I think this will be helpful. https://github.com/fluent/fluentd/blob/v1.15.3/lib/fluent/plugin/filter_grep.rb#L44-L49 @rules.each do |rule|
p rule.pattern_regexp
end |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
hi All, Can anyone please help me with this? I am developing a custom plugin that will take Regular expression and search the pattern in the message
config_section :rule, param_name: :rules, multi:true do
config-param : pattern_regexp, :regexp, default :/^$/
def configure(conf)
super
@rp = conf['pattern_regexp']
puts @rp
end
def filter(tag, time, record)
record.each do |key, value|
if value =~ @rp
end
record
end
end
end
conf. file
@Mask
pattern_regexp /[a-zA-Z0-9.]+t$/
but I am getting nil class.. @rp is not holding the conf value of pattern_regexp i am getting nil error
Beta Was this translation helpful? Give feedback.
All reactions