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

Seeking Assistance with Binding Custom Devices to a Custom Extension in Dynatrace

AK
Pro

Hello Folks,

I need your expert suggestions and help.

We have developed a custom extension using the "custom extension creator," and it works perfectly fine.

This extension is based on the out-of-the-box (OOB) extension for IBM LUW monitoring and includes the exact same endpoints as the OOB extension.

The OOB extension automatically creates its own custom devices, such as DB2 Host, DB2 Database Instances, DB2 Database Member, DB2 Tablespace

The idea is to bind these custom devices to my custom extension because their core or base functionalities are the same.

According to this thread, we can add topology in the YAML file. However, I am unable to determine what specific line of code to add under the topology section that would link the metrics/alerts created by my custom extension.

Has anyone successfully accomplished this? If so, could you please help?

Regards,
AK

 

3 REPLIES 3

AK
Pro

@Yosi_Neuman @Mike_L ,

Do you have any insights on this? I'm referring to your thread linked in this context.

- AK

ben_davidson
Dynatrace Helper
Dynatrace Helper

Our support document, Generic network topology is the best guide to understanding how Generic topology works. I'd also recommend, Define custom topology. A good understanding here will help you to guide what changes (if any) you need to make to the original extension's topology. The key concept to understanding is that generic topology uses the dimension values of your metrics to extract entities.

 

Here's an example from the extension you mentioned:

topology:
  types:
    - enabled: true
      name: sql:db2_host
      displayName: DB2 Host
      rules:
        - idPattern: db2_host_{device.address}
          instanceNamePattern: DB2 {device.address}
          iconPattern: host
          sources:
            - sourceType: Metrics
              condition: $prefix(db2)
          attributes:
            - pattern: '{device.address}'
              key: dt.ip_addresses
              displayName: IP Address
            - pattern: '{device.name}'
              key: Hostname
            - pattern: '{os_full_version}'
              key: OSFullVersion
              displayName: OS Full Version
            - key: dt.security_context
              displayName: Security Context
              pattern: '{dt.security_context}'

 

Here's an explanation of some of the key properties.

  • idPattern: Each DB2 device requires a unique ID. "db2_host_" + the device's  address ("device.address") will form a unique ID.
  • instanceNamePattern: The text, "DB2 " + the device's address. 
  • sources : condition: Where does this data come from? It comes from any metric prefixed with "db2".
  • attributes: The entity is assigned attributes that match the dimensions of the metric. The metric dimension, "device.name" produces an entity attribute named, "Hostname" and so on. 

If you have the OOTB extension added to your environment, this topology should already be present.  You can check this by going to Settings: topology model : Generic types. You can see all of your existing types here.

ben_davidson_0-1768941893427.png

If your custom extension, uses the same metric prefix ("db2") and the same dimension names, your extension will work along side the existing topology. If you have changed the metric prefix or dimension names, you have two options. 

First, are you sure the prefix and dimension names need to be different? If you can make them the same, the existing topology will work.

Second, if the your names and prefix need to be unique, you can copy the existing topology and modify the prefix and dimension names to your liking. You can even duplicate the topology within the UI and make your changes there. 

ben_davidson_1-1768942145000.png

 

This is useful for testing your changes before you commit them to your YAML extension definition. 

 

@ben_davidsonthank you for your brief response and useful insights.

Following the condition (metrics source that matches $prefix(db2)) specified in the topology model (Settings --> topology model --> Generic types), I updated the metric name to start with "db2." on the "Custom extension creator" page.

As a result, I was able to map the Davis anomaly detection problem/alert to the existing custom device/entity.

Thanks again.

Regards,
AK

Featured Posts