<?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: API V2 /metrics/query with names transformation : How to mask the json &amp;quot;dimensionMap&amp;quot; on response ? in Automations</title>
    <link>https://community.dynatrace.com/t5/Automations/API-V2-metrics-query-with-names-transformation-How-to-mask-the/m-p/175454#M607</link>
    <description>&lt;P&gt;Just for someone that might see this in the future, the use of merge(1) ahs been deprecated, and should use the dimension key name.&lt;/P&gt;&lt;P&gt;Please check out: &lt;A href="https://www.dynatrace.com/support/help/shortlink/api-metrics-v2-selector#merge-transformation" target="_blank"&gt;https://www.dynatrace.com/support/help/shortlink/api-metrics-v2-selector#merge-transformation&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Nov 2021 20:25:03 GMT</pubDate>
    <dc:creator>AntonioSousa</dc:creator>
    <dc:date>2021-11-05T20:25:03Z</dc:date>
    <item>
      <title>API V2 /metrics/query with names transformation : How to mask the json "dimensionMap" on response ?</title>
      <link>https://community.dynatrace.com/t5/Automations/API-V2-metrics-query-with-names-transformation-How-to-mask-the/m-p/121400#M605</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I use the names transformation feature with endpoint "/metrics/query" to get the datapoint with the entity name on the response.&lt;BR /&gt;I use the metric selector : builtin:host.cpu.usage&lt;STRONG&gt;:names:&lt;/STRONG&gt;merge(1)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;And It works good :&lt;/P&gt;&lt;P&gt;{&lt;!-- --&gt;&lt;/P&gt;&lt;P&gt;"totalCount": 4,&lt;/P&gt;&lt;P&gt;"nextPageKey": null,&lt;/P&gt;&lt;P&gt;"result": [&lt;/P&gt;&lt;P&gt;{&lt;!-- --&gt;&lt;/P&gt;&lt;P&gt;"metricId": "builtin:host.cpu.usage:names:merge(1)",&lt;/P&gt;&lt;P&gt;"data": [&lt;/P&gt;&lt;P&gt;{&lt;!-- --&gt;&lt;/P&gt;&lt;P&gt;"dimensions": [&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; "RD501D37E80E-HOST"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;],&lt;/P&gt;&lt;P&gt;"dimensionMap": {&lt;!-- --&gt;&lt;/P&gt;&lt;P&gt;"dt&lt;STRONG&gt;.&lt;/STRONG&gt;entity&lt;STRONG&gt;.&lt;/STRONG&gt;host&lt;STRONG&gt;.&lt;/STRONG&gt;name": "RD501D37E80E-HOST"&lt;/P&gt;&lt;P&gt;},&lt;/P&gt;&lt;P&gt;"timestamps": [&lt;/P&gt;&lt;P&gt;1611230400000,&lt;/P&gt;&lt;P&gt;1611241200000,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;But the key "dt.entity.host.name": RD501D37E80E-HOST" is generated exception on my integration because the key name contains the char and this char is not allowed with the mongodb driver &lt;A rel="noopener noreferrer" href="https://docs.mongodb.com/manual/core/document/" target="_blank"&gt;https://docs.mongodb.com/manual/core/document/&lt;/A&gt; :&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;EM&gt;Until support is added in the query language, the use of &lt;CODE&gt;$&lt;/CODE&gt; and &lt;CODE&gt;.&lt;/CODE&gt; in field names is not recommended and is not supported by the official MongoDB drivers.&lt;/EM&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Is there a way to mask the "dimensionMap" on response by changing the query parameters ?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;BR /&gt;Regards, Aurélien&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2021 09:49:56 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/API-V2-metrics-query-with-names-transformation-How-to-mask-the/m-p/121400#M605</guid>
      <dc:creator>agravier</dc:creator>
      <dc:date>2021-02-04T09:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: API V2 /metrics/query with names transformation : How to mask the json "dimensionMap" on response ?</title>
      <link>https://community.dynatrace.com/t5/Automations/API-V2-metrics-query-with-names-transformation-How-to-mask-the/m-p/121401#M606</link>
      <description>&lt;P&gt;I don't think it is possible without extra script. Maybe you should use python script for example which will collect payloads in regular basis and then modify it on the fly before putting it into mongo? &lt;/P&gt;&lt;P&gt;Sebastian &lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2021 13:31:41 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/API-V2-metrics-query-with-names-transformation-How-to-mask-the/m-p/121401#M606</guid>
      <dc:creator>skrystosik</dc:creator>
      <dc:date>2021-02-04T13:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: API V2 /metrics/query with names transformation : How to mask the json "dimensionMap" on response ?</title>
      <link>https://community.dynatrace.com/t5/Automations/API-V2-metrics-query-with-names-transformation-How-to-mask-the/m-p/175454#M607</link>
      <description>&lt;P&gt;Just for someone that might see this in the future, the use of merge(1) ahs been deprecated, and should use the dimension key name.&lt;/P&gt;&lt;P&gt;Please check out: &lt;A href="https://www.dynatrace.com/support/help/shortlink/api-metrics-v2-selector#merge-transformation" target="_blank"&gt;https://www.dynatrace.com/support/help/shortlink/api-metrics-v2-selector#merge-transformation&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Nov 2021 20:25:03 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/API-V2-metrics-query-with-names-transformation-How-to-mask-the/m-p/175454#M607</guid>
      <dc:creator>AntonioSousa</dc:creator>
      <dc:date>2021-11-05T20:25:03Z</dc:date>
    </item>
  </channel>
</rss>

