<?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: How to figure out &amp;quot;Deletion of legacy Kubernetes container metrics in Dynatrace version 1.292&amp;quot; in Container platforms</title>
    <link>https://community.dynatrace.com/t5/Container-platforms/How-to-figure-out-quot-Deletion-of-legacy-Kubernetes-container/m-p/238860#M2252</link>
    <description>&lt;P&gt;Just got confirmed that these metrics are already integrated into the tool &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;BR /&gt;(Also working on getting it mentioned in the release notes) thx again&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/36140"&gt;@Kenny_Gillette&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 04 Mar 2024 16:11:08 GMT</pubDate>
    <dc:creator>florian_g</dc:creator>
    <dc:date>2024-03-04T16:11:08Z</dc:date>
    <item>
      <title>How to figure out "Deletion of legacy Kubernetes container metrics in Dynatrace version 1.292"</title>
      <link>https://community.dynatrace.com/t5/Container-platforms/How-to-figure-out-quot-Deletion-of-legacy-Kubernetes-container/m-p/238693#M2248</link>
      <description>&lt;P&gt;Team,&lt;/P&gt;
&lt;P&gt;Dynatrace release notes this week for 1.286 came out.&amp;nbsp; They mentioned that "&lt;STRONG&gt;Deletion of legacy Kubernetes container metrics in Dynatrace version 1.292" &lt;/STRONG&gt;will happen, which is about 3 months away.&amp;nbsp; How best review our many tenants for this without manually looking?&amp;nbsp; We have too many dashboards/metrics to go through everything manually.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Release notes&lt;/STRONG&gt;:&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/whats-new/release-notes/saas/sprint-286" target="_blank" rel="noopener"&gt;https://docs.dynatrace.com/docs/whats-new/release-notes/saas/sprint-286&lt;/A&gt;&lt;/P&gt;
&lt;H3&gt;Deletion of legacy Kubernetes container metrics in Dynatrace version 1.292&lt;/H3&gt;
&lt;P class=""&gt;&lt;SPAN class=""&gt;Infrastructure Observability | Kubernetes&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN class=""&gt;deprecated&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=""&gt;In Dynatrace version 1.292, the following metric keys will be deleted, and access to their historical data will no longer be possible. If you are using any of these metrics, please migrate to the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;What to use instead&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;metrics, which contain the same data and can be used to access the data.&lt;/P&gt;
&lt;P class=""&gt;&lt;STRONG&gt;Containers&lt;/STRONG&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;CPU&lt;/STRONG&gt;&lt;/P&gt;
&lt;DIV class=""&gt;Deprecated metric What to use instead
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P class=""&gt;builtin:containers.cpu.throttledMilliCores.legacy&lt;/P&gt;
&lt;DIV class=""&gt;
&lt;UL class=""&gt;
&lt;LI&gt;&lt;STRONG&gt;Name&lt;/STRONG&gt;: [Deprecated] Containers: CPU throttling, mCores&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Description&lt;/STRONG&gt;: CPU throttling per container in millicores. Deprecated metric for historical data access only.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Unit&lt;/STRONG&gt;: Millicores&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Aggregations&lt;/STRONG&gt;: auto, avg, max, min&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=""&gt;builtin:containers.cpu.throttledMilliCores&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P class=""&gt;builtin:containers.cpu.usageMilliCores.legacy&lt;/P&gt;
&lt;DIV class=""&gt;
&lt;UL class=""&gt;
&lt;LI&gt;&lt;STRONG&gt;Name&lt;/STRONG&gt;: [Deprecated] Containers: CPU usage, mCores&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Description&lt;/STRONG&gt;: CPU usage per container in millicores. Deprecated metric for historical data access only.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Unit&lt;/STRONG&gt;: Millicores&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Aggregations&lt;/STRONG&gt;: auto, avg, max, min&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=""&gt;builtin:containers.cpu.usageMilliCores&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P class=""&gt;builtin:containers.cpu.usagePercent.legacy&lt;/P&gt;
&lt;DIV class=""&gt;
&lt;UL class=""&gt;
&lt;LI&gt;&lt;STRONG&gt;Name&lt;/STRONG&gt;: [Deprecated] Containers: CPU usage, % of limit&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Description&lt;/STRONG&gt;: Percent CPU usage per container relative to CPU resource limit. Logical cores are used if CPU limit is not set. Deprecated metric for historical data access only.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Unit&lt;/STRONG&gt;: Percent (%)&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Aggregations&lt;/STRONG&gt;: auto, avg&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=""&gt;builtin:containers.cpu.usagePercent&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P class=""&gt;builtin:containers.cpu.throttlingRatio&lt;/P&gt;
&lt;DIV class=""&gt;
&lt;UL class=""&gt;
&lt;LI&gt;&lt;STRONG&gt;Name&lt;/STRONG&gt;: [Deprecated] Containers: CPU throttling ratio&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Description&lt;/STRONG&gt;: CPU resource limit per container.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Unit&lt;/STRONG&gt;: Ratio&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Aggregations&lt;/STRONG&gt;: auto, avg, max, min&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=""&gt;There is no replacement for the throttling ratio, but it can be calculated on the fly from other metrics.&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;P class=""&gt;&lt;STRONG&gt;Memory&lt;/STRONG&gt;&lt;/P&gt;
&lt;DIV class=""&gt;Deprecated metric What to use instead
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P class=""&gt;builtin:containers.memory.residentSetBytes.legacy&lt;/P&gt;
&lt;DIV class=""&gt;
&lt;UL class=""&gt;
&lt;LI&gt;&lt;STRONG&gt;Name&lt;/STRONG&gt;: [Deprecated] Containers: Memory usage, bytes&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Description&lt;/STRONG&gt;: Resident set size (Unix) or private working set size (Windows) per container in bytes. Deprecated metric for historical data access only.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Unit&lt;/STRONG&gt;: Byte&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Aggregations&lt;/STRONG&gt;: auto, avg, max, min&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=""&gt;builtin:containers.memory.residentSetBytes&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P class=""&gt;builtin:containers.memory.usagePercent.legacy&lt;/P&gt;
&lt;DIV class=""&gt;
&lt;UL class=""&gt;
&lt;LI&gt;&lt;STRONG&gt;Name&lt;/STRONG&gt;: [Deprecated] Containers: Memory usage, % of limit&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Description&lt;/STRONG&gt;: Resident set size (Unix) or private working set size (Windows) per container in percent relative to container memory limit. If no limit is set, this equals total physical memory. Deprecated metric for historical data access only.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Unit&lt;/STRONG&gt;: Percent (%)&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Aggregations&lt;/STRONG&gt;: auto, avg&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=""&gt;builtin:containers.memory.usagePercent&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 08:55:54 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Container-platforms/How-to-figure-out-quot-Deletion-of-legacy-Kubernetes-container/m-p/238693#M2248</guid>
      <dc:creator>Kenny_Gillette</dc:creator>
      <dc:date>2024-03-04T08:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to figure out "Deletion of legacy Kubernetes container metrics in Dynatrace version 1.292"</title>
      <link>https://community.dynatrace.com/t5/Container-platforms/How-to-figure-out-quot-Deletion-of-legacy-Kubernetes-container/m-p/238743#M2249</link>
      <description>&lt;P&gt;For the dashboards you can use something like this, i will.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-SPOILER&gt;&lt;LI-CODE lang="python"&gt;import requests
