Obtaining only specific metric data
Hi All,
I'm using https://<COMPANY>.logicmonitor.com/santaba/rest/device/devices/<DEVICE_ID>/devicedatasources/<DATASOURCE_ID>/instances/<INSTANCE_ID>/data?filter=period=1 but am getting a lot of metrics I don't need data for.
Is there a way to specify which metrics you want to export, e.g. below?
https://<COMPANY>.logicmonitor.com/santaba/rest/device/devices/<DEVICE_ID>/devicedatasources/<DATASOURCE_ID>/instances/<INSTANCE_ID>/data?filter=period=1&fields=InInterfaceSpeed,InMbps,InUtilizationPercent,OutInterfaceSpeed,OutMbps,OutUtilizationPercent
Perhaps there is another way to do this?
Thanks,
Frank
Frank_Tonjes
3 comments
David Bond
...and it turns out that this IS now possible.
See this community post:
https://community.logicmonitor.com/archive-13/getting-datapoint-data-via-rest-api-1249...and in particular @Sarah Terry’s reply, indicating that it is now possible to specify the “dataPoints” parameter. See documentation here:
https://www.logicmonitor.com/support/rest-api-developers-guide/v1/data/get-data
David Bond
This is a performance issue.
We want to:
Until we can specify which datapoints are returned, we have no way of doing this.
We have the same problem getting graph data using the graphId of -1. We have to retrieve ALL data (sometimes dozens of time series graph lines with ~900 datapoints each), whereas what we really need is ONE line.
LM User
No way to do that as far as I know. The 'fields' parameter could be 'dataPoints', but i don't think there's a way to filter it before fetching it. You would need to filter after fetching. Are you concerned with performance or is it difficult to filter after fetching?