hello elastic community i need your help, i got this error when i have add the function rename on mutate
this is the full logs error :
[ERROR][logstash.agent ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of "\\'", any character, "'" at line 42, column 1 (byte 1168) after input {\n udp {\n host => '...'\n port => 1514\n type => ''\n }\n tcp {\n host => '...'\n port => 1514\n type => 'relpsos\n }\n}\n\noutput{\n elasticsearch{\n hosts => ["https://:9200","https://:9200","https://:9200"]\n manage_template => false\n index => "*"\n document_type => "%{[@metadata][type]}"\n cacert => "/etc/logstash/certs/ca.crt"\n user => ""\n password => ""\n }\n stdout{\n codec => rubydebug\n }\n}\n\nfilter {\n if[type]=="soslog"{\n grok {\n match => { "message" => "time=%{DATA:timestamp}\|action=%{WORD:action}\|orig=%{IPORHOST:origin}\|i\/f\_dir=%{WORD:direction}\|i\/f\_name=%{WORD:interface}\|has\_accounting=%{INT:accounting}\|uuid=%{DATA:uuid}\|product=%{DATA:product}\|rule=%{INT:rule}\|rule_uid=%{DATA:rule_uid}\|*src=%{IP:src_ip}\|s_port=%{INT:src_port}\|dst=%{IP:dst_ip}\|service=%{INT:dst_port}\|proto=%{WORD:protocol}" }\n add_field => [ "received_at", "%{@timestamp}" ]\n add_field => [ "received_from", "%{host}" ]\n } mutate {\n convert => ["source.ip", "integer"]\n rename => ["action", "event.action"]\n }\n kv {}\n }\n}\n", :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:2584:in
map'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:10:in compile_sources'", "org/logstash/execution/AbstractPipelineExt.java:156:in
initialize'", "org/logstash/execution/JavaBasePipelineExt.java:47:in initialize'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:27:in
initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline_action/create.rb:36:in execute'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:326:in
block in converge_state'"]}
and this is the filter :
filter {
if[type]=="*"{
grok {
match => { "message" => "time=%{DATA:timestamp}|action=%{WORD:action}|orig=%{IPORHOST:origin}|i/f_dir=%{WORD:direction}|i/f_name=%{WORD:interface}|has_accounting=%{INT:accounting}|uuid=%{DATA:uuid}|product=%{DATA:product}|rule=%{INT:rule}|rule_uid=%{DATA:rule_uid}|*src=%{IP:src_ip}|s_port=%{INT:src_port}|dst=%{IP:dst_ip}|service=%{INT:dst_port}|proto=%{WORD:protocol}" }
add_field => [ "received_at", "%{@timestamp}" ]
add_field => [ "received_from", "%{host}" ]
} mutate {
convert => ["source.ip", "integer"]
rename => ["action", "event.action"]
}
kv {}
}
}
i have changed sensitive data with the symbol *