-
-
Notifications
You must be signed in to change notification settings - Fork 42
Closed
Labels
bugIssues that have been confirmed to be bugs in PrtgAPI and will be fixed in a future versionIssues that have been confirmed to be bugs in PrtgAPI and will be fixed in a future version
Description
Describe the bug
Hello,
Using PrtgAPI module v0.9.17, I am trying to add devices and sensors. No issues when adding device but only with add-sensors throwing this error. This error is not consistent even on the same device when added multiple times. Though most of times script is throwing this error sometimes it is working just fine.
Error:
Failed CMD Line: $getDevice | Add-Sensor $sensorparams
Error message: Response status code does not indicate success: 556 (Unknown Response Code).
Steps to reproduce
$PRTGGroupID = <PRTGGroupID>
$deviceName = <deviceName>
$ServerIP = <ServerIP>
Connect-PrtgServer $prtgURL (New-Credential $prtgUserName $prtgPass)
$addDevice = Get-Group -id $PRTGGroupID | Add-Device -Name $deviceName -Host $ServerIP
$addDeviceId = $addDevice.Id
$getDevice = Get-Device -Id $addDeviceId
$SatSensor = "snmpcpu"
$sensorparams = $getDevice | New-SensorParameters -RawType $SatSensor
$cpusensor = $getDevice | Add-Sensor $sensorparams
$cpuchannel = Get-Channel -Sensor $cpusensor
$cputotal = $cpuchannel | Where {$_.Name -eq "Total"}
Set-ChannelProperty -Channel $cputotal -Property UpperErrorLimit -Value 90
Set-ChannelProperty -Channel $cputotal -Property UpperWarningLimit -Value 75What is the output of 'Get-PrtgClient -Diagnostic'?
PSVersion : 5.1.14393.4583
PSEdition : Desktop
OS : Microsoft Windows Server 2016 Standard
PrtgAPIVersion : 0.9.17
Culture : en-US
CLRVersion : .NET Framework 4.7.2 (461814)
PrtgVersion : 22.1.74.1869
PrtgLanguage : english.lngAdditional context
Above sample code has only snmpcpu sensor in it but we are also encountering same with ping and other SNMP sensors. Please let me know if I can provide any further information. Thanks for the help!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugIssues that have been confirmed to be bugs in PrtgAPI and will be fixed in a future versionIssues that have been confirmed to be bugs in PrtgAPI and will be fixed in a future version