<?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: HEC token use for the source to Splunk in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/HEC-token-use-for-the-source-to-Splunk/m-p/700079#M20316</link>
    <description>&lt;P&gt;&lt;SPAN class=""&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/RESTREF/RESTinput#services.2Fcollector.2Fevent" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/latest/RESTREF/RESTinput#services.2Fcollector.2Fevent&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;H2&gt;&lt;SPAN class=""&gt;services/collector/event&lt;/SPAN&gt;&lt;/H2&gt;&lt;P&gt;Sends timestamped events to HTTP Event Collector using the Splunk platform JSON event protocol when auto_extract_timestamp is set to "true" in the /event URL.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;DIV class=""&gt;An example of a timestamp is: 2017-01-02 00:00:00.&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class=""&gt;If there is a timestamp in the event's JSON envelope, Splunk honors that timestamp first.&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class=""&gt;If there is no timestamp in the event's JSON envelope, the merging pipeline extracts the timestamp from the event.&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class=""&gt;If "time=xxx" is used in the /event URL then auto_extract_timestamp is disabled.&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class=""&gt;Splunk supports timestamps using the Epoch format.&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;In other words - unless you specify your URI as /services/collector/event?auto_extract_timestamp=true your timestamp will _not_ be extracted from the event itself (Splunk will not even bother looking for it - it will either get the data from the json envelope or will assume current timestamp if there is no timestamp in the envelope). And even if the auto_extract_timestamp parameter is set to true, in cases listed above extraction is not performed either.&lt;/P&gt;&lt;P&gt;See also &lt;A href="https://www.aplura.com/assets/pdf/hec_pipelines.pdf" target="_blank" rel="noopener"&gt;https://www.aplura.com/assets/pdf/hec_pipelines.pdf&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Sep 2024 10:55:38 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2024-09-25T10:55:38Z</dc:date>
    <item>
      <title>HEC token use for the source to Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/HEC-token-use-for-the-source-to-Splunk/m-p/700058#M20313</link>
      <description>&lt;P&gt;Hello Splunkers!!&lt;/P&gt;
&lt;P&gt;I have ingested data into Splunk from the source system using the URI "&lt;A href="https://localhost:8088/services/collector" target="_blank" rel="noopener"&gt;https://localhost:8088/services/collector&lt;/A&gt;" along with the HEC token. However, the data is not being displayed in Splunk with the appropriate sourcetype parsing, which is affecting the timestamp settings for the events.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;The sourcetype and timestamp are currently being displayed as below.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="uagraw01_1-1727249483055.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/32801iC7D147EC1C95597D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="uagraw01_1-1727249483055.png" alt="uagraw01_1-1727249483055.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;My actual props.conf setting as below :&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[agv_voot]
DATETIME_CONFIG =
LINE_BREAKER = ([\r\n]+)
NO_BINARY_CHECK = true
category = Custom
KV_MODE = json
pulldown_type = 1
TIME_PREFIX = ^\@timestamp
TIME_FORMAT = %Y-%m-%dT%H:%M:%S.%3N
TIMESTAMP_FIELDS = @timestamp
TRANSFORMS-trim_timestamp = trim_long_timestamp&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;transforms.conf

[trim_long_timestamp]
REGEX = (\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3})\d+(-\d{2}:\d{2})
FORMAT = $1&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;Please help to fix the proper parsing with correct sourcetype and timestamp.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2024 14:13:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/HEC-token-use-for-the-source-to-Splunk/m-p/700058#M20313</guid>
      <dc:creator>uagraw01</dc:creator>
      <dc:date>2024-09-25T14:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: HEC token use for the source to Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/HEC-token-use-for-the-source-to-Splunk/m-p/700079#M20316</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/RESTREF/RESTinput#services.2Fcollector.2Fevent" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/latest/RESTREF/RESTinput#services.2Fcollector.2Fevent&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;H2&gt;&lt;SPAN class=""&gt;services/collector/event&lt;/SPAN&gt;&lt;/H2&gt;&lt;P&gt;Sends timestamped events to HTTP Event Collector using the Splunk platform JSON event protocol when auto_extract_timestamp is set to "true" in the /event URL.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;DIV class=""&gt;An example of a timestamp is: 2017-01-02 00:00:00.&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class=""&gt;If there is a timestamp in the event's JSON envelope, Splunk honors that timestamp first.&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class=""&gt;If there is no timestamp in the event's JSON envelope, the merging pipeline extracts the timestamp from the event.&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class=""&gt;If "time=xxx" is used in the /event URL then auto_extract_timestamp is disabled.&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class=""&gt;Splunk supports timestamps using the Epoch format.&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;In other words - unless you specify your URI as /services/collector/event?auto_extract_timestamp=true your timestamp will _not_ be extracted from the event itself (Splunk will not even bother looking for it - it will either get the data from the json envelope or will assume current timestamp if there is no timestamp in the envelope). And even if the auto_extract_timestamp parameter is set to true, in cases listed above extraction is not performed either.&lt;/P&gt;&lt;P&gt;See also &lt;A href="https://www.aplura.com/assets/pdf/hec_pipelines.pdf" target="_blank" rel="noopener"&gt;https://www.aplura.com/assets/pdf/hec_pipelines.pdf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2024 10:55:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/HEC-token-use-for-the-source-to-Splunk/m-p/700079#M20316</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-09-25T10:55:38Z</dc:date>
    </item>
  </channel>
</rss>

