logstash-plugins / logstash-input-rss

RSS input for Logstash
Apache License 2.0
15 stars 23 forks source link

Undefined method for nil:NIlClass #24

Open DBARUNNER opened 7 years ago

DBARUNNER commented 7 years ago

here is the logstash configuration input { rss { interval => 60000 url => "http://internews.org/rss.xml" type => "tribune" } }

filter { if [type] == "tribune" { ruby { code => "require 'digest/md5'; event.set('[@metadata]''[computed_id]', Digest::MD5.hexdigest(event.get('[message]')))" } }

} output { stdout { codec => dots } if [type] == "tribune" { elasticsearch { hosts => "10.20.1.123" index => "rss_index_world" document_type => "tribune" document_id => "%{[@metadata][computed_id]}" } }

}

when i run it give me the "nown error while parsing the feed {:url=>"http://pashtovoa.com/api/zpktve-put", :exception=>#<NoMethodError: undefined method `items' for nil:NilClass>}

fmbento commented 6 years ago

Hi @DBARUNNER ,

Were you able to fix this? I'm facing the same issue with any RSS Feed I through at it, logstash 5.6.4

Appreciate the sharing! Thanks.

fmbento commented 6 years ago

Ops, bad RSS feeds...

Now I have a new one: "tag is too much in tag \<item>"

matthew-williams commented 6 years ago

This is the error I am getting over and over. Similar

[2018-01-05T09:53:27,235][INFO ][logstash.inputs.beats ] Beats inputs: Starting input listener {:address=>"0.0.0.0:5044"} [2018-01-05T09:53:27,238][INFO ][logstash.inputs.rss ] Registering RSS Input {:url=>"https://threatpost.com/category/vulnerabilities/feed", :interval=>300} [2018-01-05T09:53:27,242][INFO ][logstash.inputs.udp ] Starting UDP listener {:address=>"0.0.0.0:5140"} [2018-01-05T09:53:27,245][INFO ][logstash.pipeline ] Pipeline main started [2018-01-05T09:53:27,250][INFO ][logstash.inputs.udp ] UDP listener started {:address=>"0.0.0.0:5140", :receive_buffer_bytes=>"106496", :queue_size=>"2000"} [2018-01-05T09:53:27,252][INFO ][logstash.inputs.rss ] Polling RSS {:url=>"https://threatpost.com/category/vulnerabilities/feed"} [2018-01-05T09:53:27,269][INFO ][org.logstash.beats.Server] Starting server on port: 5044 [2018-01-05T09:53:27,333][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600} [2018-01-05T09:53:28,205][ERROR][logstash.inputs.rss ] Uknown error while parsing the feed {:url=>"https://threatpost.com/category/vulnerabilities/feed", :exception=>#<NoMethodError: undefined method `items' for nil:NilClass>} [2018-01-05T09:53:28,206][INFO ][logstash.inputs.rss ] Command completed {:command=>nil, :duration=>0.954}