<?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: Timestmap extraction for multiple events in single sourcetype in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Timestmap-extraction-for-multiple-events-in-single-sourcetype/m-p/692763#M115147</link>
    <description>&lt;P&gt;The short answer is that the different log formats should be in different sourcetypes.&lt;/P&gt;</description>
    <pubDate>Tue, 09 Jul 2024 13:08:21 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2024-07-09T13:08:21Z</dc:date>
    <item>
      <title>Timestmap extraction for multiple events in single sourcetype</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestmap-extraction-for-multiple-events-in-single-sourcetype/m-p/692762#M115146</link>
      <description>&lt;P&gt;Hi folks,&lt;BR /&gt;I have a use case where I am having different types of events in a single sourcetype. I want to apply different timestamp extractions for both the events.&lt;BR /&gt;I am using TIME_PREFIX and MAX_TIMESTAMP_LOOKAHEAD&amp;nbsp;to extract the timestamp from event #1. However, the same rules won't be useful for event #2.&lt;/P&gt;
&lt;P&gt;Is there a way to extract the timestamp values from both the events in a single sourcetype?&lt;/P&gt;
&lt;P&gt;Event #1 Timestamp should be extracted as (Oct &amp;nbsp;9 23:57:37.887)&lt;BR /&gt;Oct 10 05:27:48 192.168.100.1 593155: *Oct &amp;nbsp;9 23:57:37.887: blah blah blah&lt;/P&gt;
&lt;P&gt;Event #2 Timestamp should be extracted as (Feb 13 11:27:46)&lt;BR /&gt;Feb 13 11:27:46 100.80.8.22 %abc-INFO-000: blah blah blah&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;TIME_PREFIX = \s[^\s]+\s\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}\s[^\s]+:\s|\s[^\s]+\s\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}\s

MAX_TIMESTAMP_LOOKAHEAD = 30&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 09 Jul 2024 14:25:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestmap-extraction-for-multiple-events-in-single-sourcetype/m-p/692762#M115146</guid>
      <dc:creator>darshm</dc:creator>
      <dc:date>2024-07-09T14:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: Timestmap extraction for multiple events in single sourcetype</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestmap-extraction-for-multiple-events-in-single-sourcetype/m-p/692763#M115147</link>
      <description>&lt;P&gt;The short answer is that the different log formats should be in different sourcetypes.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2024 13:08:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestmap-extraction-for-multiple-events-in-single-sourcetype/m-p/692763#M115147</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-07-09T13:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: Timestmap extraction for multiple events in single sourcetype</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestmap-extraction-for-multiple-events-in-single-sourcetype/m-p/692764#M115148</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/269792"&gt;@darshm&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;if you're sure that in your events there's only one date and time, you could leave Splunk to choose the timestamp, but, my hint is the same of&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;: different formats should have different sourcetypes, eventually with a similar name (e.g. for fortinet there are fortigate_events, fortigate_logs, fortigate_utm, etc...).&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2024 13:15:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestmap-extraction-for-multiple-events-in-single-sourcetype/m-p/692764#M115148</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-07-09T13:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: Timestmap extraction for multiple events in single sourcetype</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestmap-extraction-for-multiple-events-in-single-sourcetype/m-p/692865#M115167</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;, Thanks for your response.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Regarding the solution which you are recommending, I agree to your point. Ideally, the sourcetypes should be different for different types of events.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;However, in our case, we are having parent-child relationship of the sourcetypes. We are bifurcating the child sourcetype from the parent sourcetype.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;We observed that the &lt;STRONG&gt;TIME_PREFIX&lt;/STRONG&gt; extractions were not getting applied if we defined them in the child stanza. Seems like Splunk first performs the timestamp extractions from parent and then the renaming of the sourcetype happens.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;So, we are trying to figure out a way in which we can handle multiple event format in the parent sourcetype stanza itself.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 10 Jul 2024 09:50:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestmap-extraction-for-multiple-events-in-single-sourcetype/m-p/692865#M115167</guid>
      <dc:creator>darshm</dc:creator>
      <dc:date>2024-07-10T09:50:25Z</dc:date>
    </item>
  </channel>
</rss>

