8000 Get-ObjectLog - Could not deserialize value · Issue #214 · lordmilko/PrtgAPI · GitHub
[go: up one dir, main page]

Skip to content

Get-ObjectLog - Could not deserialize value #214

@mup07

Description

@mup07

Bug description
We have problem while running the command "Get-ObjectLog". We get the error:

Get-ObjectLog : Could not deserialize value '406' as it is not a valid member of type 'PrtgAPI.LogStatus'. Could not process XML '<status>FTP Connection Mode</status><status_raw>406</status_raw><message><div 
class="logmessage">Connection established using implicit mode.<div class="moreicon"></div></div></message>'.
At line:1 char:1
+ Get-ObjectLog -StartDate $(get-date("13.04.2021 01:42:00")) -EndDate  ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-ObjectLog], XmlDeserializationException
    + FullyQualifiedErrorId : PrtgAPI.XmlDeserializationException,PrtgAPI.PowerShell.Cmdlets.GetObjectLog

Steps to reproduce
While the analysis, we could reproduce the error by filter the Logs to the specific sensor and datetime:

Get-ObjectLog -StartDate $(get-date("13.04.2021 01:42:00")) -EndDate $(get-date("11.04.2021 01:00:00")) -Object (Get-Sensor -Id 3561)

The sensor is a default type of FTP Sensor on PRTG:

DisplayLastValue   : 125 msec
LastValue          : 125
BaseType           : Sensor
Url                : /sensor.htm?id=3561
Interval           : 00:15:00
InheritInterval    : False
Access             : Inherited
Position           : 7
Status             : Up
Message            : OK (221 - Session Ended. Downloaded 0KB, Uploaded 0KB. Goodbye abc from x.x.x.x.)
Id                 : 3561
ParentId           : 3530
Tags               : {ftpsensor}
DisplayType        : FTP
Type               : Sensor (ftp)
Active             : True

We were able to limit this period to a single log entry. It is an entry with the status "FTP Connection Mode".
No such status name or status ID 406 (from the error message) is listed in the PRTG manuals.
(Source: PRTG Manual: Single Object Status)

What is the output of Get-PrtgClient -Diagnostic?

PSVersion      : 5.1.19041.906
PSEdition      : Desktop
OS             : Microsoft Windows 10 Pro
PrtgAPIVersion : 0.9.14
Culture        : de-CH
CLRVersion     : 528372
PrtgVersion    : 21.1.65.1767
PrtgLanguage   : Unknown

Can you reproduce this situation? Or exists already a solution for this?

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