Logstash output to redis

Hi there,
my logstash will get lots of data from other's API, after filter these data, logstash will output to redis.
I want to ask some questions:

  1. redis is a key-value database, how to let logstash know which is key, others are value?
  2. can I send data as JSON type save to redis?
  3. I don't want to save all data, can I control logstash to choose which data I want to save to redis?
  4. I will use redis to get data I want, and use logstash output to elasticsearch, is there has something I need to notice? and if Q2's answer is yes, JSON type data in logstash will change to array type automatically?

Would you please help me to solve these problems?
Thanks
Kase

Hi kase,

Have you had a look at https://www.elastic.co/guide/en/logstash/current/plugins-outputs-redis.html?

This should solve a lot of the doubts you have. For logstash, the final output is a json structure which is a key-value structure.

Answers to all your questions is Yes. For the last question, you could control the data type using this setting.

Hi @NerdSec,
thanks for your answer, yes, I've read this document before, but still not sure it would be work as I predict or not...
I will try to send data to logstash, see if the result is what I need, then come and share the follow-up, thank you!

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