What are you trying to do, and to what extent does PrtgAPI provide existing functionality around this?
I would like to get property Port/PortList of sensor types Port, Port Range for reports mainly. Or rather verification if everything is configured properly. In inventory I have the ports listed and want to programmatically check this port.
When invoking Get-Sensor -Type port -Count 1 | Get-ObjectProperty in returned processed object these properties are not available even though they are available in the HTML of request controls/objectdata.htm?id=2343&objecttype=sensor
Would be possible to add these properties to the object returned from Get-ObjectProperties?
I hope I did not overlooked some cmdlet or object, which could hold this property, but I believe it is not processed intentionally right now. portrange, port are not valid for Get-ObjectProperty -Property paramter
What are you trying to do, and to what extent does PrtgAPI provide existing functionality around this?
I would like to get property
Port
/PortList
of sensor typesPort
,Port Range
for reports mainly. Or rather verification if everything is configured properly. In inventory I have the ports listed and want to programmatically check this port.When invoking
Get-Sensor -Type port -Count 1 | Get-ObjectProperty
in returned processed object these properties are not available even though they are available in the HTML of requestcontrols/objectdata.htm?id=2343&objecttype=sensor
Would be possible to add these properties to the object returned from
Get-ObjectProperties
?I hope I did not overlooked some cmdlet or object, which could hold this property, but I believe it is not processed intentionally right now.
portrange
,port
are not valid forGet-ObjectProperty -Property
paramterThis is result of the object property gathering:
Get-ObjectProperty properties
```txt InheritAccess : True ParentTags : DebugMode : Url : HttpRequestMethod : PostData : UseCustomPostContent : PostContentType : UseSNIFromUrl : Timeout : 5 PingPacketSize : PingMode : PingCount : PingDelay : 0 AutoAcknowledge : PrimaryChannel : Open Ports GraphType : Independent ExeFile : ExeParameters : SetExeEnvironmentVariables : UseWindowsAuthentication : Mutex : WmiMode : Target : PingRemotePacketSize : ChannelDefinition : FactoryErrorMode : FactoryErrorFormula : FactoryMissingDataMode : StartStopped : NotifyChanged : False MonitorPerformance : ServiceName : Database : UseCustomInstance : InstanceName : SqlEncryptionMode : UseSqlInputParameter : SqlInputParameter : SqlTransactionMode : Name : Traefik Proxy (80, 443, 8080) Tags : {portrangesensor} Priority : Three InheritProxy : ProxyAddress : ProxyPort : ProxyUser : HasProxyPassword : False InheritInterval : True Interval : 00:01:00 IntervalErrorMode : OneWarningThenDown InheritDependency : True Schedule : None MaintenanceEnabled : False MaintenanceStart : 25/09/2021 12:19:00 MaintenanceEnd : 25/09/2021 12:20:00 DependencyType : Parent DependentObjectId : 0 DependencyDelay : 0 InheritChannelUnit : BandwidthVolumeUnit : BandwidthSpeedUnit : BandwidthTimeUnit : MemoryUsageUnit : DiskSizeUnit : FileSizeUnit : ```Port range HTML
```htmlPort HTML
```htmlIs this something that has some sort of parallel in the PRTG UI? If so where do you go/how do you normally do it?
Go to sensor settings and see it in Port/Port Range specific sensor settings.
PRTG info:
Due Dilligance
PrtgAPI defines a type safe wrapper around a limited subset of properties (as seen in the default output of
Get-ObjectProperty
)Properties not natively supported by PrtgAPI can be retrieved by specifying
Get-ObjectProperty -Raw
For more information please see the wiki