<?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: If a filed position change in logs then how to trace? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/If-a-field-position-change-in-logs-then-how-to-trace/m-p/652178#M225422</link>
    <description>&lt;P&gt;Thank you for responding; how tragic. My question is fairly straightforward: When logs are added to Splunk after six months, the logs' balance may alter owing to system upgrades. If the logs location changed in this instance, how would SPL detect the change?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Ex: Records a position in the logs.&lt;/P&gt;&lt;P&gt;Following Splunk Onboarding: 1, 2, 3, 4, and 5.&lt;BR /&gt;Just consider:- Changed field&amp;nbsp;positions: 1, 2, 3, 5, 4.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;it doesn't matter if Extraction is happening by Regex or Delimiter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jul 2023 07:17:29 GMT</pubDate>
    <dc:creator>mk00928640</dc:creator>
    <dc:date>2023-07-27T07:17:29Z</dc:date>
    <item>
      <title>If a field position change in logs then how to trace?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-a-field-position-change-in-logs-then-how-to-trace/m-p/652112#M225400</link>
      <description>&lt;P&gt;Hello everyone&lt;/P&gt;&lt;P&gt;Please assist me in solving the problem below.&lt;/P&gt;&lt;P&gt;I'm attempting to determine how to track it in Splunk if a field's place changes in logs.&lt;/P&gt;&lt;P&gt;Is SPL tracing in SPLUNK possible?&lt;BR /&gt;&lt;BR /&gt;Ex:&lt;BR /&gt;&lt;BR /&gt;Logs : when we onboard the logs in splunk on the below positions.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mk00928640_0-1690389115093.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/26475iEE7193D5C8607BDC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mk00928640_0-1690389115093.png" alt="mk00928640_0-1690389115093.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;if it changed to then How to trace it by SPL?&lt;BR /&gt;&lt;BR /&gt;Please guide me&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2023 18:03:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-a-field-position-change-in-logs-then-how-to-trace/m-p/652112#M225400</guid>
      <dc:creator>mk00928640</dc:creator>
      <dc:date>2023-07-26T18:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: If a filed position change in logs then how to trace?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-a-field-position-change-in-logs-then-how-to-trace/m-p/652130#M225409</link>
      <description>&lt;P&gt;Your question is not entirely clear. Most probably because english is not your native language. Don't worry. Many of us here are non-natives&amp;nbsp; as well. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I assume that you wondered if your extractions will work properly if the order of your fields change within the event. The answer is - it depends on what kind of extraction is it (regex-based or delimited) and if your fields are extracted using regexes, how are the regexes defined. So there is no single "good" answer here. Of course if you change your logging format completely, no extraction will be good enough to catch that.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2023 17:32:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-a-field-position-change-in-logs-then-how-to-trace/m-p/652130#M225409</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-07-26T17:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: If a filed position change in logs then how to trace?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-a-field-position-change-in-logs-then-how-to-trace/m-p/652163#M225416</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;it’s just like&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;said. One way to try to tackle this is add “:#” at the end of sourcetype name. When I’m defining ST in first time I just add :0 as o suffix for it. When it has changed (format of log file), I add a new version by a new definition with same name, but just change to :1 this suffix. That way I can have several correct extractions for “same” log file which contents has evolved by time.&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2023 22:24:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-a-field-position-change-in-logs-then-how-to-trace/m-p/652163#M225416</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2023-07-26T22:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: If a field position change in logs then how to trace?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-a-field-position-change-in-logs-then-how-to-trace/m-p/652168#M225418</link>
      <description>&lt;P&gt;In addition to what&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/214410"&gt;@isoutamo&lt;/a&gt;&amp;nbsp;said,&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Try not to rely on regex for extraction. &amp;nbsp;For example, lots of fields can be extracted as key value pairs with &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Extract" target="_blank" rel="noopener"&gt;kv&lt;/A&gt; aka extract: try &lt;FONT face="courier new,courier"&gt;| kv pairdelim=";" kvdelim=":"&lt;/FONT&gt;.&lt;/LI&gt;&lt;LI&gt;If you have any influence on developers, beg them to place quotation marks around values.&lt;/LI&gt;&lt;LI&gt;When you use regex for complex, large texts, avoid using a single rex for the entire event unless you have absolute control over source code and the power to forbid any change in log format. &amp;nbsp;Use smaller rex commands like &lt;FONT face="courier new,courier"&gt;| rex "; (?&amp;lt;message&amp;gt;[^;]+)$"&lt;/FONT&gt;.&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Thu, 27 Jul 2023 04:10:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-a-field-position-change-in-logs-then-how-to-trace/m-p/652168#M225418</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-07-27T04:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: If a filed position change in logs then how to trace?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-a-field-position-change-in-logs-then-how-to-trace/m-p/652178#M225422</link>
      <description>&lt;P&gt;Thank you for responding; how tragic. My question is fairly straightforward: When logs are added to Splunk after six months, the logs' balance may alter owing to system upgrades. If the logs location changed in this instance, how would SPL detect the change?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Ex: Records a position in the logs.&lt;/P&gt;&lt;P&gt;Following Splunk Onboarding: 1, 2, 3, 4, and 5.&lt;BR /&gt;Just consider:- Changed field&amp;nbsp;positions: 1, 2, 3, 5, 4.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;it doesn't matter if Extraction is happening by Regex or Delimiter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2023 07:17:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-a-field-position-change-in-logs-then-how-to-trace/m-p/652178#M225422</guid>
      <dc:creator>mk00928640</dc:creator>
      <dc:date>2023-07-27T07:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: If a field position change in logs then how to trace?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-a-field-position-change-in-logs-then-how-to-trace/m-p/652182#M225426</link>
      <description>&lt;P&gt;Ad.3 One could argue about the performance of single big regex vs. many small regexes. But I suppose it depends on how bloated that single regex is so most probably YMMV.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2023 08:48:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-a-field-position-change-in-logs-then-how-to-trace/m-p/652182#M225426</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-07-27T08:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: If a filed position change in logs then how to trace?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-a-field-position-change-in-logs-then-how-to-trace/m-p/652184#M225427</link>
      <description>&lt;P&gt;In case of structured data, there is a special case for CSV files with variable order of columns - it reads the header line and adjusts the order of fields accordingly. Unfortunately, it works only as indexed extractions.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2023 08:52:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-a-field-position-change-in-logs-then-how-to-trace/m-p/652184#M225427</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-07-27T08:52:28Z</dc:date>
    </item>
  </channel>
</rss>

