Extension 2.0 - topology and screen issue

Hi All,

We have written the below extension 2.0 for oracle database where we are capturing custom metrices from the database by using queries. We are good with metrics and sqlOracle part in  below code but getting issue while creating the custom device for that extension and also we are getting screen for this particular custom extension but we were not able to add or not able to see the custom device with in that screen.

Please check the below code and guide us where we are lagging in the custom device creation and screen section.

Details:

name: custom:sql-oracle.db.extension
version: "0.0.4"
minDynatraceVersion: "1.295.0"
author:
  name: Mr.Champ
metrics:
  - key: sql-oracle.oracle.exacc.tablespace.check.freespace
    metadata:
      displayName: Tablespace check
      description: Tablespace free space in GB
      unit: GigaByte
      sourceEntityType: sql:sql-oracle_oracle_exacc
      dimensions:
      - key: device
        displayName: Device
      - key: device.address
        displayName: Device address
      - key: device.name
        displayName: Device name
      - key: device.port
        displayName: Device port
sqlOracle:
  - group: Tablespace check
    featureSet: tablespace check
    interval:
      minutes: 5
    query: >       
      SELECT 
          a.tablespace_name,
          SUM(a.bytes)/1024/1024/1024 AS Allocated,
          SUM(b.bytes)/1024/1024/1024 AS Freespace,
          ROUND(SUM(b.bytes)/SUM(a.bytes)*100) AS "% Free"
      FROM 
          dba_data_files a
      LEFT JOIN 
          dba_free_space b 
      ON 
          a.tablespace_name = b.tablespace_name
      WHERE 
          a.tablespace_name NOT LIKE '%TTS%'
      GROUP BY 
          a.tablespace_name
      ORDER BY 
          4
    metrics:
      - key: sql-oracle.oracle.exacc.tablespace.check.freespace
        value: col:Freespace
        type: gauge
    dimensions:
      - key: tablespace.check.percentage.free
        value: col:% Free
      - key: tablespace.check.tablespace_name
        value: col:tablespace_name
      - key: tablespace.check.allocated
        value: col:Allocated
topology:
  types:
    - name: sql:sql-oracle_oracle_exacc
      displayName: Oracle Exacc DB host
      enabled: true
      rules:
        - idPattern: sql_sql-oracle_{device.address}
          sources:
            - sourceType: Metrics
              condition: $prefix(custom:sql-oracle.db.extension)
          attributes:
            - pattern: '{device.address}'
              key: dt.ip_addresses
              displayName: IP Addresses
            - pattern: '{device.name}'
              key: dt.dns_names
              displayName: DNS names
          requiredDimensions: []
          instanceNamePattern: Oracle Exacc DB server on {device.address}        

screens:
  - entityType: sql:sql-oracle_oracle_exacc
    detailsSettings:
      staticContent:
        showProblems: true
        showProperties: true
        showTags: true
        showGlobalFilter: true
        showAddTag: true
      layout:
        autoGenerate: true

@Mike_L

Thank you.

Hi All,

Please check the below extension UI and link created for the same.

Link Created -

https://domain.com/e/environment_id/ui/entity/list/sql:sql-oracle_oracle_exacc?gtf=-2h&gf=all&sessionId=sessionid

Thank You.

Your metrics are not mapped to create the entity. You have stated this as your metric name:

sql-oracle.oracle.exacc.tablespace.check.freespace

While only metrics starting with this metric name will create the entity:

condition: $prefix(custom:sql-oracle.db.extension)