<?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 Re: Having issue with SEDCMD tests in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Having-issue-with-SEDCMD-tests/m-p/650678#M110559</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;thanks for the feedback.&lt;/P&gt;&lt;P&gt;As I am extensively involved in logs analysis (unfortunately not very skilled in regex ATM but getting there :-)) I have a different view on this subject.&lt;/P&gt;&lt;P&gt;Please follow one of my threads:&amp;nbsp;&lt;A href="https://community.splunk.com/t5/Getting-Data-In/How-to-achieve-regex-to-keep-the-highlighted-parts-from-the/m-p/647180#M110053" target="_blank"&gt;Solved: Re: SEDCMD log filtering regex needed - Splunk Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;There is an example where I with my colleagues have managed to be very granular and selective while applying SEDCMD&lt;/P&gt;&lt;P&gt;Most of the data changes do happen during search time agree. However, a "small" but extremely important part happens during parsing time where we can apply full control of what flows around well before the indexing time.&lt;/P&gt;&lt;P&gt;More than happy to continue investigating together as although I accumulated knowledge around data filtering while being supported by SPLUNK consultants, I am sure I might be missing something important I want to understand.&lt;/P&gt;&lt;P&gt;Thank you for taking time to discuss!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 15 Jul 2023 09:48:03 GMT</pubDate>
    <dc:creator>DanAlexander</dc:creator>
    <dc:date>2023-07-15T09:48:03Z</dc:date>
    <item>
      <title>Having issue with SEDCMD tests</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Having-issue-with-SEDCMD-tests/m-p/650515#M110527</link>
      <description>&lt;P&gt;Hi community,&lt;/P&gt;&lt;P&gt;I need help identifying where I got wrong.&lt;/P&gt;&lt;P&gt;The following is my testing SPL:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| fields - _time
