I am trying to find the list of metrics applicable to specific entity and entity type such as specific host, application, process, service. `/metrics` api gives list of all metric ids:
But How do I find only the applicable metrics only to an entity or entity types, to, say `PROCESS_GROUP_INSTANCE` or `PROCESS-ABCDEFGHIJ123456`.
Solved! Go to Solution.
This is something I struggled with, too. IMO there is currently no straight forward method to achieve that. Might be a good candidate for an RFE.
As a workaround to retrieve all applicable metricId's for a certain entity type I guess one can query the full metric tree using
and then filter/extract each returned MetricDescriptor object according to the values present in the entityType array.
Hi @Enrico F. Great! I was able to extract the entity - metric. But I am not sure why I only see just 500 entries with `/api/v2/metrics?pageSize=5000&fields=entityType `.
However there are about 2000 metrics via
What am I missing?
Strange. In my case I'm getting >2000 entries when testing this on our managed instance. Maybe there are some additional restrictions for SaaS tenants on top of the already imposed request throttling but that would be unexpected.