Hello dear Paessler Team
We are currently building some automation routines to produce custom report, while using the PRTG API. We are able to extract probes, groups, devices, sensors, & are able to query the API to generate the graphs.
However we are currently stuck on the following need. For a given group (or device), we would like to fetch the 3 most/least top values for a given type of sensor. For instance: - to get the 3 most bandwith consuming interfaces for a device - to get the 3 most CPU consuming devices for a group
Would you mind kindly guide us on how we can achieve that ?
Best Regards
Mathieu Boscher
Article Comments
Dear Paessler Team
Indeed, this is what we have done: - use the API to export historic data for a given period - then proceed with filtering & sorting using an external script. - & finally just the consider the X top sensors of a given type.
So, we finally achieve what we were looking for!
Thanks for your help.
Best regards
Mathieu Boscher
Jun, 2014 - Permalink
Hello,
I'm afraid this might not be easily possible. You can get a sorted table from the API for live values on sensors of a device or a group (and have this table filtered by sensor tag, which equivalents a sensor type).
But for historic data, i.e. reports, it's complicated. The API can only deliver historic data on a per-sensor-basis. So it would be necessary to move the logic (searching the Top 3 sensors) into the external script that accesses the API. And then request the historic data for all sensors of the group / device.
best regards.
Jun, 2014 - Permalink