Sending same logs to two different Redis keys

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

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