25 Jul 2022
04:45 PM
- last edited on
12 Dec 2022
12:05 PM
by
Ana_Kuzmenchuk
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
@louis_gallo were you able to get a solution to this? if so could you share it with the community?