# Sending same logs to two different Redis keys

**URL:** <https://discuss.elastic.co/t/sending-same-logs-to-two-different-redis-keys/78012>\
**Category:** Logstash\
**Created:** [March 9, 2017, 3:37pm UTC](https://discuss.elastic.co/t/sending-same-logs-to-two-different-redis-keys/78012 "2017-03-09T15:37:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ash007](https://avatars.discourse-cdn.com/v4/letter/a/ccd318/32.png) [@ash007](https://discuss.elastic.co/u/ash007)\
**Post date:** [March 9, 2017, 3:37pm UTC](https://discuss.elastic.co/t/sending-same-logs-to-two-different-redis-keys/78012/1 "2017-03-09T15:37:45Z")

</div>

Is there a way i can send same data to two different redis outputs.  
I have tried sending same data to two different elasticsearch clusters and it works.  
Following is the configuration i am trying:

```
filter {
if "some type exists" {
mutate {
        add_tag => ["priority"]
}
} 
}
output {
        redis { //send all data to this key
                host => "HOST"
                db => "DATABASE"
                data_type => 'list'
                key => 'NoPriority'
        }
}
output {
if "priority" in [tags] { // send data with "priority" to this key.
redis {
                host => "HOST"
                db => "DATABASE"
                data_type => 'list'
                key => 'WithPriority'
        }
} 
}

```

But with this config i am getting two different sets of data,  
1: First key has the data that does not have "priority" in tags. I need all the data including tags:["priority"] in first key.(this needs to be fixed.)  
2: Second key contains data with tags:["priority"] (which is correct)

Is there something i am missing in the configuration?  
any suggestions are of great help.  
Thanks

---

<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:** [April 6, 2017, 3:38pm UTC](https://discuss.elastic.co/t/sending-same-logs-to-two-different-redis-keys/78012/2 "2017-04-06T15:38:34Z")

</div>

Closed on April 6, 2017, 3:38pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
