<?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: Parsing in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Parsing/m-p/710030#M239929</link>
    <description>You must put those configurations in first full splunk enterprise instance from source to indexers. If you have separate HF which is endpoint for those udp feed, then those must be there. If that is UF and then you are send events through IHF then add those conf there. And if there haven’t been any HF before indexers then add those configurations in all indexers.&lt;BR /&gt;And as said it’s better to use real syslog server to terminate syslog feeds a use e.g. a UF to collects events from files or use SC4S for that.</description>
    <pubDate>Tue, 28 Jan 2025 19:27:15 GMT</pubDate>
    <dc:creator>isoutamo</dc:creator>
    <dc:date>2025-01-28T19:27:15Z</dc:date>
    <item>
      <title>Parsing</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Parsing/m-p/709969#M239913</link>
      <description>&lt;P&gt;Hello community,&lt;/P&gt;&lt;P&gt;I need help with configuring Splunk to correctly process timestamp information in my UDP messages. When I send messages starting with a pattern like &amp;lt;\d+&amp;gt;, for example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;777&amp;gt; 2025-01-03T06:12:19.236514-08:00 hello world&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Splunk substitutes the original timestamp with the current date and local host address. Consequently, what I see in Splunk is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Jan 28 14:27:25 127.0.0.1 2025-01-03T06:12:19.236514-08:00 hello world&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to know how to disable this behavior so that the actual timestamp from the message is preserved in the event. I have attempted to configure TIME_FORMAT and TIME_PREFIX in the props.conf file, but it seems those settings are applied after Splunk substitutes the timestamp with the current date and local host.&lt;/P&gt;&lt;P&gt;As a workaround, I implemented the following in props.conf:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[my_sourcetype]
EXTRACT-HostName = \b(?P\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+(-\d{2}:\d{2})?)
EVAL-_time = strptime(extracted_time, "%Y-%m-%dT%H:%M:%S.%6N%z")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a better way to achieve this? Any guidance would be greatly appreciated!&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2025 14:24:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Parsing/m-p/709969#M239913</guid>
      <dc:creator>user3344</dc:creator>
      <dc:date>2025-01-28T14:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Parsing/m-p/709973#M239914</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/275941"&gt;@user3344&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;i suppose that you're speaking of Splunk as syslog receiver.&lt;/P&gt;&lt;P&gt;I tried in many ways to avoid to add this prefix without any result, every syslog receiver adds at the beginning of the event the timestamp and the sender ip.&lt;/P&gt;&lt;P&gt;It isn't a problem from Splunk, if you use rsyslog as receiver, you have the same behaviour.&lt;/P&gt;&lt;P&gt;The only way is, if it's wrong, to modify the timestamp format to take the second one and not the one added by the syslog receiver.&lt;/P&gt;&lt;P&gt;You could try to remove the header using SEDCMD command in props.conf, but anyway, you have to configure the second timestamp as the correct timestamp.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2025 14:45:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Parsing/m-p/709973#M239914</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2025-01-28T14:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Parsing/m-p/709980#M239916</link>
      <description>&lt;P&gt;First, one should not be receiving UDP (or TCP) directly into a Splunk instance.&amp;nbsp; Instead, use a dedicated syslog receiver (such as syslog-ng) to save the data to disk and monitor the files with a Universal Forwarder.&lt;/P&gt;&lt;P&gt;If that's not feasible, try these props to better extract timestamps from the events.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[my_sourcetype]
SHOULD_LINEMERGE = false
LINE_BREAKER = ([\r\n]+)\&amp;lt;
TIME_PREFIX = \&amp;gt;\s
TIME_FORMAT = %Y-%m-%dT%H:%M:%S.%6N%z
MAX_TIMESTAMP_LOOKAHEAD = 32
EXTRACT-HostName = \b(?P\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+(-\d{2}:\d{2})?)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 28 Jan 2025 15:20:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Parsing/m-p/709980#M239916</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2025-01-28T15:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Parsing/m-p/710022#M239926</link>
      <description>&lt;P&gt;That doesn't help. _time still represents current time, not time in the event.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2025 18:48:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Parsing/m-p/710022#M239926</guid>
      <dc:creator>user3344</dc:creator>
      <dc:date>2025-01-28T18:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Parsing/m-p/710023#M239927</link>
      <description>&lt;P&gt;Could you explain a bit more what do you mean by&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;wrote:&lt;P&gt;The only way is, if it's wrong, to modify the timestamp format to take the second one and not the one added by the syslog receiver.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;?&lt;BR /&gt;&lt;BR /&gt;is approach with having that&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;EXTRACT-extracted_time = \b(?P&amp;lt;extracted_time&amp;gt;\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+(-\d{2}:\d{2})?)
EVAL-_time = strptime(extracted_time, "%Y-%m-%dT%H:%M:%S.%6N%z")&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;in props.conf right?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2025 18:51:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Parsing/m-p/710023#M239927</guid>
      <dc:creator>user3344</dc:creator>
      <dc:date>2025-01-28T18:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Parsing/m-p/710030#M239929</link>
      <description>You must put those configurations in first full splunk enterprise instance from source to indexers. If you have separate HF which is endpoint for those udp feed, then those must be there. If that is UF and then you are send events through IHF then add those conf there. And if there haven’t been any HF before indexers then add those configurations in all indexers.&lt;BR /&gt;And as said it’s better to use real syslog server to terminate syslog feeds a use e.g. a UF to collects events from files or use SC4S for that.</description>
      <pubDate>Tue, 28 Jan 2025 19:27:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Parsing/m-p/710030#M239929</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2025-01-28T19:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Parsing/m-p/710111#M239937</link>
      <description>&lt;P&gt;Normally timestamp extraction (given it's properly configured) works pretty well and Splunk doesn't have to resort to the fallback action of assigning the current timestamp to the event.&lt;/P&gt;&lt;P&gt;But the data ingestion must be properly configured - the sourcetype must have correct settings for the given time format and the sourcetype must be defined at the right place (on the correct component).&lt;/P&gt;&lt;P&gt;In your case we have no idea what the ingestion process looks like, how many components are involved, where the settings are defined, what sourcetypes you are using and so on.&lt;/P&gt;&lt;P&gt;Furthermore the fact that&lt;/P&gt;&lt;PRE&gt;&amp;lt;777&amp;gt; 2025-01-03T06:12:19.236514-08:00 hello world&lt;/PRE&gt;&lt;P&gt;event which looks like "almost normal" syslog message (the &amp;lt;777&amp;gt; is definitely not a correct facility/priority combination) is getting transformed into&lt;/P&gt;&lt;PRE&gt;Jan 28 14:27:25 127.0.0.1 2025-01-03T06:12:19.236514-08:00 hello world&lt;/PRE&gt;&lt;P&gt;suggests that there is some intermediate step (the 127.0.0.1 part is not a part of the original message).&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2025 10:07:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Parsing/m-p/710111#M239937</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-01-29T10:07:36Z</dc:date>
    </item>
  </channel>
</rss>

