# Logstash Input redis

**URL:** <https://discuss.elastic.co/t/logstash-input-redis/132194>\
**Category:** Logstash\
**Created:** [May 16, 2018, 5:42pm UTC](https://discuss.elastic.co/t/logstash-input-redis/132194 "2018-05-16T17:42:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shivkumar](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@shivkumar](https://discuss.elastic.co/u/shivkumar)\
**Post date:** [May 16, 2018, 5:42pm UTC](https://discuss.elastic.co/t/logstash-input-redis/132194/1 "2018-05-16T17:42:06Z")

</div>

Hello I am using logstash 5.6.9. I am simply trying to read from my local redis server and print it to console using logstash, here is my configuration 🙂

input {

```
redis {
	host => 'localhost'
	data_type => 'list'
	key => 'tutorials'
	type => 'redis-input'
}

```

}

output {stdout { codec =\> rubydebug } }

Still I am facing \_jsonparsefailure .

I am inserting data to my redis server using the following command.

```
LPUSH tutorials aaa
LPUSH tutorials aa
LPUSH tutorials a

```

Here is a snapshot of my error what I am doing wrong here.

Basically I want to get all the values under the key and check if a particular value exists.

Thank you

 ![redis_error](https://us1.discourse-cdn.com/elastic/original/3X/4/e/4ec9d3a016a6d17dd75bfe4b940ae405da7ef5d4.png)

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [May 16, 2018, 7:46pm UTC](https://discuss.elastic.co/t/logstash-input-redis/132194/2 "2018-05-16T19:46:44Z")

</div>

> Here is a snapshot of my error what I am doing wrong here.

The redis input defaults to the json codec. If you're not sending JSON data you should configure it to use the plain codec.

> Basically I want to get all the values under the key and check if a particular value exists.

Logstash will pop the values one by one. I'm not sure I understand what you're trying to accomplish.

---

<div class="post-metadata">

**Author:** ![shivkumar](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@shivkumar](https://discuss.elastic.co/u/shivkumar)\
**Post date:** [May 17, 2018, 3:55am UTC](https://discuss.elastic.co/t/logstash-input-redis/132194/3 "2018-05-17T03:55:58Z")

</div>

Hello magnusbaeck,

Thank you for response.

could you please go through this [link](https://stackoverflow.com/questions/50376319/logstash-getting-values-for-key-from-redis) , which has more detailed explanation of my query.

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:** [June 14, 2018, 3:56am UTC](https://discuss.elastic.co/t/logstash-input-redis/132194/4 "2018-06-14T03:56:00Z")

</div>

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