<?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 issue : Events to Metrics conversion in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-issue-Events-to-Metrics-conversion/m-p/757982#M120202</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/170906"&gt;@livehybrid&lt;/a&gt;&amp;nbsp; Yes, I&amp;nbsp; have already done that&amp;nbsp; in my props.&lt;/P&gt;</description>
    <pubDate>Wed, 04 Feb 2026 19:48:46 GMT</pubDate>
    <dc:creator>Poojitha</dc:creator>
    <dc:date>2026-02-04T19:48:46Z</dc:date>
    <item>
      <title>Timestamp issue : Events to Metrics conversion</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-issue-Events-to-Metrics-conversion/m-p/757952#M120200</link>
      <description>&lt;P&gt;Hi Everyone,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have created a custom app that clones current raw data , extracts metrics and dimensions from existing data and routes the extracted data to metrics index.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;My props and transforms are as below :&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;props : 

[eks_fluent]
TRANSFORMS-clone = clone_metrics
NO_BINARY_CHECK = true

[metrics]
TRANSFORMS-extract = extract_metric_k8s_value
TRANSFORMS-routing = route
METRIC-SCHEMA-TRANSFORMS = metric-schema:log_to_metrics
#NO_BINARY_CHECK = true
#EVAL-_metric_time = round(strptime(logtimestamp, "%Y-%m-%d %H:%M:%S.%3N") * 1000)
#METRIC_TIMESTAMP_FIELD = _metric_time
INGEST_EVAL = _metric_time=round(strptime(logtimestamp,"%Y-%m-%d %H:%M:%S.%3N")*1000)
METRIC_TIMESTAMP_FIELD = _metric_time
NO_BINARY_CHECK = true&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;transforms.conf&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;###########################################
# Extract metric + k8s fields
############################################
#[extract_metric_k8s_value]
REGEX = ^.*?\"log_processed\":\{.*?\"timestamp\":\"(?&amp;lt;logtimestamp&amp;gt;[^\"]+)\".*?\"mdc\":\{\"tenantId\":\"(?&amp;lt;tenantId&amp;gt;[^\"]+)\",\"value\":\"?(?&amp;lt;metric_value&amp;gt;[\d\.]+)\"?,\"metricName\":\"(?&amp;lt;metric_name&amp;gt;[^\"]+)\"\},.*?\},.*?\"kubernetes\":\{.*?\"pod_name\":\"(?&amp;lt;pod_name&amp;gt;[^\"]+)\".*?\"namespace_name\":\"(?&amp;lt;namespace_name&amp;gt;[^\"]+)\".*?\"pod_id\":\"(?&amp;lt;pod_id&amp;gt;[^\"]+)\".*?\"host\":\"(?&amp;lt;k8s_host&amp;gt;[^\"]+)\".*?\"container_name\":\"(?&amp;lt;container_name&amp;gt;[^\"]+)\".*?\"docker_id\":\"(?&amp;lt;docker_id&amp;gt;[^\"]+)\".*?\"container_hash\":\"(?&amp;lt;container_hash&amp;gt;[^\"]+)\".*?\"container_image\":\"(?&amp;lt;container_image&amp;gt;[^\"]+)\".*?\}\,\"hostname\":\"(?&amp;lt;extracted_host&amp;gt;[^\"]+)\".*$
FORMAT = logtimestamp::$1 tenantId::$2 metric_value::$3 metric_name::$4 pod_name::$5 namespace_name::$6 pod_id::$7 k8s_host::$8 container_name::$9 docker_id::$10 container_hash::$11 container_image::$12 extracted_host::$13
WRITE_META = true

############################################# 
Clone ONLY metric-capable events
############################################
[clone_metrics]
REGEX = "metricName".*?"value":"\d+(?:\.\d+)?"
CLONE_SOURCETYPE = metrics
WRITE_META = true

############################################
# Route cloned metrics to metrics index
############################################
[route]
REGEX = .
DEST_KEY = _MetaData:Index
FORMAT = metrics

############################################
# Metric schema (controls what survives)
############################################
[metric-schema:log_to_metrics]
METRIC-SCHEMA-WHITELIST-DIMS = logtimestamp, tenantId, metric_name, pod_name, namespace_name, container_name,container_hash, container_image, docker_id, pod_id, extracted_host&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Issue faced is I am extracting logtimestamp and trying to set it as _time in new metrics index. But something is failing here and _time is getting set to indextime instead of logtimestamp&amp;nbsp; I am trying here.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Please can anyone of you help me to know what is going wrong.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks,&amp;nbsp;&lt;BR /&gt;PNV&lt;/P&gt;</description>
      <pubDate>Thu, 05 Feb 2026 05:05:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-issue-Events-to-Metrics-conversion/m-p/757952#M120200</guid>
      <dc:creator>Poojitha</dc:creator>
      <dc:date>2026-02-05T05:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp issue : Events to Metrics conversion</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-issue-Events-to-Metrics-conversion/m-p/757958#M120201</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/241735"&gt;@Poojitha&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a feeling (but could be wrong) that the metric timestamp should be epoch as milliseconds for metrics,&amp;nbsp; try multiplying by 1000 in your INGEST_EVAL.&lt;/P&gt;&lt;P&gt;Please let me know if it works!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":glowing_star:"&gt;🌟&lt;/span&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Did this answer help you?&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;If so, please consider:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Adding karma to show it was useful&lt;/LI&gt;&lt;LI&gt;Marking it as the solution if it resolved your issue&lt;/LI&gt;&lt;LI&gt;Commenting if you need any clarification&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Your feedback encourages the volunteers in this community to continue contributing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Feb 2026 16:16:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-issue-Events-to-Metrics-conversion/m-p/757958#M120201</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2026-02-04T16:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp issue : Events to Metrics conversion</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-issue-Events-to-Metrics-conversion/m-p/757982#M120202</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/170906"&gt;@livehybrid&lt;/a&gt;&amp;nbsp; Yes, I&amp;nbsp; have already done that&amp;nbsp; in my props.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Feb 2026 19:48:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-issue-Events-to-Metrics-conversion/m-p/757982#M120202</guid>
      <dc:creator>Poojitha</dc:creator>
      <dc:date>2026-02-04T19:48:46Z</dc:date>
    </item>
  </channel>
</rss>

