Closed S1rH1ll closed 6 years ago
Having the same error.
@S1rH1ll @alext234 Thank you for reporting the issue - this is a known issue in Logstash 6.0.0. The fix will be in the next 6.0.1 and 6.1.0 releases of Logstash, which will be released shortly.
I am still facing this issue in logstash 7.9.2
.
plugin version : logstash-input-http_poller (5.0.2)
error message :
[FATAL] 2020-11-10 07:40:09.980 [LogStash::Runner] runner - The given configuration is invalid. Reason: undefined method get for #<Java::OrgLogstashConfigIrImperative::PluginStatement:0x593fcbe7>
conf file :
# The # character at the beginning of a line indicates a comment. Use
# comments to describe your configuration.
input {
#beats {
#port => "5044"
http_poller
{
urls => {
cloudflare => " https://api.cloudflare.com/client/v4/user/audit_logs"
{
method => get
headers => {
"X-Auth-Email" => "email@redacted.com"
"X-Auth-Key" => "api_key"
"Content-Type" => "application/json"
}
}
}
}
#}
}
# The filter part of this file is commented out to indicate that it is
# optional.
filter {
json
{
source => "message"
}
}
output {
stdout { codec => rubydebug }
}
Hi,
I am unable to start logstash once I configured the http_poller, I tested the plugin on Windows and Debian Jessie.
logs :
[2017-11-30T10:22:56,915][ERROR][logstash.agent ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"NoMethodError", :message=>"undefined method
get' for #<Hash:0x46a23c28>\nDid you mean? gem", :backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/compiler/lscl.rb:210:in
expr'", "org/jruby/RubyArray.java:2486:inmap'", "/usr/share/logstash/logstash-core/lib/logstash/compiler/lscl.rb:202:in
expr'", "/usr/share/logstash/logstash-core/lib/logstash/compiler/lscl.rb:133:inexpr'", "org/jruby/RubyArray.java:2486:in
map'", "/usr/share/logstash/logstash-core/lib/logstash/compiler/lscl.rb:98:inexpr_attributes'", "/usr/share/logstash/logstash-core/lib/logstash/compiler/lscl.rb:76:in
expr'", "org/jruby/RubyArray.java:2486:inmap'", "/usr/share/logstash/logstash-core/lib/logstash/compiler/lscl.rb:69:in
expr'", "/usr/share/logstash/logstash-core/lib/logstash/compiler/lscl.rb:48:inblock in compile'", "org/jruby/RubyArray.java:1734:in
each'", "/usr/share/logstash/logstash-core/lib/logstash/compiler/lscl.rb:46:incompile'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:46:in
compile_ast'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:50:incompile_imperative'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:54:in
compile_graph'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:12:inblock in compile_sources'", "org/jruby/RubyArray.java:2486:in
map'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:11:incompile_sources'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:107:in
compile_lir'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:49:ininitialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:215:in
initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline_action/create.rb:35:inexecute'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:335:in
block in converge_state'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:141:inwith_pipelines'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:332:in
block in converge_state'", "org/jruby/RubyArray.java:1734:ineach'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:319:in
converge_state'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:166:inblock in converge_state_and_update'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:141:in
with_pipelines'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:164:inconverge_state_and_update'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:90:in
execute'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:362:inblock in execute'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/task.rb:24:in
block in initialize'"]}config file :