import time
import os
import json
#  ###############################################  #
#  #                                             #  #
#  #  Set the following variables to your        #  #
#  #  environment                                #  #
#  #                                             #  #
#  ###############################################  #
# Set the following variables to your environment
tenant = '{tenantId}'
dynatraceTenant = '{0}.live.dynatrace.com'.format(tenant)
dynatraceTokenEncrypt = '{apiToken}'
dynatraceToken = dynatraceTokenEncrypt
#  ###############################################  #
#  #                                             #  #
#  #  Do not modify below this line              #  #
#  #                                             #  #
#  ###############################################  #
epochtime = int(time.time())
namefile = "{0}-dashboards-{1}".format(tenant, epochtime)
rootFolder = os.path.dirname(os.path.abspath(__file__))
outputFile = "{0}\{1}.json".format(rootFolder,namefile)
 
dashboardWithDeprecateKeys = {}

#  ###############################################  #
#  #                   Logic                     #  #
#  ###############################################  #
# get the list of dashboards
url = "https://" + dynatraceTenant + "/api/config/v1/dashboards"
headers = {
    'accept': 'application/json; charset=utf-8',
    'Authorization': 'Api-Token ' + dynatraceToken,
    'Content-Type': 'application/json; charset=utf-8'
}
response = requests.get(url, headers=headers)
response.raise_for_status()
# first item in the list
exitafter = 0
arrayDeprecateKeys = [
                        "builtin:containers.cpu.throttledMilliCores.legacy",
                        "builtin:containers.cpu.usageMilliCores.legacy",
                        "builtin:containers.cpu.usagePercent.legacy",
                        "builtin:containers.cpu.throttlingRatio",
                        "builtin:containers.memory.residentSetBytes.legacy",
                        "builtin:containers.memory.usagePercent.legacy"
                    ]
