Hi, Is there a way to export a sensor list with limits for each sensor? I Have hundreds of temperature sensor and I'd Like to know the limits (warning/error).
Table looks Like
Sensor ID - Name - Warning (limit) - Error (limit) |
Thank You
Hi, Is there a way to export a sensor list with limits for each sensor? I Have hundreds of temperature sensor and I'd Like to know the limits (warning/error).
Table looks Like
Sensor ID - Name - Warning (limit) - Error (limit) |
Thank You
Or, if you prefer a User Interface you can use...
PTF ChannelLimits is an application that allows you to get an overview of the channel limits of your sensors.
Check your Sensor Limits
Have you ever wondered if you have set and activated the correct threshold limits for all your temperature or disk space sensors? Stop wondering; using this tool, you will get an immediate overview!
The tool can be downloaded from the PRTGToolsFamily website here.
Created on Aug 20, 2015 12:07:50 PM by
PRTG Tools Family [prtgtoolsfamily.com]
(13,413)
●3
●4
8 Replies
Thank you
but it's not my case. I know about the export of the sensor, but now I would like to export in fact a part of the 'configuration' of the sensors, like the limits (warning, error) configured on each.
it there a way? I now about csvexport and api, but I didn't read anything about my problem
regards
The following will also show it in a Gridview which allows you to filter:
param( $prtgProtocol = "http", # http or https $prtghost = "prtg.acme.com", # the hostname, e.g. prtg.acme.com $prtgPort = 80, # the port used by PRTG $prtgUser = "prtgadmin", # the username $prtgPasshash = 123456789 # the user's passhash ) $Sensors = ((Invoke-WebRequest -URI "$($prtgProtocol)://$($prtghost):$($prtgPort)/api/table.json?content=sensors&output=json&columns=objid,device,sensor&username=$($prtgUser)&passhash=$($prtgPasshash)").Content | ConvertFrom-Json) $Devices = ((Invoke-WebRequest -URI "$($prtgProtocol)://$($prtghost):$($prtgPort)/api/table.json?content=devices&output=json&columns=objid,device&username=$($prtgUser)&passhash=$($prtgPasshash)").Content | ConvertFrom-Json) $List = @(); $List.Clear(); Foreach($Device in $Devices.devices){ $Sensors = ((Invoke-WebRequest -URI "$($prtgProtocol)://$($prtghost):$($prtgPort)/api/table.json?content=sensors&output=json&id=$($Device.objid)&columns=objid,device,sensor&username=$($prtgUser)&passhash=$($prtgPasshash)").Content | ConvertFrom-Json) Foreach($Sensor in $Sensors.sensors){ $Channels = ((Invoke-WebRequest -URI "$($prtgProtocol)://$($prtghost):$($prtgPort)/api/table.json?content=channels&output=json&columns=name,lastvalue_,objid&id=$($sensor.objid)&username=$($prtgUser)&passhash=$($prtgPasshash)").Content | ConvertFrom-Json); Foreach($Channel in $Channels.channels){ $ChannelSettings = (Invoke-WebRequest -Uri "$($prtgProtocol)://$($prtghost):$($prtgPort)/controls/channeledit.htm?_hjax=true&id=$($Sensor.objid)&channel=$($Channel.objid)&username=$($prtgUser)&passhash=$($prtgPasshash)"); if(($channel.objid -eq -4) -or $Channel.name -eq "Execution Time"){ continue;} $ChannelUnit = $ChannelSettings.InputFields.FindById("customunit_$($Channel.objid)").Value #$ChannelUnit = $ChannelSettings.InputFields.FindById("unit_$($Channel.objid)").Value [pscustomObject]$sensorItem = New-Object -TypeName psobject; $sensorItem | Add-Member -MemberType NoteProperty -Name "Object ID" -Value $Device.objid $sensorItem | Add-Member -MemberType NoteProperty -Name "Device" -Value $Device.device $sensorItem | Add-Member -MemberType NoteProperty -Name "Sensor ID" -Value $Sensor.objid $sensorItem | Add-Member -MemberType NoteProperty -Name "Sensor" -Value $Sensor.sensor $sensorItem | Add-Member -MemberType NoteProperty -Name "Channel ID" -Value $Channel.objid $sensorItem | Add-Member -MemberType NoteProperty -Name "Channel Name" -Value $Channel.name $sensorItem | Add-Member -MemberType NoteProperty -Name "Lower Warning Limit" -Value $ChannelSettings.InputFields.FindById("limitminwarning_$($Channel.objid)").value $sensorItem | Add-Member -MemberType NoteProperty -Name "Lower Error Limit" -Value $ChannelSettings.InputFields.FindById("limitminerror_$($Channel.objid)").value $sensorItem | Add-Member -MemberType NoteProperty -Name "Upper Warning Limit" -Value $ChannelSettings.InputFields.FindById("limitmaxwarning_$($Channel.objid)").value $sensorItem | Add-Member -MemberType NoteProperty -Name "Upper Error Limit" -Value $ChannelSettings.InputFields.FindById("limitmaxerror_$($Channel.objid)").value $sensorItem | Add-Member -MemberType NoteProperty -Name "Unit" -Value $($ChannelUnit) $List += $sensorItem } } } $List | Out-GridView -Title "PRTG | Sensor Thresholds"
Created on Aug 17, 2015 1:55:54 PM by
Stephan Linke [Paessler Support]
Last change on Jul 27, 2017 8:51:22 AM by
Stephan Linke [Paessler Support]
Or, if you prefer a User Interface you can use...
PTF ChannelLimits is an application that allows you to get an overview of the channel limits of your sensors.
Check your Sensor Limits
Have you ever wondered if you have set and activated the correct threshold limits for all your temperature or disk space sensors? Stop wondering; using this tool, you will get an immediate overview!
The tool can be downloaded from the PRTGToolsFamily website here.
Created on Aug 20, 2015 12:07:50 PM by
PRTG Tools Family [prtgtoolsfamily.com]
(13,413)
●3
●4
Hi, I used the Get-Limits.ps1 script from - http://pastebin.com/f1Q6hs3E - very successfully. The only limitation is those sensors (eg the WMI Disk Free sensor) which hold limits on the sensor settings rather than in the channel settings. Paessler are telling me there is no way to get hold of those property names yet. Has anyone found a way to access them? Mark
Value | Query |
---|---|
Lower Warning Percent | api/getobjectproperty.htm?id=<id>&name=lowerlimitwarningpct |
Lower Error Percent | api/getobjectproperty.htm?id=<id>&name=lowerlimiterrorpct |
Upper Warning Percent | api/getobjectproperty.htm?id=<id>&name=upperlimitwarningpct |
Upper Error Percent | api/getobjectproperty.htm?id=<id>&name=upperlimiterrorpct |
Note This works only for sensors that have limits configured in their sensor settings. Channel limit settings cannot be read with that.
Created on Mar 8, 2017 7:59:36 AM by
Stephan Linke [Paessler Support]
Last change on May 14, 2018 8:47:07 AM by
Stephan Linke [Paessler Support]
Hi there,
this doesn't seem to work anymore in 22.2.77.2204+.
(Invoke-WebRequest -Uri "$($prtgProtocol)://$($prtghost):$($prtgPort)/controls/channeledit.htm?_hjax=true&id=$($Sensor.objid)&channel=$($Channel.objid)&username=$($prtgUser)&passhash=$($prtgPasshash)");
doesn't seem to yield something that can be interpreted as XML or JSON and ist html instead. Is there an API option to yield the channel limit settings as a JSON object?
You can change the output format of the API call; have a look here
Please log in or register to enter your reply.
©2023 Paessler AG Terms & Conditions Privacy Policy Legal Notice Download & Install
Add comment