LockstepGroup / prtgshell

PowerShell module for PRTG
MIT License
18 stars 10 forks source link

How Get-PrtgSensorHistoricData should operate #3

Open sandersjds opened 11 years ago

sandersjds commented 11 years ago

This cmdlet operates against the historicdata.xml API call, which takes the following input options:

As well as a pair of graph-generation options that we're going to ignore. As of right now, in order to simplify the parameters, I've made one of the input parameters "HistoryInDays" which simply converts an integer value (i.e., 2) into a negative timespan starting from now and going back that many days.

It would be nice if the cmdlet could use this simplified format as well as a more fine-grained input format.

The current output of the cmdlet only returns a list of data with a header of the specified channel name.

Hit list for fixes

That last item (building the array of objects) is going to require some XSLT/XML gymnastics.

The interim goal as a use model for this cmdlet is for the History Database Monitor sensor to have an option that allows it to query the API (against itself) to report how long the database can be allowed to grow (given current space and growth numbers) without filling the disk containing the database.

sandersjds commented 11 years ago

Example output data from this command: https://dl.dropboxusercontent.com/u/1577258/hist.xml Search for "41455.9965277778" to find representative coverage data.