# Logstash Redis and pattern\_channel question

**URL:** <https://discuss.elastic.co/t/logstash-redis-and-pattern-channel-question/59080>\
**Category:** Logstash\
**Created:** [August 26, 2016, 9:13pm UTC](https://discuss.elastic.co/t/logstash-redis-and-pattern-channel-question/59080 "2016-08-26T21:13:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![romspacenut](https://avatars.discourse-cdn.com/v4/letter/r/96bed5/32.png) [@romspacenut](https://discuss.elastic.co/u/romspacenut)\
**Post date:** [August 26, 2016, 9:13pm UTC](https://discuss.elastic.co/t/logstash-redis-and-pattern-channel-question/59080/1 "2016-08-26T21:13:16Z")

</div>

I'm in the middle of shipping our logs from beats to a Redis queue using pattern\_channel. I've read that the metadata is not not available through the Redis input. Currently our logs ship directly from beats to logstash. So in our output, indexes were created via "index =\> "%{[@metadata][beat]}-%{+[YYYY.MM](http://YYYY.MM)}"" which doesn't work using Redis. I see that when I PSUBSCRIBE in Redis that the index information "filebeat-test-server1" and "filebeat-test-server2" are in Redis.

Example of data stream:

1. "pmessage"

2. "filebeat\*"

3. "filebeat-test-server1"

4. "{"@timestamp":"2016-08-26T21:05:46.639Z","beat":{"hostname":"

5. "pmessage"

6. "filebeat\*"

7. "filebeat-test-server2"

8. "{"@timestamp":"2016-08-26T21:05:46.639Z","beat":{"hostname":\

My question is, how to I retrieve that information? I'm looking to get that info and add it as a new field then using that new field to create the index in ES.

---

<div class="post-metadata">

**Author:** ![romspacenut](https://avatars.discourse-cdn.com/v4/letter/r/96bed5/32.png) [@romspacenut](https://discuss.elastic.co/u/romspacenut)\
**Post date:** [August 26, 2016, 10:04pm UTC](https://discuss.elastic.co/t/logstash-redis-and-pattern-channel-question/59080/2 "2016-08-26T22:04:57Z")

</div>

Found a simple solution by just adding a field in prospectors and using that to create the index.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:41am UTC](https://discuss.elastic.co/t/logstash-redis-and-pattern-channel-question/59080/3 "2017-07-06T04:41:22Z")

</div>


