About logstash #1048
Replies: 4 comments 17 replies
-
You should use the 'elasticsearch' plugin with the following configuration:
Note that now you must create your Manticore table before using Logstash. Manticore doesn't support Logstash versions >= 7.13 yet, but we're working on this. |
Beta Was this translation helpful? Give feedback.
-
for me
with the following content lstash-bulk2.log failed with the error message
|
Beta Was this translation helpful? Give feedback.
-
Probably, there was some misunderstanding. In my first comment I meant we are now working on both the support of higher Logstash versions and auto table creation. Currently, installing |
Beta Was this translation helpful? Give feedback.
-
Hello. I used the latest development package. However, when I tried to send Paloalto Logs using the Logstash Filter file, I got an error. [INFO ] 2023-07-02 18:55:07.383 [Agent thread] agent - Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]}
Oct 09 10:19:15 SumPunFw07.sumotest.com 1,2019/10/09 10:19:15,001234567890002,TRAFFIC,drop,2304,2019/10/09 10:19:15,209.118.103.150,160.177.222.249,0.0.0.0,0.0.0.0,InternalServer,,,not-applicable,vsys1,inside,z1-FW-Transit,ethernet1/2,,All traffic,2019/10/09 10:19:15,0,1,63712,443,0,0,0x0,udp,deny,60,60,0,1,2019/10/09 10:19:15,0,any,0,0123456789,0x0,Netherlands,10.0.0.0-10.255.255.255,0,1,0,policy-deny,0,0,0,0,,SumPunFw07,from-policy,,,0,,0,,N/A,0,0,0,0,1202585d-b4d5-5b4c-aaa2-d80d77ba456e,0
{
"LogAction" => "All traffic",
"SCTPAssociationID" => "0",
"DestinationZone" => "z1-FW-Transit",
"BytesSent" => "60",
"Packets" => "1",
"SourceZone" => "inside",
"Bytes" => "60",
"ParentStartTime" => nil,
"SCTPChunks" => "0",
"ParentSessionID" => "0",
"SourceIP" => "209.118.103.150",
"TunnelType" => "N/A",
"SequenceNumber" => "0123456789",
"RepeatCount" => "1",
"DeviceGroupHierarchyLevel1" => "0",
"ActionFlags" => "0x0",
"DestinationLocation" => "10.0.0.0-10.255.255.255",
"PacketsReceived" => "0",
"@timestamp" => 2023-07-02T09:55:12.044Z,
"SourcePort" => "63712",
"Flags" => "0x0",
"DestinationVMUUID" => nil,
"NATDestinationIP" => "0.0.0.0",
"Protocol" => "udp",
"NATSourceIP" => "0.0.0.0",
"PacketsSent" => "1",
"SourceVMUUID" => nil,
"TunnelID_IMSI" => "0",
"DeviceGroupHierarchyLevel2" => "0",
"SessionEndReason" => "policy-deny",
"Type" => "TRAFFIC",
"InboundInterface" => "ethernet1/2",
"FUTURE_USE" => "0",
"column67" => "0",
"ElapsedTime" => "0",
"DestinationIP" => "160.177.222.249",
"OutboundInterface" => nil,
"host" => "manticore-logstash",
"@version" => "1",
"DeviceName" => "SumPunFw07",
"Application" => "not-applicable",
"SourceUser" => nil,
"NATDestinationPort" => "0",
"DestinationUser" => nil,
"Action" => "deny",
"BytesReceived" => "0",
"NATSourcePort" => "0",
"StartTime" => "2019/10/09 10:19:15",
"DeviceGroupHierarchyLevel3" => "0",
"SerialNumber" => "001234567890002",
"RuleName" => "InternalServer",
"VirtualSystem" => "vsys1",
"SessionID" => "0",
"DestinationPort" => "443",
"DeviceGroupHierarchyLevel4" => "0",
"MonitorTag_IMEI" => nil,
"column66" => "1202585d-b4d5-5b4c-aaa2-d80d77ba456e",
"Category" => "any",
"SCTPChunksReceived" => "0",
"GeneratedTime" => "2019/10/09 10:19:15",
"ActionSource" => "from-policy",
"SCTPChunksSent" => "0",
"Threat_ContentType" => "drop",
"ReceiveTime" => "2019/10/09 10:19:15",
"SourceLocation" => "Netherlands",
"VirtualSystemName" => nil
}
[ERROR] 2023-07-02 18:55:12.289 [[main]>worker0] elasticsearch - An unknown error occurred sending a bulk request to Elasticsearch. We will retry indefinitely {:error_message=>"no implicit conversion of String into Integer", :error_class=>"TypeError", :backtrace=>["org/jruby/RubyArray.java:1487:in `[]'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.8.6-java/lib/logstash/outputs/elasticsearch/http_client.rb:158:in `block in join_bulk_responses'", "org/jruby/RubyArray.java:4493:in `any?'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.8.6-java/lib/logstash/outputs/elasticsearch/http_client.rb:158:in `join_bulk_responses'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.8.6-java/lib/logstash/outputs/elasticsearch/http_client.rb:146:in `bulk'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.8.6-java/lib/logstash/plugin_mixins/elasticsearch/common.rb:271:in `safe_bulk'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.8.6-java/lib/logstash/plugin_mixins/elasticsearch/common.rb:192:in `submit'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.8.6-java/lib/logstash/plugin_mixins/elasticsearch/common.rb:160:in `retrying_submit'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.8.6-java/lib/logstash/outputs/elasticsearch.rb:303:in `multi_receive'", "org/logstash/config/ir/compiler/OutputStrategyExt.java:143:in `multi_receive'", "org/logstash/config/ir/compiler/AbstractOutputDelegatorExt.java:121:in `multi_receive'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:295:in `block in start_workers'"]} I changed the log to recognize everything as a string and it inserted fine. [INFO ] 2023-07-02 18:58:01.451 [Agent thread] agent - Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pi lines=>[]}
"Oct 09 10:19:15 SumPunFw07.sumotest.com 1","2019/10/09 10:19:15","001234567890002","TRAFFIC","drop","2304","2019/10/09 10:19:15" 209.118.103.150","160.177.222.249","0.0.0.0","0.0.0.0","InternalServer","","","not-applicable","vsys1","inside","z1-FW-Transit"," hernet1/2","","All traffic","2019/10/09 10:19:15","0","1","63712","443","0","0","0x0","udp","deny","60","60","0","1","2019/10/09 :19:15","0","any","0","0123456789","0x0","Netherlands","10.0.0.0-10.255.255.255","0","1","0","policy-deny","0","0","0","0","","Su unFw07","from-policy","","","0","","0","","N/A","0","0","0","0","1202585d-b4d5-5b4c-aaa2-d80d77ba456e","0"
{
"NATSourcePort" => "0",
"SCTPChunksSent" => "0",
"@timestamp" => 2023-07-02T09:58:15.582Z,
"StartTime" => "2019/10/09 10:19:15",
"SCTPChunks" => "0",
"BytesReceived" => "0",
"column66" => "1202585d-b4d5-5b4c-aaa2-d80d77ba456e",
"GeneratedTime" => "2019/10/09 10:19:15",
"Threat_ContentType" => "drop",
"PacketsReceived" => "0",
"SessionEndReason" => "policy-deny",
"SourceZone" => "inside",
"TunnelType" => "N/A",
"SourceLocation" => "Netherlands",
"Action" => "deny",
"PacketsSent" => "1",
"NATSourceIP" => "0.0.0.0",
"InboundInterface" => "ethernet1/2",
"DestinationIP" => "160.177.222.249",
"SerialNumber" => "001234567890002",
"DeviceGroupHierarchyLevel4" => "0",
"SequenceNumber" => "0123456789",
"Category" => "any",
"DeviceGroupHierarchyLevel3" => "0",
"SCTPAssociationID" => "0",
"VirtualSystemName" => "",
"SCTPChunksReceived" => "0",
"SourceUser" => "",
"DestinationZone" => "z1-FW-Transit",
"DestinationLocation" => "10.0.0.0-10.255.255.255",
"NATDestinationIP" => "0.0.0.0",
"ParentSessionID" => "0",
"DestinationUser" => "",
"Protocol" => "udp",
"ActionSource" => "from-policy",
"SourcePort" => "63712",
"DestinationVMUUID" => "",
"ParentStartTime" => "",
"SourceIP" => "209.118.103.150",
"Application" => "not-applicable",
"column67" => "0",
"Packets" => "1",
"VirtualSystem" => "vsys1",
"DeviceName" => "SumPunFw07",
"FUTURE_USE" => "0",
"SourceVMUUID" => "",
"TunnelID_IMSI" => "0",
"LogAction" => "All traffic",
"RepeatCount" => "1",
"DestinationPort" => "443",
"SessionID" => "0",
"ActionFlags" => "0x0",
"BytesSent" => "60",
"Bytes" => "60",
"Type" => "TRAFFIC",
"Flags" => "0x0",
"DeviceGroupHierarchyLevel2" => "0",
"RuleName" => "InternalServer",
"@version" => "1",
"ReceiveTime" => "2019/10/09 10:19:15",
"OutboundInterface" => "",
"host" => "manticore-logstash",
"ElapsedTime" => "0",
"DeviceGroupHierarchyLevel1" => "0",
"NATDestinationPort" => "0",
"MonitorTag_IMEI" => ""
} If you check on the server side, it is inserted correctly. mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 2566
Server version: 6.0.5 1399e6f6b@230629 dev (columnar 2.0.5 106d244@230620) (secondary 2.0.5 106d244@230620) git branch master...origin/master
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MySQL [(none)]> select * from paloaltoindex001;
+---------------------+------------------+-------------------+------------+---------------------+-------------+------------------+---------------------+-----------------+----------+----------------+----------------------------+------------+--------------------+-----------+---------------+-----------------+------------+-------+------------+-----------------+-----------------+-----------------+----------------------------+----------+----------+--------------+-----------------+-------+-------------+----------------+--------------------+----------------------------+------------------+---------+----------------+-------------------+---------------+--------------+------------+---------------+-----------+-------------------+---------+-------------+--------+---------------------+--------------------------------------+--------------------+-------------+------------+----------------+---------------+----------------------------+-----------------+------------+-----------------+-----------------+-------------+----------------+-------------+--------------------------+----------+-------------------------+-----------------+--------------------+-------------------+
| id | sessionendreason | virtualsystemname | sourceuser | receivetime | natsourceip | natdestinationip | starttime | parentsessionid | category | rulename | devicegrouphierarchylevel3 | sctpchunks | host | bytessent | tunnelid_imsi | destinationip | tunneltype | bytes | future_use | parentstarttime | destinationuser | packetsreceived | devicegrouphierarchylevel4 | column67 | @version | actionsource | destinationport | flags | elapsedtime | sourcelocation | natdestinationport | devicegrouphierarchylevel2 | inboundinterface | packets | sctpchunkssent | sctpassociationid | bytesreceived | sourcevmuuid | sourcezone | virtualsystem | sessionid | destinationvmuuid | type | repeatcount | action | generatedtime | column66 | threat_contenttype | packetssent | sourceport | application | natsourceport | devicegrouphierarchylevel1 | sourceip | devicename | monitortag_imei | serialnumber | logaction | sequencenumber | actionflags | @timestamp | protocol | destinationlocation | destinationzone | sctpchunksreceived | outboundinterface |
+---------------------+------------------+-------------------+------------+---------------------+-------------+------------------+---------------------+-----------------+----------+----------------+----------------------------+------------+--------------------+-----------+---------------+-----------------+------------+-------+------------+-----------------+-----------------+-----------------+----------------------------+----------+----------+--------------+-----------------+-------+-------------+----------------+--------------------+----------------------------+------------------+---------+----------------+-------------------+---------------+--------------+------------+---------------+-----------+-------------------+---------+-------------+--------+---------------------+--------------------------------------+--------------------+-------------+------------+----------------+---------------+----------------------------+-----------------+------------+-----------------+-----------------+-------------+----------------+-------------+--------------------------+----------+-------------------------+-----------------+--------------------+-------------------+
| 4974179136428834820 | policy-deny | | | 2019/10/09 10:19:15 | 0.0.0.0 | 0.0.0.0 | 2019/10/09 10:19:15 | 0 | any | InternalServer | 0 | 0 | manticore-logstash | 60 | 0 | 160.177.222.249 | N/A | 60 | 0 | | | 0 | 0 | 0 | 1 | from-policy | 443 | 0x0 | 0 | Netherlands | 0 | 0 | ethernet1/2 | 1 | 0 | 0 | 0 | | inside | vsys1 | 0 | | TRAFFIC | 1 | deny | 2019/10/09 10:19:15 | 1202585d-b4d5-5b4c-aaa2-d80d77ba456e | drop | 1 | 63712 | not-applicable | 0 | 0 | 209.118.103.150 | SumPunFw07 | | 001234567890002 | All traffic | 0123456789 | 0x0 | 2023-07-02T08:36:46.080Z | udp | 10.0.0.0-10.255.255.255 | z1-FW-Transit | 0 | |
| 4974179136428834821 | policy-deny | | | 2019/10/09 10:19:15 | 0.0.0.0 | 0.0.0.0 | 2019/10/09 10:19:15 | 0 | any | InternalServer | 0 | 0 | manticore-logstash | 60 | 0 | 160.177.222.249 | N/A | 60 | 0 | | | 0 | 0 | 0 | 1 | from-policy | 443 | 0x0 | 0 | Netherlands | 0 | 0 | ethernet1/2 | 1 | 0 | 0 | 0 | | inside | vsys1 | 0 | | TRAFFIC | 1 | deny | 2019/10/09 10:19:15 | 1202585d-b4d5-5b4c-aaa2-d80d77ba456e | drop | 1 | 63712 | not-applicable | 0 | 0 | 209.118.103.150 | SumPunFw07 | | 001234567890002 | All traffic | 0123456789 | 0x0 | 2023-07-02T09:10:46.427Z | udp | 10.0.0.0-10.255.255.255 | z1-FW-Transit | 0 | |
| 4974179136428834822 | policy-deny | | | 2019/10/09 10:19:15 | 0.0.0.0 | 0.0.0.0 | 2019/10/09 10:19:15 | 0 | any | InternalServer | 0 | 0 | manticore-logstash | 60 | 0 | 160.177.222.249 | N/A | 60 | 0 | | | 0 | 0 | 0 | 1 | from-policy | 443 | 0x0 | 0 | Netherlands | 0 | 0 | ethernet1/2 | 1 | 0 | 0 | 0 | | inside | vsys1 | 0 | | TRAFFIC | 1 | deny | 2019/10/09 10:19:15 | 1202585d-b4d5-5b4c-aaa2-d80d77ba456e | drop | 1 | 63712 | not-applicable | 0 | 0 | 209.118.103.150 | SumPunFw07 | | 001234567890002 | All traffic | 0123456789 | 0x0 | 2023-07-02T09:58:15.582Z | udp | 10.0.0.0-10.255.255.255 | z1-FW-Transit | 0 | |
| 4974179136428834819 | policy-deny | | | 2019/10/09 10:19:15 | 0.0.0.0 | 0.0.0.0 | 2019/10/09 10:19:15 | 0 | any | InternalServer | 0 | 0 | manticore-logstash | 60 | 0 | 160.177.222.249 | N/A | 60 | 0 | | | 0 | 0 | 0 | 1 | from-policy | 443 | 0x0 | 0 | Netherlands | 0 | 0 | ethernet1/2 | 1 | 0 | 0 | 0 | | inside | vsys1 | 0 | | TRAFFIC | 1 | deny | 2019/10/09 10:19:15 | 1202585d-b4d5-5b4c-aaa2-d80d77ba456e | drop | 1 | 63712 | not-applicable | 0 | 0 | 209.118.103.150 | SumPunFw07 | | 001234567890002 | All traffic | 0123456789 | 0x0 | 2023-07-02T07:53:58.163Z | udp | 10.0.0.0-10.255.255.255 | z1-FW-Transit | 0 | |
+---------------------+------------------+-------------------+------------+---------------------+-------------+------------------+---------------------+-----------------+----------+----------------+----------------------------+------------+--------------------+-----------+---------------+-----------------+------------+-------+------------+-----------------+-----------------+-----------------+----------------------------+----------+----------+--------------+-----------------+-------+-------------+----------------+--------------------+----------------------------+------------------+---------+----------------+-------------------+---------------+--------------+------------+---------------+-----------+-------------------+---------+-------------+--------+---------------------+--------------------------------------+--------------------+-------------+------------+----------------+---------------+----------------------------+-----------------+------------+-----------------+-----------------+-------------+----------------+-------------+--------------------------+----------+-------------------------+-----------------+--------------------+-------------------+
4 rows in set (0.004 sec)
MySQL [(none)]> Is this "problem" already known and being fixed? |
Beta Was this translation helpful? Give feedback.
-
There was a description that Logstash can be used with the latest version of manticoresearch.
What should I use for the logstash output plugin?
※If possible, it would be helpful if you could provide a sample definition that has been confirmed to work from input to output.
Also, will logstash version 7.13 or higher work without problems?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions