Drelo
6 days agoNeophyte
Performance averages over time
Hi,
I’m currently looking for a way to get averages on certain data points & make that data via the API e.g. Average CPU busy per hour, per device.
I've played around with the following approaches but none of them are really what I'm after:
- Looping through datasources, getting devices & looping through instances via “/device/devices/{deviceId}/devicedatasources/{hdsId}/instances/{id}/data”. This approach is too cumbersome for the number of devices we have, combined with the other averages we want to pull.
- Creating a graph widget & getting the data via the /dashboard/widgets/{widgetId}/data endpoint. This would work if there wasn't a maximum of 100 devices in the widget & deviceIds were clearly linked the graph data.
- Generating a trend report & grabbing the link via /report/links/{reportId}. I haven't written this approach off yet but the available formats & the expiry on the generated link isn't ideal.
- Dynamic table data is great via the /dashboard/widgets/{widgetId}/data endpoint but I cannot work out a way create a datapoint that has an hourly average value. I'm not sure if it's possible to do something like grab the last x records for a datasource/datapoint on a device & present them in a different datasource/datapoint that could be used in a table widget or to set a custom property value on the device?