Graphite input and output logstash

Hi Guys ,

I am listing to one port where i am getting graphite and i want to send metrics to another graphite instance i am using graphite input and output plugins

This my config
input {
graphite {
port => 8686
}

output {

#output to graphite#
graphite {
id => "to_graphite"
fields_are_metrics => true
host => "IP TO SEND"
}
}

i am getting this error

[2020-03-05T20:44:30,889][ERROR][logstash.agent ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of #, => at line 7, column 9 (byte 61) after input {\n graphite {\n port => 8686\n }\n\noutput {\n stdout", :backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:41:in compile_imperative'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:49:in compile_graph'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:11:in block in compile_sources'", "org/jruby/RubyArray.java:2577:in map'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:10:in compile_sources'", "org/logstash/execution/AbstractPipelineExt.java:151:in initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:22:in initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:90:in initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline_action/create.rb:43:in block in execute'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:96:in block in exclusive'", "org/jruby/ext/thread/Mutex.java:165:in synchronize'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:96:in exclusive'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline_action/create.rb:39:in execute'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:334:in block in converge_state'"]}
[2020-03-05T20:44:31,025][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2020-03-05T20:44:36,101][INFO ][logstash.runner ] Logstash shut down.

Can someone please help

No it is not. The error message says Expected one of #, => at line 7, column 9 (byte 61) after input {\n graphite {\n port => 8686\n }\n\noutput {\n stdout" and you do not show a stdout output in your config.

Try to delete this line

input {
graphite {
port => "8787"
codec => "graphite"
}

}
output {

graphite {
id => "to_graphite"
host => "ip"
}
}

[2020-03-06T12:05:37,652][ERROR][logstash.inputs.graphite ] Error in Netty pipeline: org.jruby.exceptions.NoMethodError: (NoMethodError) undefined method split' for nil:NilClass [2020-03-06T12:05:37,911][ERROR][logstash.inputs.graphite ] Error in Netty pipeline: org.jruby.exceptions.NoMethodError: (NoMethodError) undefined method split' for nil:NilClass
[2020-03-06T12:05:42,385][ERROR][logstash.inputs.graphite ] Error in Netty pipeline: org.jruby.exceptions.NoMethodError: (NoMethodError) undefined method `split' for nil:NilClass

now i have new issue :frowning:

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