<?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: Helping my plugin understand nested json... keys? in Extensions</title>
    <link>https://community.dynatrace.com/t5/Extensions/Helping-my-plugin-understand-nested-json-keys/m-p/165169#M1494</link>
    <description>&lt;P&gt;That worked, thanks muchly!&lt;/P&gt;</description>
    <pubDate>Thu, 29 Apr 2021 15:02:38 GMT</pubDate>
    <dc:creator>Brynatrace</dc:creator>
    <dc:date>2021-04-29T15:02:38Z</dc:date>
    <item>
      <title>Helping my plugin understand nested json... keys?</title>
      <link>https://community.dynatrace.com/t5/Extensions/Helping-my-plugin-understand-nested-json-keys/m-p/165161#M1492</link>
      <description>&lt;P&gt;Hi folks,&lt;BR /&gt;&lt;BR /&gt;I'm trying to get a plugin to understand some json that's formatted a bit differently than I have found in the demo files, and my best guesses are still causing an error:&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;Error: value must be convertable to float, got &amp;lt;class 'dict'&amp;gt; instead&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;It's difficult for me to figure out if it's the metric that's upset, or the&amp;nbsp;results_builder, etc. - has anyone set up something with this sort of nested json before:&lt;STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;My JSONreturns:&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;"exampleCount": {&lt;BR /&gt;"success": 6754,&lt;BR /&gt;"error": 348&lt;BR /&gt;},&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;And my best guesses have been:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;myplugin.py:&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;self.results_builder.absolute(key="exampleCount", value=stats['exampleCount'], dimensions={'success': 'error'}, entity_id=pgi_id)&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;plugin.json:&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;{&lt;BR /&gt;"timeseries": {&lt;BR /&gt;"key": "exampleCount",&lt;BR /&gt;"unit": "Count",&lt;BR /&gt;"displayname": "Example Count",&lt;BR /&gt;"dimensions": [&lt;BR /&gt;"success",&lt;BR /&gt;"error"&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;thanks all!&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 13:58:27 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/Helping-my-plugin-understand-nested-json-keys/m-p/165161#M1492</guid>
      <dc:creator>Brynatrace</dc:creator>
      <dc:date>2021-05-12T13:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: Helping my plugin understand nested json... keys?</title>
      <link>https://community.dynatrace.com/t5/Extensions/Helping-my-plugin-understand-nested-json-keys/m-p/165165#M1493</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Change the plugin.json to say:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"dimensions": [&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"status"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And in myplugin.py:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;self.results_builder.absolute(key="exampleCount", value=stats['exampleCount']['success'], dimensions={'status': 'success'}, entity_id=pgi_id)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;self.results_builder.absolute(key="exampleCount", value=stats['exampleCount']['error'], dimensions={'status': 'error'}, entity_id=pgi_id)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 14:20:46 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/Helping-my-plugin-understand-nested-json-keys/m-p/165165#M1493</guid>
      <dc:creator>Mike_L</dc:creator>
      <dc:date>2021-04-29T14:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: Helping my plugin understand nested json... keys?</title>
      <link>https://community.dynatrace.com/t5/Extensions/Helping-my-plugin-understand-nested-json-keys/m-p/165169#M1494</link>
      <description>&lt;P&gt;That worked, thanks muchly!&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 15:02:38 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/Helping-my-plugin-understand-nested-json-keys/m-p/165169#M1494</guid>
      <dc:creator>Brynatrace</dc:creator>
      <dc:date>2021-04-29T15:02:38Z</dc:date>
    </item>
  </channel>
</rss>

