cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

CedM
Observer

Hello there, i have created an Activegate extension using SDK version 1.275. 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:

 

 

"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

2 REPLIES 2

JamesKitson
Dynatrace Guru
Dynatrace Guru

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?

{
   "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"
      }
   ]
}

CedM
Observer

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

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

 

Featured Posts