question

Julius L. avatar image
Julius L. asked ·

Displaying custom host metrics using plugin

I've created a custom oneagent plugin using the SDK sending host metrics. However I'm unable to display those metrics from custom plugin in the UI. Metrics are not displayed at the host level and also cannot be seen using when building custom chart or when defining custom alerts. However metric data sent by the plugin be successfully retrieved using timeseries REST APIs ( https://{id}.live.dynatrace.com/api/v1/timeseries ).

Also it does not matter if I specify the "ui" part in the plugin.json file or not. Am I doing something wrong or is dynatrace not able to display custom host metrics at the moment?

My plugin.json:

{
  "name": "custom.python.passwd_plugin",
  "version": "1.2",
  "type": "python",
  "entity": "HOST",
  "processTypeNames": ["LINUX_SYSTEM"],
  "source": {
    "package": "passwd_plugin",
    "className": "PasswdPlugin",
    "install_requires": [],
    "activation": "Singleton"
  },
  "metrics": [
    {
      "timeseries": {
        "key": "records",
        "unit": "Count"
      }
    },
    {
      "timeseries": {
        "key": "size",
        "unit": "Byte"
      }
    }
  ]
}

oneagentextensions
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Tarjei U. avatar image
Tarjei U. answered ·

Hi, what is the latest status here? Do we still need to use the debug flag?

3 comments Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

As far as I've been told this should be available very soon. Definitely this year.

0 Likes 0 · ·

Awesome, we are eagerly waiting for this.

0 Likes 0 · ·

This already seems to be working (at least with Dynatrace 177+, Oneagent 175+). You get additional host tile:

For plugin example, see my simple host session count plugin available at:
https://github.com/juliusloman/dynatrace-oneagent-plugin-hostsessioncount

1 Like 1 · ·
1572901965623.png (10.7 KiB)
Jakub M. avatar image
Jakub M. answered ·

Displaying metrics on host are not yet officially supported. Debug flag must be turned on in order to display host metrics on the UI. Please contact with your Dynatrace sales rep.

1 comment Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Could you tell me current status of this feature?
Is it needed to turn on the debug flag on latest version of OneAgent?
I'm trying to create an OneAgent plugin to display metrics on host.

0 Likes 0 · ·