Hi, guys,
I've been solving a "parsing" problem for a while now. First I tried it with GROK, then with KV filter. I have not been successful with either method.
So I am turning to you for help to see if anyone experienced could think of a solution.
I have this file on my disk and many other (similar)
My intention, is to reasonably parse the values that are contained in the rules
Another problem is, that this GROK didn't want accept my logstash.
ERROR:
root@ubu-srv-101:/usr/share/logstash# ./bin/logstash -f /etc/logstash/conf.d/suricata.conf
Using bundled JDK: /usr/share/logstash/jdk
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
WARNING: Could not find logstash.yml which is typically located in $LS_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults
Could not find log4j2 configuration at path /usr/share/logstash/config/log4j2.properties. Using default config which logs errors to the console
[INFO ] 2022-01-06 12:55:26.674 [main] runner - Starting Logstash {"logstash.version"=>"7.16.2", "jruby.version"=>"jruby 9.2.20.1 (2.5.8) 2021-11-30 2a2962fbd1 OpenJDK 64-Bit Server VM 11.0.13+8 on 11.0.13+8 +indy +jit [linux-x86_64]"}
[WARN ] 2022-01-06 12:55:27.123 [LogStash::Runner] multilocal - Ignoring the 'pipelines.yml' file because modules or command line options are specified
[INFO ] 2022-01-06 12:55:28.943 [Api Webserver] agent - Successfully started Logstash API endpoint {:port=>9600, :ssl_enabled=>false}
[ERROR] 2022-01-06 12:55:29.726 [Converge PipelineAction::Create<main>] agent - Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of [ \\t\\r\\n], \"#\", \"{\", \"}\" at line 11, column 151 (byte 313) after filter {\n grok {\n patterns_dir => [\"./patterns\"]\n match => { \"message\" => \"^%{DATA:action} %{DATA:type} %{DATA:src_dir} %{DATA:src_port} %{DATA:dir} %{DATA:dest_dir} %{WORD:dest_port}%{DATA}msg\\:\"", :backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:32:in `compile_imperative'", "org/logstash/execution/AbstractPipelineExt.java:187:in `initialize'", "org/logstash/execution/JavaBasePipelineExt.java:72:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:47:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline_action/create.rb:52:in `execute'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:383:in `block in converge_state'"]}
[INFO ] 2022-01-06 12:55:29.846 [LogStash::Runner] runner - Logstash shut down.
You have an error in your configuration, your pipeline is not starting.
"Expected one of [ \t\r\n], "#", "{", "}" at line 11, column 151
This message tells that something is wrong in your configuration near line 11, probably a filter curly or square bracket was not closed, please check your configuration or share your full configuration file.
Yeah thanks both of us @twilson and @leandrojmp . It's helped me.
Now it's work correctly.
With DATA:
alert ip $HOME_NET any -> X.X.X.X any (msg: "MISP e1328 [] Outgoing To IP: X.X.X.X"; classtype:trojan-activity; sid:19923821; rev:1; priority:3; reference:url,https://misp-url/events/view/1324;)
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.