<?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 How to retrieve nested json in fetch logs in Log Analytics</title>
    <link>https://community.dynatrace.com/t5/Log-Analytics/How-to-retrieve-nested-json-in-fetch-logs/m-p/288436#M1480</link>
    <description>&lt;P&gt;Hello team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I having trying to get some fields from keda controller in kubernetes using fetch logs, this query is almost there but missing some nested json values&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch logs
| filter matchesValue(k8s.namespace.name, "keda")
| sort timestamp desc
| parse content, "LD JSON:json"
| fieldsFlatten  json, fields:{type,namespace,name, error}
| parse error, "LD JSON:error_log"
| fields timestamp, name, namespace, error_log&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm able to get the error log which shows as an actual json:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "error": {
    "code": "404",
    "message": "Resource not found. The requested item could not be located.",
    "status": "NOT_FOUND",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.ResourceInfo",
        "resourceType": "exampleResource",
        "resourceName": "sample-id-123",
        "owner": "sample-owner",
        "description": "The resource with the given ID does not exist."
      }
    ]
  }
}&lt;/LI-CODE&gt;&lt;P&gt;How can I get the message, status and owner in my query above?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 24 Oct 2025 09:14:12 GMT</pubDate>
    <dc:creator>dkroger</dc:creator>
    <dc:date>2025-10-24T09:14:12Z</dc:date>
    <item>
      <title>How to retrieve nested json in fetch logs</title>
      <link>https://community.dynatrace.com/t5/Log-Analytics/How-to-retrieve-nested-json-in-fetch-logs/m-p/288436#M1480</link>
      <description>&lt;P&gt;Hello team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I having trying to get some fields from keda controller in kubernetes using fetch logs, this query is almost there but missing some nested json values&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch logs
| filter matchesValue(k8s.namespace.name, "keda")
| sort timestamp desc
| parse content, "LD JSON:json"
| fieldsFlatten  json, fields:{type,namespace,name, error}
| parse error, "LD JSON:error_log"
| fields timestamp, name, namespace, error_log&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm able to get the error log which shows as an actual json:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "error": {
    "code": "404",
    "message": "Resource not found. The requested item could not be located.",
    "status": "NOT_FOUND",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.ResourceInfo",
        "resourceType": "exampleResource",
        "resourceName": "sample-id-123",
        "owner": "sample-owner",
        "description": "The resource with the given ID does not exist."
      }
    ]
  }
}&lt;/LI-CODE&gt;&lt;P&gt;How can I get the message, status and owner in my query above?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Oct 2025 09:14:12 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Log-Analytics/How-to-retrieve-nested-json-in-fetch-logs/m-p/288436#M1480</guid>
      <dc:creator>dkroger</dc:creator>
      <dc:date>2025-10-24T09:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve nested json in fetch logs</title>
      <link>https://community.dynatrace.com/t5/Log-Analytics/How-to-retrieve-nested-json-in-fetch-logs/m-p/290515#M1500</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;You could try something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch logs
| filter matchesValue(k8s.namespace.name, "keda")
| sort timestamp desc
| parse content, "JSON:json"
| fieldsFlatten json, fields:{type,namespace,name}
| fieldsAdd errorMessage = json[error][message], errorStatus = json[error][status], errorOwner=json[error][details][0][owner]
| fields timestamp, type, name, namespace, errorMessage, errorStatus, errorOwner&lt;/LI-CODE&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;Darya&lt;/P&gt;</description>
      <pubDate>Fri, 28 Nov 2025 16:38:27 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Log-Analytics/How-to-retrieve-nested-json-in-fetch-logs/m-p/290515#M1500</guid>
      <dc:creator>darya-ramashko</dc:creator>
      <dc:date>2025-11-28T16:38:27Z</dc:date>
    </item>
  </channel>
</rss>

