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"