HTTP output plugin failed to execute

Trying to use the http output plugin and have some basic newbie questions on the payload. I am getting these errors when trying to use the plugin.

Jul 28 13:57:00 nt-logstash logstash[335749]: [2022-07-28T13:57:00,180][ERROR][logstash.agent           ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:itentialCommitQueue, :exception=>"Java::JavaLang::IllegalStateException", :message=>"Unable to configure plugins: (ConfigurationError) Something is wrong with your configuration.", :backtrace=>["org.logstash.config.ir.CompiledPipeline.<init>(CompiledPipeline.java:120)", "org.logstash.execution.JavaBasePipelineExt.initialize(JavaBasePipelineExt.java:85)", "org.logstash.execution.JavaBasePipelineExt$INVOKER$i$1$0$initialize.call(JavaBasePipelineExt$INVOKER$i$1$0$initialize.gen)", "org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:837)", "org.jruby.ir.runtime.IRRuntimeHelpers.instanceSuper(IRRuntimeHelpers.java:1169)", "org.jruby.ir.runtime.IRRuntimeHelpers.instanceSuperSplatArgs(IRRuntimeHelpers.java:1156)", "org.jruby.ir.targets.InstanceSuperInvokeSite.invoke(InstanceSuperInvokeSite.java:39)", "usr.share.logstash.logstash_minus_core.lib.logstash.java_pipeline.RUBY$method$initialize$0(/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:48)", "org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:80)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:70)", "org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:207)", "usr.share.logstash.logstash_minus_core.lib.logstash.pipeline_action.create.RUBY$method$execute$0(/usr/share/logstash/logstash-core/lib/logstash/pipeline_action/create.rb:50)", "usr.share.logstash.logstash_minus_core.lib.logstash.agent.RUBY$block$converge_state$2(/usr/share/logstash/logstash-core/lib/logstash/agent.rb:381)", "org.jruby.runtime.CompiledIRBlockBody.callDirect(CompiledIRBlockBody.java:138)", "org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:58)", "org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:52)", "org.jruby.runtime.Block.call(Block.java:139)", "org.jruby.RubyProc.call(RubyProc.java:318)", "org.jruby.internal.runtime.RubyRunnable.run(RubyRunnable.java:105)", "java.base/java.lang.Thread.run(Thread.java:829)"]}

Config

output {
        rabbitmq {
                exchange => "amq.direct"
                exchange_type => "direct"
                durable => true
                passive => true # had to patch the stock plugin for this to work
                key => 'to-ls-syslog'
                host => ["localhost"]
                user => "logstash"
                password => "logstash"
                heartbeat => 10
        }
        http {
                url => "https://10.10.10.10:3443/workflow_engine/startJobWithOptions/test-logstash"
                http_method => "post"
                format => "json"
                # mapping => [ "variables", "event", "%{message}" ]
                headers => ['Authorization', 'Basic AAAAAAAAAAAAAAAAAAAAAA==']
                verify_ssl => false
        } 
}

The api call is to an external system that looks for a payload similar to this

payload = json.dumps({
  "options": {
    "description": "Example job description",
    "variables": {
      "event": {
        "data": "example data",
        "more_data": "example more data"
      }
    }
  }
})

How can I test logstash to see what the payload is for #{message}? Or format the http plugin to look like the request above with the "event" key?

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