vMarkusK / Advanced-PRTG-Sensors

Collection of my Advanced PRTG Sensors
https://mycloudrevolution.com/
Apache License 2.0
67 stars 29 forks source link

XML: Structural erro in xml file, 3 open items - Veeam BR - 10.0.1.4854 #66

Closed AndreasDirni closed 3 years ago

AndreasDirni commented 3 years ago

Hello Markus,

this is the first time I tried to implement your script and I spend several hours without success. Maybe you have some suggestions for me?

Probe: Windows Server 2019 Ver. 1809 - PS Version 5.1 Build 17763 Rev. 1007 Veeam BR Console 10.0.1.4854

Veeam Server: Windows Server 2016 Ver. 1607 - PS Version 5.1 Build 14393 Rev. 3866 Veeam BR Console 10.0.1.4854

I also tried to start the script with .\PSx64.exe -f="PRTG-VeeamBRStats.ps1" -p="veeamserver" and it is working fine. But when i try to implement the script in PRTG i receive the error:

XML: Structural error in xml file, 3 open items. -- JSON: The returned JSON does not match the expected structure (Invalid JSON.). (code: PE231)

I saw the other closed issues with the same problem as mine, and I tried the suggestions, but it doesn´t work for me. Now I do not have another idea to solve the issue.

Thanks for your help. Kind regards, Andreas

AndreasDirni commented 3 years ago

Additional Information:

Hope this helps do find a solution.

Kind regards, Andreas

vMarkusK commented 3 years ago

Hello @AndreasDirni ,

have you used the same use for your manual execution as the Probe uses? Have you checked the logs of the Sensor for more details (Check https://www.paessler.com/manuals/prtg/exe_script_advanced_sensor -> "EXE Result" for more details)? Do you have Repositories with special characters that night break the XML Structure?

Kind regards, Markus

AndreasDirni commented 3 years ago

Hello @vMarkusK ,

thanks for the quick response.

I disabled "inherite from" and used the same account as I use for the logon to VeeamServer and VeeamBR (s_veeam). This user is also in the DomainAdmin group.

image

So I checked the logs and saw an error regarding the logon to our VeeamServer.

image

It says that the user PRTGServer$ is not able to logon to our VeeamServer. PRTGServer is the name of our PRTG Server :-), so no idea why it is trying to use this "user" instead of s_veeam. Nevertheless, I put the PRTGServer to the local admin group of VeeamServer, but without success.

image

I also tried to use the IP of the VeeamServer instead of the Servername, but without success.

Unfortunately we do not use a special repository. We have two, an local repository on the server and an repository on a QNAP. And unfortunately, this error is comming up immediately when I try to configure the sensor, and not after a periode of time.

Any suggestion? I think the problem is, that the connection from PRTGServer to VeeamServer cannot be established maybe because of wrong username / credentials, but no idea how to solve.

Kind regards for your help, Andreas

AndreasDirni commented 3 years ago

Hello @vMarkusK ,

I installed the PRTG Probe also on the Veeamserver and stop the inherit from parant and testet the script. Unfortunately it is not working and I do not know why.

As you can see in the log he cannot access the Veeamserver with user "DESPM006$". DESPM006 is the name of our Veeamserver and I do not understand why he is using this "user", because this is not a user, this is the Servername with an $ at the end,...

image

Any suggestions? I would be very grateful for help.

Kind regards

vMarkusK commented 3 years ago

The solution might be starting the probe service as this user.

AndreasDirni commented 3 years ago

Hello @vMarkusK ,

I do not understand. On the VeeamServer. With which user should I start the ProbeService?

With the user from the VeemServer? Than it is already configured, or as the PRTGServer User?

image

Kind regards, Andreas

vMarkusK commented 3 years ago

As your service account (s_veeam).

But please note: using domain Admin privileges for your backup software service account is not the most secure configuration.

AndreasDirni commented 3 years ago

Unfortunately that wasn´t the solution:

image

I think I give up :-(

vMarkusK commented 3 years ago

This solution worked for a lot of other users:

AndreasDirni commented 3 years ago

Hello Markus,

you can close the incident. I wrote a script, who starts the PowerShell and save the result in a TXT file. After that I sceduled it via the Taskplaner, so the script can run with admin privilages every 5 minutes.

Then I wrote a program who imports the information of the TXT file in PRTG and so it works :-)

Kind regards, Andreas

vMarkusK commented 3 years ago

Sounds weird. But if it solves the problem, that's fine.