Facing error


(Yogesh Kumar) #1

File content:
input {
file {
path => "/app/pentaho/pentaho/pdi-ee/data-integration-server/tomcat/logs/localhost-access.2018-11-23.log"
type => "tomcat_access"
}

The filter part of this file is commented out to indicate that it is

optional.

filter {

}

output {
stdout { codec => rubydebug }
}

Tried
bin/logstash -e 'input { file {path => "/app/pentaho/pentaho/pdi-ee/data-integration-server/mcat/logs/localhost-access.2018-11-23.log" type => "tomcat_access" } output { stdout {} }'

tried

[root@pentapp-ch2-f2i ~]# /app/platform/logstash-6.5.0/bin/logstash -f /app/platform/logstash-6.5.0/config/04_test.conf
Sending Logstash logs to /app/platform/logstash-6.5.0/logs which is now configured via log4j2.properties
[2018-11-24T11:04:11,740][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2018-11-24T11:04:11,782][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"6.5.0"}
[2018-11-24T11:04:15,169][ERROR][logstash.agent ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of #, => at line 12, column 15 (byte 266) after input {\n file {\n path => "/var/log/curator.log"\n type => "curator"\n }\nfile {\n path => "/app/pentaho/pentaho/pdi-ee/data-integration-server/tomcat/logs/localhost-access.2018-11-23.log"\n type => "tomcat_access"\n}\n\noutput {\nelasticsearch ", :backtrace=>["/app/platform/logstash-6.5.0/logstash-core/lib/logstash/compiler.rb:41:in compile_imperative'", "/app/platform/logstash-6.5.0/logstash-core/lib/logstash/compiler.rb:49:incompile_graph'", "/app/platform/logstash-6.5.0/logstash-core/lib/logstash/compiler.rb:11:in block in compile_sources'", "org/jruby/RubyArray.java:2486:inmap'", "/app/platform/logstash-6.5.0/logstash-core/lib/logstash/compiler.rb:10:in compile_sources'", "org/logstash/execution/AbstractPipelineExt.java:149:ininitialize'", "/app/platform/logstash-6.5.0/logstash-core/lib/logstash/pipeline.rb:22:in initialize'", "/app/platform/logstash-6.5.0/logstash-core/lib/logstash/pipeline.rb:90:ininitialize'", "/app/platform/logstash-6.5.0/logstash-core/lib/logstash/pipeline_action/create.rb:42:in block in execute'", "/app/platform/logstash-6.5.0/logstash-core/lib/logstash/agent.rb:92:inblock in exclusive'", "org/jruby/ext/thread/Mutex.java:148:in synchronize'", "/app/platform/logstash-6.5.0/logstash-core/lib/logstash/agent.rb:92:inexclusive'", "/app/platform/logstash-6.5.0/logstash-core/lib/logstash/pipeline_action/create.rb:38:in execute'", "/app/platform/logstash-6.5.0/logstash-core/lib/logstash/agent.rb:317:inblock in converge_state'"]}
[2018-11-24T11:04:16,014][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}