Jannos-443/PRTG-DataCore

"XML: The returned XML does not match the expected schema. (code: PE233) -- JSON: The returned JSON does not match the expected structure (invalid JSON). (code:PE231)"

tsc-ham opened this issue · 13 comments

Hello Jannos, we came across your scripts while looking for a DataCore / PRTG integration and would love to use them. Unfortunately, we get the following error message back when we include this in PRTG as a sensor:

"XML: The returned XML does not match the expected schema. (code: PE233) -- JSON: The returned JSON does not match the expected structure (invalid JSON). (code:PE231)"

Do you have any idea what could be wrong here?

Hey, could you send me the sensor log (full text file would be the best) from prtg and the powershell output if you run it directly in powershell?

Hi, here the PowerShell output from PRTG-DataCore.ps1:

<prtg><result>
        <channel>Error Count</channel>
        <value>0</value>
        <unit>Count</unit>
        <limitmode>1</limitmode>
        <LimitMaxError>0</LimitMaxError>
        </result>
        <result>
        <channel>Warning Count</channel>
        <value>0</value>
        <unit>Count</unit>
        <limitmode>1</limitmode>
        <LimitMaxWarning>0</LimitMaxWarning>
        </result><text>No Alerts found</text></prtg>

PRTG output is attached

Result of Sensor 12138.Data.txt

Powershell output looks good, could you also upload the "Result of Sensor xxxxx.txt" from the sensor

the sensor result is attached to the same comment above

I can only see the result data file, there should also be one file with just result in the name.

There was a file created with the name "Result of Sensor 12138.txt" without any content

Could you please download the latest Version and check again? The should be output in the "Result of Sensor xxx.txt"

We have tested the new script. When executed manually via PowerShell, it works. When running it via PRTG we get an error message regarding the signature of the script.

I attach the results as a text file.

Result of Sensor 12160.txt
Result of Sensor 12160.Data.txt
manualusage.txt

We were able to solve the problem with script signing.There are different settings for script execution for 32bit and 64bit Powershell.

Unfortunately, it doesn't quite work with the query yet. We have created a new sensor and included the script.

With the parameter "DcsStatus" four channels are filled with data. The rest remain empty.

The empty channels show the following error message: "At least one channel uses a lookup that is not available or could not be loaded."

If you want to take another look, here are the logs:

PRTG-four-sensors-filled
ps_log.txt
Result of Sensor 12567.Data.txt
Result of Sensor 12567.txt

oh that is my bad, I forgot to add the lookup files to Github.
Please look in the readme again, I added step 6/7 "lookup Files"

The DataCore connection now works properly. Thanks for the support with the integration of your scripts and in general for the great work you provide for free.

thanks for the great feedback :)
Any suggestions to improve the sensor are welcome. (or for new Sensors)