Logstash redis input plugin how to add pattern_channel to message

Viewed 369

We have logstash using redis input plugin, and use pattner_channel to match multiple channels, how to add the channel name to the either event or message.

I see people post same question and use add_field, but those example with static key, not dynamic, just want to know if this is supported.

for example:

input {
    redis {
        host => "127.0.0.1"
        type => "redis-input"
        data_type => "pattern_channel"
        key => "logstash*"
        format => "json_event"
    }
}

and we have following matched pattern, how to add that to the message or event ?

1) "logstash-nodelog-2014.03.07.17"

2) "logstash-javalog-2014.03.07.15"

3) "logstash-applog-2014.03.07.14"

4) "logstash-catalina-2014.03.08.23"

5) "logstash-applog-2014.03.08.23"

6) "logstash-catalina-2014.03.07.15"
1 Answers

Finally I got the solution in the following link. Simply, add an argument to "queue_event" function in "redis.rb" file at logstash input plugin.

Related