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

New Oracle Extensions in the V2 API - too long metricID string

louis_gallo
Helper

Hi DT Community,

 

I am playing with the new Oracle Extensions in the V2 API. 

 

In trying to translate the UI query into the API, the query from the UI for an Oracle query translated into the API creates an illegal CSV field with embedded commas.

 

API metricSelector string

 

com.dynatrace.extension.sql-oracle.cpu.(foregroundTotal,backgroundTotal):filter(and(in("dt.entity.sql:com_dynatrace_extension_sql-oracle_instance",entitySelector("type(sql:com_dynatrace_extension_sql-oracle_instance),tag(~"server:myserver~")"))))

 

API entitySelector

 

(none)

 

This creates a long metricID string which contains embedded commas in the CSV

 

metricId,device.address,dt.entity.sql:com_dynatrace_extension_sql-oracle_instance,dt.metrics.source,device.name,device.port,device,dt.entity.sql:com_dynatrace_extension_sql-oracle_host,time,value

"com.dynatrace.extension.sql-oracle.cpu.foregroundTotal:filter(and(in(""dt.entity.sql:com_dynatrace_extension_sql-oracle_instance"",entitySelector(""type(sql:com_dynatrace_extension_sql-oracle_instance),tag(~""server:myserver~"")""))))",10.x.x.x,CUSTOM_DEVICE-02E195837014A589,com.dynatrace.extension.sql-oracle,myserver.example.com,1600,myserver.example.com:1600/cometint.example.com,CUSTOM_DEVICE-6EA526731D5CF683,2022-07-25 14:15:00,1.8729698657989502

 

(Augh!!! - Look at the size of the metricID first column)

 

This one is a headbanger. I am getting fairly good with the DT API, but I cannot move (or figure out) how to move the entitySelector portion of the query into the API entitySelector field. Ideally, if the query could be split, it would eliminate the long metricID string and solve this problem.

 

Any help is appreciated.

 

Thanks,

 

Lou

1 REPLY 1

ChadTurner
DynaMight Legend
DynaMight Legend

@louis_gallo were you able to get a solution to this? if so could you share it with the community? 

-Chad