for dashboard in response.json()["dashboards"]:
    if exitafter == 1:
        break
    url = "https://" + dynatraceTenant + "/api/config/v1/dashboards/" + dashboard["id"]
    response = requests.get(url, headers=headers)
    response.raise_for_status()
    # check if the dashboard has any deprecated keys text
    for key in arrayDeprecateKeys:
        # print("Checking for deprecated key: " + key)
        if key in response.text:
            print("Dashboard URL: " + url)
            dashboardWithDeprecateKeys[dashboard["id"]] = {
                "name": dashboard["name"],
                "url": url
            }
            if "deprecatedKeys" in dashboardWithDeprecateKeys[dashboard["id"]]:
                dashboardWithDeprecateKeys[dashboard["id"]]["deprecatedKeys"].append(key)
            else:
                dashboardWithDeprecateKeys[dashboard["id"]]["deprecatedKeys"] = [key]

        else:
            print("No deprecated keys found:" + key)
    # exitafter = exitafter + 1

with open(outputFile, 'w') as outfile:
    json.dump(dashboardWithDeprecateKeys, outfile, indent=4)
    print("File saved: " + outputFile)
    print("Total dashboards with deprecated keys: " + str(len(dashboardWithDeprecateKeys)))&lt;/LI-CODE&gt;&lt;/LI-SPOILER&gt;&lt;P&gt;I know that could be better but for now this will create a Json file with all dashboards and theirs Deprecate Keys&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 03 Mar 2024 23:55:42 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Container-platforms/How-to-figure-out-quot-Deletion-of-legacy-Kubernetes-container/m-p/238743#M2249</guid>
      <dc:creator>rgarzon1</dc:creator>
      <dc:date>2024-03-03T23:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to figure out "Deletion of legacy Kubernetes container metrics in Dynatrace version 1.292"</title>
      <link>https://community.dynatrace.com/t5/Container-platforms/How-to-figure-out-quot-Deletion-of-legacy-Kubernetes-container/m-p/238823#M2250</link>
      <description>&lt;P&gt;thanks for bringing this up - we will integrate this into this tool:&amp;nbsp;&lt;A href="https://metricaudit.services.dynatrace.com/" target="_blank"&gt;https://metricaudit.services.dynatrace.com/&lt;/A&gt;&lt;BR /&gt;The tool checks all your dashboards, alerts, and SLOs for known (to be) deprecated metrics and allows you to export the information in csv for further analysis.&lt;BR /&gt;I'll come back asap here to tell you when it's available.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 13:48:00 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Container-platforms/How-to-figure-out-quot-Deletion-of-legacy-Kubernetes-container/m-p/238823#M2250</guid>
      <dc:creator>florian_g</dc:creator>
      <dc:date>2024-03-04T13:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to figure out "Deletion of legacy Kubernetes container metrics in Dynatrace version 1.292"</title>
      <link>https://community.dynatrace.com/t5/Container-platforms/How-to-figure-out-quot-Deletion-of-legacy-Kubernetes-container/m-p/238826#M2251</link>
      <description>&lt;P&gt;Ah thanks.&amp;nbsp; I forgot about this tool and this would be great for this to be in this tool&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 14:06:36 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Container-platforms/How-to-figure-out-quot-Deletion-of-legacy-Kubernetes-container/m-p/238826#M2251</guid>
      <dc:creator>Kenny_Gillette</dc:creator>
      <dc:date>2024-03-04T14:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to figure out "Deletion of legacy Kubernetes container metrics in Dynatrace version 1.292"</title>
      <link>https://community.dynatrace.com/t5/Container-platforms/How-to-figure-out-quot-Deletion-of-legacy-Kubernetes-container/m-p/238860#M2252</link>
      <description>&lt;P&gt;Just got confirmed that these metrics are already integrated into the tool &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;BR /&gt;(Also working on getting it mentioned in the release notes) thx again&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/36140"&gt;@Kenny_Gillette&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 16:11:08 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Container-platforms/How-to-figure-out-quot-Deletion-of-legacy-Kubernetes-container/m-p/238860#M2252</guid>
      <dc:creator>florian_g</dc:creator>
      <dc:date>2024-03-04T16:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to figure out "Deletion of legacy Kubernetes container metrics in Dynatrace version 1.292"</title>
      <link>https://community.dynatrace.com/t5/Container-platforms/How-to-figure-out-quot-Deletion-of-legacy-Kubernetes-container/m-p/238861#M2253</link>
      <description>&lt;P&gt;Perfect.&amp;nbsp; Thanks for response!&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 16:13:23 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Container-platforms/How-to-figure-out-quot-Deletion-of-legacy-Kubernetes-container/m-p/238861#M2253</guid>
      <dc:creator>Kenny_Gillette</dc:creator>
      <dc:date>2024-03-04T16:13:23Z</dc:date>
    </item>
  </channel>
</rss>