| eval _raw="&amp;lt;Event xmlns='http://schemas.microsoft.com/win/2004/08/events/event'&amp;gt;&amp;lt;System&amp;gt;&amp;lt;Provider Name='Microsoft-Windows-Security-Auditing' Guid='{54849625-5478-4994-a5ba-3xxxxxxxxx}'/&amp;gt;&amp;lt;EventID&amp;gt;4662&amp;lt;/EventID&amp;gt;&amp;lt;Version&amp;gt;0&amp;lt;/Version&amp;gt;&amp;lt;Level&amp;gt;0&amp;lt;/Level&amp;gt;&amp;lt;Task&amp;gt;12804&amp;lt;/Task&amp;gt;&amp;lt;Opcode&amp;gt;0&amp;lt;/Opcode&amp;gt;&amp;lt;Keywords&amp;gt;0x8020000000000000&amp;lt;/Keywords&amp;gt;&amp;lt;TimeCreated SystemTime='2020-09-01T07:00:18.999999800Z'/&amp;gt;&amp;lt;EventRecordID&amp;gt;35xxxx65&amp;lt;/EventRecordID&amp;gt;&amp;lt;Correlation ActivityID='{5xxxxxxxx-b61d-0004-afc0-ac531db6d901}'/&amp;gt;&amp;lt;Execution ProcessID='1520' ThreadID='1628'/&amp;gt;&amp;lt;Channel&amp;gt;Security&amp;lt;/Channel&amp;gt;&amp;lt;Computer&amp;gt;XXXXXXXXXXXXXX.riv&amp;lt;/Computer&amp;gt;&amp;lt;Security/&amp;gt;&amp;lt;/System&amp;gt;&amp;lt;EventData&amp;gt;&amp;lt;Data Name='SubjectUserSid'&amp;gt;NT AUTHORITY\SYSTEM&amp;lt;/Data&amp;gt;&amp;lt;Data Name='SubjectUserName'&amp;gt;XXXXXXX$&amp;lt;/Data&amp;gt;&amp;lt;Data Name='SubjectDomainName'&amp;gt;XXXXXXXX&amp;lt;/Data&amp;gt;&amp;lt;Data Name='SubjectLogonId'&amp;gt;0x3e7&amp;lt;/Data&amp;gt;&amp;lt;Data Name='ObjectServer'&amp;gt;WMI&amp;lt;/Data&amp;gt;&amp;lt;Data Name='ObjectType'&amp;gt;WMI Namespace&amp;lt;/Data&amp;gt;&amp;lt;Data Name='ObjectName'&amp;gt;ROOT\CIMV2\Security\MicrosoftTpm&amp;lt;/Data&amp;gt;&amp;lt;Data Name='OperationType'&amp;gt;Object Access&amp;lt;/Data&amp;gt;&amp;lt;Data Name='HandleId'&amp;gt;0x0&amp;lt;/Data&amp;gt;&amp;lt;Data Name='AccessList'&amp;gt;%%1552 %%1553              &amp;lt;/Data&amp;gt;&amp;lt;Data Name='AccessMask'&amp;gt;0x3&amp;lt;/Data&amp;gt;&amp;lt;Data Name='Properties'&amp;gt;-&amp;lt;/Data&amp;gt;&amp;lt;Data Name='AdditionalInfo'&amp;gt;Local Execute (ExecMethod)&amp;lt;/Data&amp;gt;&amp;lt;Data Name='AdditionalInfo2'&amp;gt;ROOT\CIMV2\Security\MicrosoftTpm:Win32_Tpm=@::GetOwnerAuthForEscrow&amp;lt;/Data&amp;gt;&amp;lt;/EventData&amp;gt;&amp;lt;/Event&amp;gt;"
| rex mode=sed "s/.*(?&amp;lt;eventId&amp;gt;&amp;lt;EventID&amp;gt;4662&amp;lt;\/EventID&amp;gt;).*(?&amp;lt;userName&amp;gt;&amp;lt;[Data Name='SubjectUserName']&amp;gt;*.*&amp;lt;\/Data&amp;gt;).*/\1\2/g"&lt;/LI-CODE&gt;&lt;P&gt;The result differs from what I want. I need data for the SubjectUserName, not the AditionalInfo2 data&lt;/P&gt;&lt;P&gt;Can anyone help me with this, please?&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 13:30:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Having-issue-with-SEDCMD-tests/m-p/650515#M110527</guid>
      <dc:creator>DanAlexander</dc:creator>
      <dc:date>2023-07-14T13:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: Having issue with SEDCMD tests</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Having-issue-with-SEDCMD-tests/m-p/650561#M110542</link>
      <description>&lt;P&gt;Why not just use spath or xpath? Manipulating structured data with just regexes might not give best results. Especially if at some points the fields got reordered (still retaining the logical structure).&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 13:34:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Having-issue-with-SEDCMD-tests/m-p/650561#M110542</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-07-14T13:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: Having issue with SEDCMD tests</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Having-issue-with-SEDCMD-tests/m-p/650592#M110544</link>
      <description>&lt;P&gt;Thaks for the reply&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can those work at SEDCMD level? I would like to reduce logs without damaging the logic.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 15:52:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Having-issue-with-SEDCMD-tests/m-p/650592#M110544</guid>
      <dc:creator>DanAlexander</dc:creator>
      <dc:date>2023-07-14T15:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: Having issue with SEDCMD tests</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Having-issue-with-SEDCMD-tests/m-p/650597#M110546</link>
      <description>&lt;P&gt;No. They are search-time commands. In fact, manipulating structured data (like XML or json) on ingest is not Splunk's stong suit and if you have the possibility I'd advise you do this in other tool before sending to Splunk.&lt;/P&gt;&lt;P&gt;Having said that - I'm always cautious when I hear that someone wants to cut some data from the event "because noone needs that and it only consumes license". I can understand data privacy concerns and data masking - that's of course a legitimate use case.&amp;nbsp; But chopping half of an event... that's tricky because it can break stuff and can leave you in a situation when you think you have some data but actually you don't.&lt;/P&gt;&lt;P&gt;I'd rather go for verifying which events as a whole I need and which I don't.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 16:12:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Having-issue-with-SEDCMD-tests/m-p/650597#M110546</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-07-14T16:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: Having issue with SEDCMD tests</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Having-issue-with-SEDCMD-tests/m-p/650623#M110551</link>
      <description>&lt;P&gt;Thanks for the&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I totally get your point and cutting/trimming events would be something Splunk would not appreciate.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am a firm believer that using SEDCMD is the best way to conduct control over the forwarded logs during the parsing phase of data streams before they hit the indexers.&lt;/P&gt;&lt;P&gt;I agree with you that only and only after a careful study of what and how to approach your logging is the right approach and of course in agreement with your peers.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 18:57:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Having-issue-with-SEDCMD-tests/m-p/650623#M110551</guid>
      <dc:creator>DanAlexander</dc:creator>
      <dc:date>2023-07-14T18:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: Having issue with SEDCMD tests</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Having-issue-with-SEDCMD-tests/m-p/650637#M110554</link>
      <description>&lt;P&gt;Remember that most of what happens in Splunk's internals happens during search time so it's not that easy that you affect the parsing only "before the data hits indexers". That's the problem. And much can depend on how the data is extracted in the end.&lt;/P&gt;&lt;P&gt;For example, let's take an event from my home firewall logs:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;firewall&lt;/SPAN&gt;,&lt;SPAN class=""&gt;info&lt;/SPAN&gt; &lt;SPAN class=""&gt;DEFAULT_OUTGOING&lt;/SPAN&gt; &lt;SPAN class=""&gt;accept&lt;/SPAN&gt; &lt;SPAN class=""&gt;forward:&lt;/SPAN&gt; &lt;SPAN class=""&gt;in:bridge1&lt;/SPAN&gt; &lt;SPAN class=""&gt;out:pppoe-out1&lt;/SPAN&gt;, &lt;SPAN class=""&gt;src-mac&lt;/SPAN&gt; &lt;SPAN class=""&gt;52:54:00:a3:cc:92&lt;/SPAN&gt;, &lt;SPAN class=""&gt;proto&lt;/SPAN&gt; &lt;SPAN class=""&gt;TCP&lt;/SPAN&gt; (&lt;SPAN class=""&gt;ACK&lt;/SPAN&gt;), &lt;SPAN class=""&gt;172.16.0.6:51372-&lt;/SPAN&gt;&amp;gt;&lt;SPAN class=""&gt;6.211.152.94:22&lt;/SPAN&gt;, &lt;SPAN class=""&gt;NAT&lt;/SPAN&gt; (&lt;SPAN class=""&gt;172.16.0.3:51372-&lt;/SPAN&gt;&amp;gt;&lt;SPAN class=""&gt;89.15.25.178:51372&lt;/SPAN&gt;)&lt;SPAN class=""&gt;-&lt;/SPAN&gt;&amp;gt;&lt;SPAN class=""&gt;6.211.152.94:22&lt;/SPAN&gt;, &lt;SPAN class=""&gt;len&lt;/SPAN&gt; &lt;SPAN class=""&gt;40&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Let's assume I don't care for the mac address and want to cut it out of the event.&lt;/P&gt;&lt;P&gt;If the fields were defined as several small extractions, each anchored just to the preceding field name tag, like&lt;/P&gt;&lt;PRE&gt;in:(?&amp;lt;in_interface&amp;gt;\S+)out:(?&amp;lt;out_interface&amp;gt;\S+)&lt;BR /&gt;[...]&lt;/PRE&gt;&lt;P&gt;extractions would still be working. But if someone decided to write extractions as one big regex with several capture groups,&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;firewall&lt;/SPAN&gt;,&lt;SPAN class=""&gt;info\s(?&amp;lt;matching_rule&amp;gt;.*)\s(?&amp;lt;action&amp;gt;accept|block)\s&lt;/SPAN&gt;&lt;SPAN class=""&gt;forward:\s&lt;/SPAN&gt;&lt;SPAN class=""&gt;in:(?&amp;lt;in_interface&amp;gt;\S+)\sout:(?&amp;lt;out_interface&amp;gt;\S+)&lt;/SPAN&gt;,\s&lt;SPAN class=""&gt;src-macs(?&amp;lt;src_mac&amp;gt;[\d:]+),\sproto\s(?&amp;lt;proto&amp;gt;\S+)&lt;/SPAN&gt;[...]&lt;/PRE&gt;&lt;P&gt;because the event is always supposed to be in that format, well... it stops working when you chop away part of the event from the middle.&lt;/P&gt;&lt;P&gt;So it's not always as easy as it seems.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 20:06:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Having-issue-with-SEDCMD-tests/m-p/650637#M110554</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-07-14T20:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: Having issue with SEDCMD tests</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Having-issue-with-SEDCMD-tests/m-p/650678#M110559</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;thanks for the feedback.&lt;/P&gt;&lt;P&gt;As I am extensively involved in logs analysis (unfortunately not very skilled in regex ATM but getting there :-)) I have a different view on this subject.&lt;/P&gt;&lt;P&gt;Please follow one of my threads:&amp;nbsp;&lt;A href="https://community.splunk.com/t5/Getting-Data-In/How-to-achieve-regex-to-keep-the-highlighted-parts-from-the/m-p/647180#M110053" target="_blank"&gt;Solved: Re: SEDCMD log filtering regex needed - Splunk Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;There is an example where I with my colleagues have managed to be very granular and selective while applying SEDCMD&lt;/P&gt;&lt;P&gt;Most of the data changes do happen during search time agree. However, a "small" but extremely important part happens during parsing time where we can apply full control of what flows around well before the indexing time.&lt;/P&gt;&lt;P&gt;More than happy to continue investigating together as although I accumulated knowledge around data filtering while being supported by SPLUNK consultants, I am sure I might be missing something important I want to understand.&lt;/P&gt;&lt;P&gt;Thank you for taking time to discuss!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jul 2023 09:48:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Having-issue-with-SEDCMD-tests/m-p/650678#M110559</guid>
      <dc:creator>DanAlexander</dc:creator>
      <dc:date>2023-07-15T09:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: Having issue with SEDCMD tests</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Having-issue-with-SEDCMD-tests/m-p/650689#M110560</link>
      <description>&lt;P&gt;I always say - if you can make strong assumptions about the format of your data, you can try to manipulate structured data with simple text operations (like cutting out a field) but usually you still can hit a border case in which your regex will fail (I love nested strings/comments/escaped symbols - they can be so nasty).&lt;/P&gt;&lt;P&gt;The remark about cutting data away was a bit meant as a side note. Of course you can do that. And I understand that sometimes you might want to do that. But sometimes there are reasons why you should not do that. That's all. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jul 2023 12:43:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Having-issue-with-SEDCMD-tests/m-p/650689#M110560</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-07-15T12:43:44Z</dc:date>
    </item>
  </channel>
</rss>

