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

Retrieve data in chunks using metric selector

manjunathcr22
Participant

Hi All,

https://xxxxxx.live.dynatrace.com/api/v2/metrics/query?metricSelector=builtin:host.cpu.load:names,builtin:service.dbconnections.failure:names&from=now-1m 

For above api call I am getting 2209 hosts data. 

{
    "totalCount"2209,
    "nextPageKey"null,
    "resolution""1m",...

While processing this data lot of memory is consumed. I want to retrieve data in chunks.

When I researched I found that pagination is not supported for above api call. 

Are there any way we can fetch data in chunks or pages?

Any other transformation we can use so that we can get filtered data based on specific dimension?Also here dimension key name changes based on metric.
builtin:service.dbconnections.failure:names for this sample dimensionMap is 
"dimensionMap": {
                        "dt.entity.service.name""compose",
                        "dt.entity.service""SERVICE-46FAA02DE48F5387"
                    }
For 
builtin:host.cpu.load:names the dimensionMap is 

"dimensionMap": {
                        "dt.entity.host.name""r54yq00006530.aq15.dal.ioc.abc.com",
                        "dt.entity.host""HOST-C44EBRA2E6E80542"
                    }
For how can we get filtered data based on any transformation?
Can filtering can be made generic independant of metric name?
2 REPLIES 2

MaciejNeumann
Community Team
Community Team

Hello @manjunathcr22,

 

As you can check in our Community User Guidelines, we discourage users from posting their Environment IDs in the public forums. It's always better to either post the code/API call or screenshot of it directly in the post 🙂 

If you have any questions about the Community, you can contact me at maciej.neumann@dynatrace.com

techean
Dynatrace Champion
Dynatrace Champion

Have you gone through this documentation of after delta transformation. Filter can be on attributes defendant on metric id

Metrics API - Metric selector | Dynatrace Docs

KG

Featured Posts