new code and output,
it still does not work
input {
file {
path => "\C:\ELK\logstash-6.0.0\data\node-red.txt"
start_position => "beginning"
type => "log"
ignore_older => 0
}
}
filter {
kv {
field_split => "&"
value_split => "="
}
mutate {
convert => ["MODSEN","integer"]
convert => ["I","integer"]
convert => ["TS","float"]
convert => ["BAT","integer"]
convert => ["TCA","float"]
convert => ["HUMA","float"]
convert => ["PA","float"]
convert => ["ANE","float"]
convert => ["PLUV","float"]
convert => ["DIR","float"]
convert => ["US","float"]
convert => ["GPS_LAT","float"]
convert => ["GPS_LNG","float"]
}
}
date{
match => ["TS", "EEE, yy/MM/dd, HH:mm:ss"]
target => "@timestamp"
}
output{
stdout { codec => rubydebug }
elasticsearch {
index => ["log-%{+yyyy}"]
hosts => ["10.10.0.113:9200"]
}
}
C:\ELK\logstash-6.0.0\bin>logstash -f C:\ELK\logstash-6.0.0\data\Tcp.bat
Sending Logstash's logs to C:/ELK/logstash-6.0.0/logs which is now configured via log4j2.properties
[2017-11-28T11:24:01,258][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"fb_apache", :directory=>"C:/ELK/logstash-6.0.0/modules/fb_apache/configuration"}
[2017-11-28T11:24:01,258][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"netflow", :directory=>"C:/ELK/logstash-6.0.0/modules/netflow/configuration"}
[2017-11-28T11:24:01,367][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2017-11-28T11:24:02,492][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2017-11-28T11:24:02,601][ERROR][logstash.agent ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of #, input, filter, output at line 34, column 6 (byte 781) after ", :backtrace=>["C:/ELK/logstash-6.0.0/logstash-core/lib/logstash/compiler.rb:42:in `compile_ast'", "C:/ELK/logstash-6.0.0/logstash-core/lib/logstash/compiler.rb:50:in `compile_imperative'", "C:/ELK/logstash-6.0.0/logstash-core/lib/logstash/compiler.rb:54:in `compile_graph'", "C:/ELK/logstash-6.0.0/logstash-core/lib/logstash/compiler.rb:12:in `block in compile_sources'", "org/jruby/RubyArray.java:2486:in `map'", "C:/ELK/logstash-6.0.0/logstash-core/lib/logstash/compiler.rb:11:in `compile_sources'", "C:/ELK/logstash-6.0.0/logstash-core/lib/logstash/pipeline.rb:107:in `compile_lir'", "C:/ELK/logstash-6.0.0/logstash-core/lib/logstash/pipeline.rb:49:in `initialize'", "C:/ELK/logstash-6.0.0/logstash-core/lib/logstash/pipeline.rb:215:in `initialize'", "C:/ELK/logstash-6.0.0/logstash-core/lib/logstash/pipeline_action/create.rb:35:in `execute'", "C:/ELK/logstash-6.0.0/logstash-core/lib/logstash/agent.rb:335:in `block in converge_state'", "C:/ELK/logstash-6.0.0/logstash-core/lib/logstash/agent.rb:141:in `with_pipelines'", "C:/ELK/logstash-6.0.0/logstash-core/lib/logstash/agent.rb:332:in `block in converge_state'", "org/jruby/RubyArray.java:1734:in `each'", "C:/ELK/logstash-6.0.0/logstash-core/lib/logstash/agent.rb:319:in `converge_state'", "C:/ELK/logstash-6.0.0/logstash-core/lib/logstash/agent.rb:166:in `block in converge_state_and_update'", "C:/ELK/logstash-6.0.0/logstash-core/lib/logstash/agent.rb:141:in `with_pipelines'", "C:/ELK/logstash-6.0.0/logstash-core/lib/logstash/agent.rb:164:in `converge_state_and_update'", "C:/ELK/logstash-6.0.0/logstash-core/lib/logstash/agent.rb:90:in `execute'", "C:/ELK/logstash-6.0.0/logstash-core/lib/logstash/runner.rb:362:in `block in execute'", "C:/ELK/logstash-6.0.0/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/task.rb:24:in `block in initialize'"]}