<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Parsing at Broker VM level in Cortex XDR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/parsing-at-broker-vm-level/m-p/587140#M6687</link>
    <description>&lt;P&gt;I'm using COLLECT parsing rule to manipulate data at broker VM level before ingestion&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Rule basically filters out on raw log that I generate specific to my test like some log line that contains text criticalevent along with some date and random machine name.&lt;/P&gt;
&lt;P&gt;[Collect: vendor="unknown", product="unknown", target_broker=(mybroker), no_hit=drop]&lt;/P&gt;
&lt;P&gt;filter _raw_log contains "criticalevent"&lt;/P&gt;
&lt;P&gt;|alter a= someregex fn&lt;/P&gt;
&lt;P&gt;|alter b=someregex fn&lt;/P&gt;
&lt;P&gt;[Ingest:vendor="unknown", product="unknown", target_dataset="my_parsed_logs", no_hit=drop]&lt;/P&gt;
&lt;P&gt;fields a,b,c ..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now the resulting dataset gets all data and not the filtered data. If I put same filter condition inside ingest section then it works. But does that mean it happened at broker vm or at xdr side..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there something missing her&lt;/P&gt;
&lt;P&gt;Coz, If I directly do Ingest without doing collect&amp;nbsp; and directly into the same dataset then it gives desired result. But I don't think it happens at broker. Like for e.g.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[Ingest:vendor="unknown", product="unknown", target_dataset="unknown_unknown_raw", no_hit=drop]&lt;/P&gt;
&lt;P&gt;Filter _raw_log contains "criticalevent"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Am i missing something here in understanding it??&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 17 May 2024 16:13:05 GMT</pubDate>
    <dc:creator>Fm12345</dc:creator>
    <dc:date>2024-05-17T16:13:05Z</dc:date>
    <item>
      <title>Parsing at Broker VM level</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/parsing-at-broker-vm-level/m-p/587140#M6687</link>
      <description>&lt;P&gt;I'm using COLLECT parsing rule to manipulate data at broker VM level before ingestion&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Rule basically filters out on raw log that I generate specific to my test like some log line that contains text criticalevent along with some date and random machine name.&lt;/P&gt;
&lt;P&gt;[Collect: vendor="unknown", product="unknown", target_broker=(mybroker), no_hit=drop]&lt;/P&gt;
&lt;P&gt;filter _raw_log contains "criticalevent"&lt;/P&gt;
&lt;P&gt;|alter a= someregex fn&lt;/P&gt;
&lt;P&gt;|alter b=someregex fn&lt;/P&gt;
&lt;P&gt;[Ingest:vendor="unknown", product="unknown", target_dataset="my_parsed_logs", no_hit=drop]&lt;/P&gt;
&lt;P&gt;fields a,b,c ..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now the resulting dataset gets all data and not the filtered data. If I put same filter condition inside ingest section then it works. But does that mean it happened at broker vm or at xdr side..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there something missing her&lt;/P&gt;
&lt;P&gt;Coz, If I directly do Ingest without doing collect&amp;nbsp; and directly into the same dataset then it gives desired result. But I don't think it happens at broker. Like for e.g.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[Ingest:vendor="unknown", product="unknown", target_dataset="unknown_unknown_raw", no_hit=drop]&lt;/P&gt;
&lt;P&gt;Filter _raw_log contains "criticalevent"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Am i missing something here in understanding it??&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2024 16:13:05 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/parsing-at-broker-vm-level/m-p/587140#M6687</guid>
      <dc:creator>Fm12345</dc:creator>
      <dc:date>2024-05-17T16:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing at Broker VM level</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/parsing-at-broker-vm-level/m-p/587991#M6736</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/1372551263"&gt;@Fm12345&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for reaching out on Live community.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would like to clarify few things first of all.&lt;/P&gt;
&lt;P&gt;Ingest:&amp;nbsp;&lt;SPAN&gt;An&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG class="userinput"&gt;&lt;CODE class="hljs language-undefined"&gt;INGEST&lt;/CODE&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;section is used to define the resulting dataset.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://docs-cortex.paloaltonetworks.com/r/Cortex-XDR/Cortex-XDR-Pro-Administrator-Guide/INGEST" target="_blank"&gt;https://docs-cortex.paloaltonetworks.com/r/Cortex-XDR/Cortex-XDR-Pro-Administrator-Guide/INGEST&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Collect:&amp;nbsp;A&amp;nbsp;&lt;STRONG class="userinput"&gt;&lt;CODE class="hljs language-sql"&gt;&lt;SPAN class="hljs-keyword"&gt;COLLECT&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/STRONG&gt;&amp;nbsp;section defines a rule that enables data reduction and data manipulation at the Broker VM to help avoid sending unnecessary data to the&amp;nbsp;&lt;SPAN class="phrase"&gt;Cortex XDR&lt;/SPAN&gt;&amp;nbsp;server and reduces traffic, storage, and computing costs.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://docs-cortex.paloaltonetworks.com/r/Cortex-XDR/Cortex-XDR-Pro-Administrator-Guide/COLLECT" target="_blank"&gt;https://docs-cortex.paloaltonetworks.com/r/Cortex-XDR/Cortex-XDR-Pro-Administrator-Guide/COLLECT&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Below is the sample which you can refer and correct your query as per the need.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;[COLLECT:vendor="Apache", product="ApacheServer", target_brokers = (bvm1, bvm2, bvm3), no_hit = drop]&lt;BR /&gt;alter source_log = json_extract_scalar(_raw_log, "$.source") &lt;BR /&gt;| filter source_log = "WebApp-Logs"&lt;BR /&gt;| fields source_log, _raw_log;&lt;BR /&gt;[INGEST:vendor="Apache", product="ApacheServer", target_dataset = "dvwa_application_log"]&lt;BR /&gt;alter log_timestamp = json_extract_scalar(_raw_log, "$.timestamp")&lt;BR /&gt;| alter log_msg = json_extract_scalar(_raw_log, "$.msg")&lt;BR /&gt;| alter log_remote_ip = json_extract_scalar(_raw_log, "$.Remote_IP")&lt;BR /&gt;| alter scanned_ip = json_extract_scalar(_raw_log, "$.Scanned_IP")&lt;BR /&gt;| fields log_msg ,log_remote_ip ,log_timestamp ,source_log ,scanned_ip , _raw_log;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Incase any further assistance is required, please feel free to reach out.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2024 08:13:55 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/parsing-at-broker-vm-level/m-p/587991#M6736</guid>
      <dc:creator>aspatil</dc:creator>
      <dc:date>2024-05-27T08:13:55Z</dc:date>
    </item>
  </channel>
</rss>

