Closed pyro3d closed 4 years ago
Hi @pyro3d,
Are you able to run the following commands and provide the output?
Set-PrtgClient -LogLevel All
Get-Device "*EX2300-%snip%*" | Get-Sensor "Status" | Get-Channel
Get-Device "*EX2300-%snip%*" | Get-Sensor "Status" | Get-Trigger -Type Threshold -Verbose
Please remove any sensitive information (e.g. server, username and passhash) from the response before posting it
PS /Users/%snip%> Set-PrtgClient -LogLevel All
PS /Users/%snip%> Get-Device "*EX2300-%snip%*" | Get-Sensor "Status" | Get-Channel
Name
SensorId Id LastValue LimitsEnabled UpperErrorLimit LowerErrorLimit ErrorLimitMessage
----
-------- -- --------- ------------- --------------- --------------- -----------------
RE Temperature 47108 2 48 °C False
RE CPU Usage 47108 3 20 % False
RE Memory Usage 47108 4 13 % False
FPC Temperature 47108 5 48 °C False
FPC CPU Usage 47108 6 20 % False
FPC Memory Usage 47108 7 13 % False
Yellow Alarms 47108 8 0 # True
Red Alarms 47108 9 0 # True 0
PS /Users/%snip%> Get-Device "*EX2300-%snip%*" | Get-Sensor "Status" | Get-Trigger -Type Threshold
Get-Trigger : Could not deserialize channel 'RE Temperature' of threshold trigger '1' of object ID '47108'. Object may be in a corrupted state. Please check the notification triggers of object ID 47108 in the PRTG UI.
At line:1 char:54
+ ... "*EX2300-%snip%*" | Get-Sensor "Status" | Get-Trigger -Type Threshold
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-NotificationTrigger], InvalidStateException
+ FullyQualifiedErrorId : PrtgAPI.InvalidStateException,PrtgAPI.PowerShell.Cmdlets.GetNotificationTrigger
I had forgotten to include the -Verbose
parameter in my original reply. The last command should be
Get-Device "*EX2300-%snip%*" | Get-Sensor "Status" | Get-Trigger -Type Threshold -Verbose
Saw your update just after I replied. :)
PS /Users/%snip%> Get-Device "*EX2300-%snip%*" | Get-Sensor "Status" | Get-Trigger -Type Threshold -Verbose
VERBOSE: Get-NotificationTrigger: Synchronously executing request https://%snip%/api/table.xml?id=47108&content=triggers&columns=content,objid&username=%snip%&passhash=%snip%
VERBOSE: Get-NotificationTrigger: <?xml version="1.0" encoding="UTF-8"?>
<triggers totalcount="1" listend="1">
<prtg-version>20.1.57.1745</prtg-version>
<item>
<content>{"type":"threshold","latency":"60","offnotificationid":"-1|None|","channel":"RE Temperature", "condition":"Above","threshold":"200","typename":"Threshold Trigger","onnotificationid":"35311|OpsGenie|http:HTTP","objectlink":"<a class=\"sensorid47108 sensg sensormenu isnotpaused isnotfavorite\" id=\"47108\" href=\"sensor.htm?id=47108\">Status</a>"}</content>
<objid>1</objid>
</item>
</triggers>
VERBOSE: Get-NotificationTrigger: Synchronously executing request https://%snip%/api/table.xml?content=objects&columns=objid,name,parentid,tags,type,active,basetype&count=*&filter_objid=47108&username=%snip%&passhash=%snip%
VERBOSE: Get-NotificationTrigger: <?xml version="1.0" encoding="UTF-8"?>
<objects totalcount="0" listend="1">
<prtg-version>20.1.57.1745</prtg-version>
</objects>
Get-Trigger : Could not deserialize channel 'RE Temperature' of threshold trigger '1' of object ID '47108'. Object may be in a corrupted state. Please check the notification triggers of object ID 47108 in the PRTG UI.
At line:1 char:54
+ ... %snip%*" | Get-Sensor "Status" | Get-Trigger -Type Threshold -Verbose
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-NotificationTrigger], InvalidStateException
+ FullyQualifiedErrorId : PrtgAPI.InvalidStateException,PrtgAPI.PowerShell.Cmdlets.GetNotificationTrigger
I have a very strong suspicion the issue is that you're running PRTG 20.1.57.1745
This
https://%snip%/api/table.xml?content=objects&columns=objid,name,parentid,tags,type,active,basetype&count=*&filter_objid=47108&username=%snip%&passhash=%snip%
<?xml version="1.0" encoding="UTF-8"?>
<objects totalcount="0" listend="1">
<prtg-version>20.1.57.1745</prtg-version>
</objects>
Should return something. There was an issue (#143 ) detected with PRTG 20.1.57.1745 where filtering by ID does not work anymore. Can you please update to 20.1.57.1786 and advise how it goes?
I'll get a MW together and update. Hopefully should be this week. Thanks for the catch!
Updated PRTG and that was the issue! Thanks for the help @lordmilko!
Describe the bug Clearly and concisely describe what you were trying to do, what happened and what you were expecting to happen Getting notification triggers on a SNMP Custom Sensor results in deserialization errors.
Steps to reproduce Put the relevant code from your application that caused the issue to happen in the code block below
What is the output of
Get-PrtgClient -Diagnostic
?Additional context
Occurs on both 0.9.12-RELEASE and the 0.9.13-PRERELEASE