You can export the channel settings of the sensors you're interested in to a CSV via PrtgAPI, which you can then format nicely in Excel
Get-Sensor *cpu* | Get-Channel | Export-Csv C:\channelLimits.csv -NoType
This will give you all of the properties of the channel, including the sensor ID (but not the sensor name)
If you want to include the sensor name in the table, you can add it via Select-Object
$sensors = get-sensor *cpu*
$sensors|foreach {
$s = $_
$s|Get-Channel|select @{l="SensorName";e={$s.Name}},SensorId,Name,Id,*limit*
}|Export-Csv C:\channelLimits.csv -NoType
Which will yield something like this
SensorName SensorId Name Id LimitsEnabled UpperErrorLimit UpperWarningLimit LowerErrorLimit LowerWarningLimit ErrorLimitMessage
---------- -------- ---- -- ------------- --------------- ----------------- --------------- ----------------- -----------------
CPU Load 2834 Total 0 True 90
CPU Load 2834 Processor 1 1 False
CPU Load 2834 Processor 2 2 False
CPU Load 2800 Total 0 True 90
CPU Load 2800 Processor 1 1 False
CPU Load 2800 Processor 2 2 False
CPU Load 2864 Total 0 True 90
If you wish to generate a report on the dependencies of a sensor and are willing to put a little bit of work in, you can achieve this by analyzing the DependencyType and DependentObjectId properties of the SensorSettings object returned by Get-ObjectProperty
C:\> Get-Device dc-1 | Get-Sensor | Get-ObjectProperty | group DependencyType
Count Name Group
----- ---- -----
25 Parent {Remote Ping, Ping, Custom EXE/Script Sensor, HTTP (Up Sensor)...}
1 MasterObject {Ping}
1 Object {Pagefile Usage (Dependency Sensor)}
For each object with an "Object" dependency, you could iterate over each element in this group and resolve the object (assuming it points to a sensor) via Get-Sensor -Id <id>
For more information on retrieving channel details from PRTG, see the wiki
Add comment