sony
sony

Reputation: 23

separate indexes on logstash

Currently I have logstash configuration that pushing data to redis, and elastic server that pulling the data using the default index 'logstash'. I've added another shipper and I've successfully managed to move the data using the default index as well. My goal is to move and restore that data on a separate index, what is the best way to achieve it?

This is my current configuration using the default index:

shipper output:

output {
  redis {
    host => "my-host"
    data_type => "list"
    key => "logstash"
    codec => json
  }
}

elk input:

input {
        redis {
            host => "my-host"
            data_type => "list"
            key => "logstash"
            codec => json
          }
}

Upvotes: 2

Views: 1096

Answers (1)

A.N.B Akhilesh
A.N.B Akhilesh

Reputation: 211

Try to give the index filed in output. Give the name you want and then run that. so a seperate index will be created for that.

input { redis { host => "my-host" data_type => "list" key => "logstash" codec => json } }

output { stdout { codec => rubydebug } elasticsearch { index => "redis-logs" cluster => "cluster name" } }

Upvotes: 1

Related Questions