# Redis input plugin not taking parameter format="json\_event"?

**URL:** <https://discuss.elastic.co/t/redis-input-plugin-not-taking-parameter-format-json-event/58282>\
**Category:** Logstash\
**Created:** [August 17, 2016, 6:01pm UTC](https://discuss.elastic.co/t/redis-input-plugin-not-taking-parameter-format-json-event/58282 "2016-08-17T18:01:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ravikumar](https://avatars.discourse-cdn.com/v4/letter/r/ed8c4c/32.png) [@ravikumar](https://discuss.elastic.co/u/ravikumar)\
**Post date:** [August 17, 2016, 6:01pm UTC](https://discuss.elastic.co/t/redis-input-plugin-not-taking-parameter-format-json-event/58282/1 "2016-08-17T18:01:35Z")

</div>

Hi all,  
I am facing some issues while installing new KEL on my redhat linux 7.  
java 8 ,elastic serach-2.3.5 , logstash-Version : 2.3.4,kibana -4.5.4 and redis-2.8.19.

1. logstash keep crashing  
for this i have verified my logsatsh config file and ran sudo service logstash configtest ,got Configuration fails.  
.
2. after that I have made a chnage to config file

modifying the format="json\_event" to codec =\> {line =\> {format =\> "json\_event"}}  
configuration test OK.  
But the logstash service still crashing

my config file :  
input {  
tcp { port =\> 28777 codec=\>"plain" type=\>"sample" }  
tcp { port =\> 28778 codec=\>"json" type=\>"sample2" }  
redis {  
host =\> "127.0.0.1"  
type =\> "redis-input"  
# these settings should match the output of the agent  
data\_type =\> "list"  
key =\> "logstash"  
# We use json\_event here since the sender is a logstash agent  
codec =\> { line =\> {format =\> "json\_event"}}  
} }  
output {  
elasticsearch {  
embedded =\> false  
# bind\_host =\> "localhost"  
hosts =\> ["localhost:9200"]  
cluster =\> "elasticsearch-DEV"  
node\_name =\> "logstash"}  
}

Logs:  
exception=\>#\<NoMethodError: undefined method `decode' for ["line", {"format"=>"json_event"}]:Array>, :backtrace=>["/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-redis-2.0.6/lib/logstash/inputs/redis.rb:182:in`queue\_event'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-redis-2.0.6/lib/logstash/inputs/redis.rb:220:in `list_batch_listener'", "org/jruby/RubyArray.java:1613:in`each'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-redis-2.0.6/lib/logstash/inputs/redis.rb:219:in `list_batch_listener'", "org/jruby/RubyMethod.java:124:in`call'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-redis-2.0.6/lib/logstash/inputs/redis.rb:204:in `list_runner'", "org/jruby/RubyMethod.java:120:in`call'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-redis-2.0.6/lib/logstash/inputs/redis.rb:123:in `run'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.4-java/lib/logstash/pipeline.rb:342:in`inputworker'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.4-java/lib/logstash/pipeline.rb:336:in `start\_input'"], :level=\>:error, :file=\>"logstash/inputs/redis.rb", :line=\>"187", :method=\>"queue\_event"}  
{:timestamp=\>"2016-08-17T11:36:22.399000-0600", :message=\>"stopping", :plugin=\>\<LogStash::Inputs::Tcp port=\>28778, codec=\>\<LogStash::Codecs::JSON charset=\>"UTF-8"\>, type=\>"sample2", host=\>"0.0.0.0", data\_timeout=\>-1, mode=\>"server", ssl\_enable=\>false, ssl\_verify=\>true, ssl\_key\_passphrase=\>\>, :level=\>:debug, :file=\>"logstash/inputs/base.rb", :line=\>"81", :method=\>"do\_stop"}

Please suggest me here and let me know if I am missing anything .

---

<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:** [August 18, 2016, 5:41pm UTC](https://discuss.elastic.co/t/redis-input-plugin-not-taking-parameter-format-json-event/58282/2 "2016-08-18T17:41:42Z")

</div>

Use `codec => json` for the redis input too.

---

<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:** [July 6, 2017, 4:42am UTC](https://discuss.elastic.co/t/redis-input-plugin-not-taking-parameter-format-json-event/58282/3 "2017-07-06T04:42:43Z")

</div>


