vMarkusK / Advanced-PRTG-Sensors

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

Answer not well-formed Error in PRTG #48

Closed andyrocktcom closed 4 years ago

andyrocktcom commented 4 years ago

The Connection works and the PowerShell get an XML answer, but prtg says it's not in the right form. Do you need an output with the -debug Parameter?

PRTG Network Monitor: 19.4.53.1912 x64 Sensor-Konfig: Programm/Skript: PSx64.exe Programm/Skript: -f="PRTG-VeeamBRStats.ps1"

Detailed Error: answer not well-formed: "( Successful-Backups 15 1 1 Warning-Backups 0 1 1 0 1 Failes-Backups 0 1 1 0 1 Failed-Backups 0 1 1 0 1 Running-Backups 0 1 1 TotalBackupRead 1138 Custom GB 1 1 TotalBackupTransfer 416 Custom GB 1 1 Successful-BackupCopys 0 1 1 Warning-BackupCopys 0 1 1 0 1 Failes-BackupCopys 0 1 1 0 1 Failed-BackupCopys 0 1 1 0 1 Running-BackupCopys 1 1 1 Idle-BackupCopys 0 1 1 Successful-Replications 0 1 1 Warning-Replications 0 1 1 0 1 Failes-Replications 0 1 1 0 1 Failed-Replications 0 1 1 0 1 Running-Replications 0 1 1 Successful-Endpoints 0 1 1 Warning-Endpoints 0 1 1 0 1 Failes-Endpoints 0 1 1 0 1 Running-Endpoints 0 1 1 REPO - Default Backup Repository 33 Percent 1 1 20 10 1 REPO - StoreOnce_SG_CIFS 33 Percent 1 1 20 10 1 REPO - VeeamConfigBackup 22 Percent 1 1 20 10 1 )" (Code: PE132)

vMarkusK commented 4 years ago

Do you see a well-formed XML when you execute the script outside of PRTG?

CMD: PSx64.exe -f="PRTG-VeeamBRStats.ps1" PS 64Bit: ./PRTG-VeeamBRStats.ps1 -Debug

If possible, please share both results.

andyrocktcom commented 4 years ago

Hi Markus

I don’t know which format the XML have to be. I’ve attached you booth outputs. I removed the hostname for privacy.

Best Regards Andreas

Successful-Backups 15 1 1 Warning-Backups 0 1 1 0 1 Failes-Backups 0 1 1 0 1 Failed-Backups 0 1 1 0 1 Running-Backups 0 1 1 TotalBackupRead 692 Custom GB 1 1 TotalBackupTransfer 257 Custom GB 1 1 Successful-BackupCopys 0 1 1 Warning-BackupCopys 0 1 1 0 1 Failes-BackupCopys 0 1 1 0 1 Failed-BackupCopys 0 1 1 0 1 Running-BackupCopys 1 1 1 Idle-BackupCopys 0 1 1 Successful-Replications 0 1 1 Warning-Replications 0 1 1 0 1 Failes-Replications 0 1 1 0 1 Failed-Replications 0 1 1 0 1 Running-Replications 0 1 1 Successful-Endpoints 0 1 1 Warning-Endpoints 0 1 1 0 1 Failes-Endpoints 0 1 1 0 1 Running-Endpoints 0 1 1 REPO - Default Backup Repository 53 Percent 1 1 20 10 1 REPO - StoreOnce_SG_CIFS 32 Percent 1 1 20 10 1 REPO - VeeamConfigBackup 22 Percent 1 1 20 10 1

DEBUG: Starting to Process Connection to HOSTNAME ...

Confirm Continue with this operation? [Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"): Y DEBUG: BRHost is Already Connected...

Confirm Continue with this operation? [Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"): Y

Successful-Backups 15 1 1 Warning-Backups 0 1 1 0 1 Failes-Backups 0 1 1 0 1 Failed-Backups 0 1 1 0 1 Running-Backups 0 1 1 TotalBackupRead 692 Custom GB 1 1 TotalBackupTransfer 257 Custom GB 1 1 Successful-BackupCopys 0 1 1 Warning-BackupCopys 0 1 1 0 1 Failes-BackupCopys 0 1 1 0 1 Failed-BackupCopys 0 1 1 0 1 Running-BackupCopys 1 1 1 Idle-BackupCopys 0 1 1 Successful-Replications 0 1 1 Warning-Replications 0 1 1 0 1 Failes-Replications 0 1 1 0 1 Failed-Replications 0 1 1 0 1 Running-Replications 0 1 1 Successful-Endpoints 0 1 1 Warning-Endpoints 0 1 1 0 1 Failes-Endpoints 0 1 1 0 1 Running-Endpoints 0 1 1 REPO - Default Backup Repository 53 Percent 1 1 20 10 1 REPO - StoreOnce_SG_CIFS 32 Percent 1 1 20 10 1 DEBUG: Veeam.Backup.Model.CBackupRepositoryInfo Confirm Continue with this operation? [Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"): Y DEBUG: Veeam.Backup.Model.CBackupRepositoryInfo Confirm Continue with this operation? [Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"): Y DEBUG: Veeam.Backup.Model.CBackupRepositoryInfo Confirm Continue with this operation? [Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"): Y REPO - VeeamConfigBackup 22 Percent 1 1 20 10 1

Repository Name Host Path Free (GB) Total (GB) Free (%) Status


Default Backup Repository HOSTNAME D:\Backup 19400.42 36886.88 53 OK
StoreOnce_SG_CIFS HOSTNAME \HOSTNAME\VeeamCopy 10077.70 31830.81 32 OK
VeeamConfigBackup HOSTNAME \HOSTNAME\Backup\Veeam 131.14 600.00 22 OK

Successful Backups : 15 Warning Backups : 0 Failes Backups : 0 Failed Backups : 0 Running Backups : 0 Total Backup Transfer : 257 Total Backup Read : 692 Warning BackupCopys : 0 Failes BackupCopys : 0 Failed BackupCopys : 0 Running BackupCopys : 1 Idle BackupCopys : 0 Successful Replications : 0 Warning Replications : 0 Failes Replications : 0 Failed Replications : 0 Running Replications : 0 Seccessful Endpoints : 0 Warning Endpoints : 0 Failes Endpoints : 0 Running Endpoints : 0

vMarkusK commented 4 years ago

The XML looks fine to me.

Do really use the EXEXML Sensor (https://www.paessler.com/manuals/prtg/exe_script_advanced_sensor) in PRTG?

andyrocktcom commented 4 years ago

This is very embarrassing for me. That was the mistake. I used a standard EXE sensor.

Sorry and thank you for the help. Now everything is working perfectly :-)

Freundliche Grüsse Andreas Stumpf