# ActiveGate extension upload error: UI keyMetrics section: key refers to a non-existent timeseries

**URL:** <https://community.dynatrace.com/t/activegate-extension-upload-error-ui-keymetrics-section-key-refers-to-a-non-existent-timeseries/42349>\
**Category:** Extensions\
**Tags:** extensions\
**Created:** [October 30, 2023, 11:56am UTC](https://community.dynatrace.com/t/activegate-extension-upload-error-ui-keymetrics-section-key-refers-to-a-non-existent-timeseries/42349 "2023-10-30T11:56:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CedM](https://avatars.discourse-cdn.com/v4/letter/c/e47c2d/32.png) [@CedM](https://community.dynatrace.com/u/CedM)\
**Post date:** [October 30, 2023, 11:56am UTC](https://community.dynatrace.com/t/activegate-extension-upload-error-ui-keymetrics-section-key-refers-to-a-non-existent-timeseries/42349/1 "2023-10-30T11:56:43Z")

</div>

Hello there, i have created an Activegate extension using SDK version 1.275.&nbsp;when executing the `verify_plugin` command, no issue is reported and the `simulate_plugin` does not give errors either. issue is when I’m trying to upload the extension, I’m getting following error: `UI keyMetrics section: key refers to a non-existent timeseries (sendgrid.delivered)`

Below sample of my `plugin.json` file built using [Extension JSON explained | Dynatrace Docs](https://docs.dynatrace.com/docs/extend-dynatrace/extensions/reference/json-reference/extension-json-explained):

```markup
"ui": {
        "keymetrics": [
            {
                "key": "sendgrid.delivered",
                "aggregation": "max",
                "mergeaggregation": "sum",
                "displayname": "Delivered emails"
            }
        ],
        "keycharts": [
            {
                "group": "API status",
                "title": "State",
                "series": [
                    {
                        "key": "sendgrid.api.connection",
                        "displayname": "SendGrid API Connection Status",
                        "seriestype": "bar",
                        "statecolors": ["#ff3333", "#ffd633", "#00b33c"],
                        "statechart": true
                    }
                ]
            },
            {
                "group": "SendGrid",
                "title": "Delivered emails",
                "series": [
                    {
                        "key": "sendgrid.delivered",
                        "displayname": "Delivered emails",
                        "seriestype": "line",
                        "statecolors": ["#ff3333"],
                        "statechart": true
                    }
                ]
            }
	],
        "charts": [
            {
                "group": "SendGrid",
                "title": "Delivered emails",
                "series": [
                    {
                        "key": "sendgrid.delivered",
                        "displayname": "Delivered emails",
                        "seriestype": "line",
                        "color": "#74cff7",
                        "metricexplanation": "The number of emails SendGrid was able to confirm were actually delivered to a recipient."
                    }
                ]
            }
        ]
    },
    "metrics": [
        { "statetimeseries": {
                    "key": "sendgrid.api.connection",
                    "states": ["DOWNTIME", "MAINTENANCE", "WORKING"],
                    "displayname": "Sendgrid API Connection"
                   },
                    "entity": "CUSTOM_DEVICE"
            },
            {
                "timeseries": {
                    "key": "sendgrid.delivered",
                    "unit": "Count",
                    "displayname": "Delivered emails",
                    "aggregation": "SUM"
                },
                "entity": "CUSTOM_DEVICE"
            }
    ],

```

Thanks for your help.

Regards,  
Cedric

---

<div class="post-metadata">

**Author:** ![JamesKitson](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/jameskitson/32/22460_2.png) [@JamesKitson](https://community.dynatrace.com/u/JamesKitson)\
**Post date:** [October 31, 2023, 2:50pm UTC](https://community.dynatrace.com/t/activegate-extension-upload-error-ui-keymetrics-section-key-refers-to-a-non-existent-timeseries/42349/2 "2023-10-31T14:50:49Z")

</div>

I tried recreating this using your snippets in a full plugin.json file but I am not getting any errors. See below which uploads without any validation errors.

Could you share your full plugin.json file?

```markup
{
   "name":"custom.remote.python.example",
   "version":"1.19",
   "productiveMinVersion":"1.000",
   "type":"python",
   "entity":"CUSTOM_DEVICE",
   "metricGroup":"tech.Example_Service",
   "technologies":[
      "EXAMPLE_SERVICE"
   ],
   "source":{
      "package":"demo_activegate_plugin_multi",
      "className":"RemoteExamplePlugin",
      "install_requires":[
         "requests>=2.6.0"
      ],
      "activation":"Remote"
   },
   "ui":{
      "keymetrics":[
         {
            "key":"sendgrid.delivered",
            "aggregation":"max",
            "mergeaggregation":"sum",
            "displayname":"Delivered emails"
         }
      ]
   },
   "metrics":[
      {
         "timeseries":{
            "key":"sendgrid.delivered",
            "unit":"Count",
            "displayname":"Delivered emails",
            "aggregation":"SUM"
         },
         "entity":"CUSTOM_DEVICE"
      }
   ],
   "properties":[
      {
         "key":"url",
         "type":"String"
      }
   ]
}

```

---

<div class="post-metadata">

**Author:** ![CedM](https://avatars.discourse-cdn.com/v4/letter/c/e47c2d/32.png) [@CedM](https://community.dynatrace.com/u/CedM)\
**Post date:** [November 3, 2023, 8:07am UTC](https://community.dynatrace.com/t/activegate-extension-upload-error-ui-keymetrics-section-key-refers-to-a-non-existent-timeseries/42349/3 "2023-11-03T08:07:25Z")

</div>

Hello,&nbsp;  
I’ve finally found where the issue was. And sorry for now posting the complete code.&nbsp;  
In the keychar section, sendgrid.delivery key had some properties that are used for statetimeseries following a copy/paste.  
After changing&nbsp;statecolorsto colorand removing&nbsp;statechartproperties, i was able to upload the plugin.  
Marking this post as resolved.

```auto
 {
                "group": "SendGrid",
                "title": "Delivered emails",
                "series": [
                    {
                        "key": "sendgrid.delivered",
                        "displayname": "Delivered emails",
                        "seriestype": "line",
                        "statecolors": ["#ff3333"],
                        "statechart": true
                    }
                ]
            }

```
