<?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: extracting values ​​from fields in metrics in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/extracting-values-from-fields-in-metrics/m-p/692052#M115070</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/266138"&gt;@Be_JAR&lt;/a&gt;&amp;nbsp; In your first screenshot, it looks like the k8s.pod.name field is already being extracted correctly? It seems to get extracted correctly when using this run-anywhere search using the payload you provided:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval _raw="{
  \"deployment.environment\":\"entorno-pruebas\",
  \"k8s.cluster.name\":\"splunk-otel\",
  \"k8s.namespace.name\":\"default\",
  \"k8s.node.name\":\"minikube\",
  \"k8s.pod.name\":\"my-otel-demo-emailservice-fc5bc4c5f-jxzqz\",
  \"k8s.pod.uid\":\"5fe1ada8-8baa-4960-b873-381b475b2b26\",
  \"metric_type\":\"Gauge\",
  \"os.type\":\"linux\",
  \"metric_name:k8s.pod.filesystem.usage\":491520
}"
| spath
| stats values(k8s.pod.name) as k8s.pod.name&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Jul 2024 04:51:35 GMT</pubDate>
    <dc:creator>KendallW</dc:creator>
    <dc:date>2024-07-01T04:51:35Z</dc:date>
    <item>
      <title>extracting values ​​from fields in metrics</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/extracting-values-from-fields-in-metrics/m-p/691669#M115028</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;I am working with opentelemetry metrics. I have a metric type index, and the format of the payload I receive is like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Be_JAR_0-1719410145708.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31468i4047C49F479F9483/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Be_JAR_0-1719410145708.png" alt="Be_JAR_0-1719410145708.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;example payload :&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{"deployment.environment":"entorno-pruebas","k8s.cluster.name":"splunk-otel","k8s.namespace.name":"default","k8s.node.name":"minikube","k8s.pod.name":"my-otel-demo-emailservice-fc5bc4c5f-jxzqz","k8s.pod.uid":"5fe1ada8-8baa-4960-b873-381b475b2b26","metric_type":"Gauge","os.type":"linux","metric_name:k8s.pod.filesystem.usage":491520}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I need a search that retrieves the various values ​​of the k8s.pod.name field. I'm trying different variations of the search, but I can't get it:&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;|mstats avg(_value) as VAL WHERE index=otel_k8s_metrics metric_name="metric_name:k8s.pod.filesystem.usage*"
|spath input=_raw path=k8s.pod.name output=k8s.pod.name
|stats values(k8s.pod.name) as k8s.pod.name
|table k8s.pod.name&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Does anyone have any idea why it doesn't work. Metrics type indexes support spath&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I appreciate any ideas&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;BR&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;JAR&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 13:57:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/extracting-values-from-fields-in-metrics/m-p/691669#M115028</guid>
      <dc:creator>Be_JAR</dc:creator>
      <dc:date>2024-06-26T13:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: extracting values ​​from fields in metrics</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/extracting-values-from-fields-in-metrics/m-p/692052#M115070</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/266138"&gt;@Be_JAR&lt;/a&gt;&amp;nbsp; In your first screenshot, it looks like the k8s.pod.name field is already being extracted correctly? It seems to get extracted correctly when using this run-anywhere search using the payload you provided:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval _raw="{
  \"deployment.environment\":\"entorno-pruebas\",
  \"k8s.cluster.name\":\"splunk-otel\",
  \"k8s.namespace.name\":\"default\",
  \"k8s.node.name\":\"minikube\",
  \"k8s.pod.name\":\"my-otel-demo-emailservice-fc5bc4c5f-jxzqz\",
  \"k8s.pod.uid\":\"5fe1ada8-8baa-4960-b873-381b475b2b26\",
  \"metric_type\":\"Gauge\",
  \"os.type\":\"linux\",
  \"metric_name:k8s.pod.filesystem.usage\":491520
}"
| spath
| stats values(k8s.pod.name) as k8s.pod.name&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 04:51:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/extracting-values-from-fields-in-metrics/m-p/692052#M115070</guid>
      <dc:creator>KendallW</dc:creator>
      <dc:date>2024-07-01T04:51:35Z</dc:date>
    </item>
  </channel>
</rss>

