8000 Response status code does not indicate success: 556 · Issue #280 · lordmilko/PrtgAPI · GitHub
[go: up one dir, main page]

Skip to content

Response status code does not indicate success: 556  #280

@bajayb4u

Description

@bajayb4u

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 75

What 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.lng

Additional 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssues that have been confirmed to be bugs in PrtgAPI and will be fixed in a future version

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0