<?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: Timestamp extraction from hec in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-do-Timestamp-extraction-from-hec/m-p/658374#M111369</link>
    <description>&lt;P&gt;If&amp;nbsp; you are using /services/collector/event end point to send events, try changing it to /services/collector/raw.&lt;/P&gt;&lt;P&gt;Test using below commands&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;curl -vvvv -k &lt;A href="https://hecendpoint:8088/services/collector/raw" target="_blank"&gt;https://hecendpoint:8088/services/collector/raw&lt;/A&gt; -H "Authorization: Splunk XXXXXXXXXXXX" -d '{"id": "raw-message", "createdDateTime": "2023-09-23T11:11:11Z"}'&lt;/P&gt;&lt;P&gt;curl -vvvv -k &lt;A href="https://splunkviphec.bbl.int:8088/services/collector/event" target="_blank"&gt;https://splunkviphec.bbl.int:8088/services/collector/event&lt;/A&gt; -H "Authorization: Splunk XXXXXXXXXXXXXXX" -d '{"event":{"id": "event-message", "createdDateTime": "2023-09-23T11:11:11Z"}}'&lt;/P&gt;</description>
    <pubDate>Fri, 22 Sep 2023 05:10:51 GMT</pubDate>
    <dc:creator>dvg06</dc:creator>
    <dc:date>2023-09-22T05:10:51Z</dc:date>
    <item>
      <title>How to do Timestamp extraction from hec?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-do-Timestamp-extraction-from-hec/m-p/658218#M111348</link>
      <description>&lt;P&gt;hi Splunk Gurus&lt;/P&gt;
&lt;P&gt;Looking for some help please&lt;/P&gt;
&lt;P&gt;I am trying to extract timestamp from json sent via hec token.&lt;/P&gt;
&lt;P&gt;I have my inputs.conf and props.conf in same app and are deployed on heavy forwarders.&lt;/P&gt;
&lt;P&gt;My props:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[hec:azure:nonprod:json]
MAX_TIMESTAMP_LOOKAHEAD = 512
TIME_PREFIX = createdDateTime\"\:\s+\"
TIME_FORMAT = %Y-%m-%dT%H:%M:%S%Z
TZ = UTC&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sample event:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{"@odata.type": "#microsoft.graph.group", "id": "XXXXXXXXXXXXX", "deletedDateTime": null, "classification": null, "createdDateTime": "2022-06-03T02:05:02Z", "creationOptions": [], "description": null, "displayName": "global_admin", "expirationDateTime": null, "groupTypes": [], "isAssignableToRole": true, "mail": null, "mailEnabled": false, "mailNickname": "XXXX", "membershipRule": null, "membershipRuleProcessingState": null, "onPremisesDomainName": null, "onPremisesLastSyncDateTime": null, "onPremisesNetBiosName": null, "onPremisesSamAccountName": null, "onPremisesSecurityIdentifier": null, "onPremisesSyncEnabled": null, "preferredDataLocation": null, "preferredLanguage": null, "proxyAddresses": [], "renewedDateTime": "2022-06-03T02:05:02Z", "resourceBehaviorOptions": [], "resourceProvisioningOptions": [], "securityEnabled": true, "securityIdentifier": "XXXXXXXXXXXXX", "theme": null, "visibility": "Private", "onPremisesProvisioningErrors": [], "serviceProvisioningErrors": [], "graphendpointtype": "directoryroles"}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Wanted to extract timestamp from&amp;nbsp;createdDateTime field.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried&amp;nbsp;&lt;STRONG&gt;TIMESTAMP_FIELDS = createdDateTime,&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;and&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;INGEST_EVAL=_time=strptime(spath(_raw,"createdDateTime"), "%Y-%m-%dT%H:%M:%S%Z")&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;as per previous answers.splunk posts but nothing worked, splunk still picks up index time only.&lt;/P&gt;
&lt;P&gt;What am I doing wrong here?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 18:16:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-do-Timestamp-extraction-from-hec/m-p/658218#M111348</guid>
      <dc:creator>dinesh_bendigo</dc:creator>
      <dc:date>2023-09-22T18:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp extraction from hec</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-do-Timestamp-extraction-from-hec/m-p/658374#M111369</link>
      <description>&lt;P&gt;If&amp;nbsp; you are using /services/collector/event end point to send events, try changing it to /services/collector/raw.&lt;/P&gt;&lt;P&gt;Test using below commands&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;curl -vvvv -k &lt;A href="https://hecendpoint:8088/services/collector/raw" target="_blank"&gt;https://hecendpoint:8088/services/collector/raw&lt;/A&gt; -H "Authorization: Splunk XXXXXXXXXXXX" -d '{"id": "raw-message", "createdDateTime": "2023-09-23T11:11:11Z"}'&lt;/P&gt;&lt;P&gt;curl -vvvv -k &lt;A href="https://splunkviphec.bbl.int:8088/services/collector/event" target="_blank"&gt;https://splunkviphec.bbl.int:8088/services/collector/event&lt;/A&gt; -H "Authorization: Splunk XXXXXXXXXXXXXXX" -d '{"event":{"id": "event-message", "createdDateTime": "2023-09-23T11:11:11Z"}}'&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 05:10:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-do-Timestamp-extraction-from-hec/m-p/658374#M111369</guid>
      <dc:creator>dvg06</dc:creator>
      <dc:date>2023-09-22T05:10:51Z</dc:date>
    </item>
  </channel>
</rss>

