vMarkusK / Advanced-PRTG-Sensors

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

Strange error while running the script #60

Closed Gyslainh closed 2 years ago

Gyslainh commented 4 years ago

C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXEXML\Veeam.ps1 : Cannot convert the "System.Object[]" value of type "System.Object[]" to type "System.Guid". At line:1 char:1

C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXEXML\Veeam.ps1 : at , C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXEXML\Veeam.ps1: line 532 at , : line 1 At line:1 char:1

That happens in PRTG and if i run the script manually

vMarkusK commented 4 years ago

Hi @Gyslainh ,

I have a few questions:

Gyslainh commented 4 years ago

Hi yes I used the latest version I’ll check again to be sure

As for now it’s veeam 9.5u4B We have multiple clients on PRTG this is the only one that doesn’t seem to work

Ps does your script works with veeam 10?


De : Markus Kraus notifications@github.com Envoyé : mardi, juillet 14, 2020 5:07 a.m. À : vMarkusK/Advanced-PRTG-Sensors Cc : Gyslainh; Mention Objet : Re: [vMarkusK/Advanced-PRTG-Sensors] Strange error while running the script (#60)

Hi @Gyslainhhttps://github.com/Gyslainh ,

I have a few questions:

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/vMarkusK/Advanced-PRTG-Sensors/issues/60#issuecomment-657691222, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQEOEEWVW6IJPE273EP7SK3R3NACHANCNFSM4OYREMTQ.

Gyslainh commented 4 years ago

Getting this with the new script

At C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXEXML\Veeam.ps1:329 char:21

Gyslain Hamel Administrateur de Système/System Administrator

[cid:image001.png@01D2BDDA.DCDB3780]

[cid:image003.png@01D5AE7A.E31E6200]https://www.canadianbusiness.com/lists-and-rankings/growth-500/2019-information-technology-fastest-growing-companies/

www.equipemicrofix.comhttp://www.equipemicrofix.com/ Bureau/Office: 514-394-0780 Sans-Frais/Toll-Free: 1-855-305-9939 Fax: 450-933-6229

[mcsa-windows-server-2016-certified-2020]https://www.youracclaim.com/badges/ac59d77b-9209-48da-bf7a-dfadeaa187c3/public_url

From: Markus Kraus notifications@github.com Sent: Monday, July 13, 2020 1:30 PM To: vMarkusK/Advanced-PRTG-Sensors Advanced-PRTG-Sensors@noreply.github.com Cc: Gyslain Hamel ghamel@equipemicrofix.com; Mention mention@noreply.github.com Subject: Re: [vMarkusK/Advanced-PRTG-Sensors] Strange error while running the script (#60)

Hi @Gyslainhhttps://github.com/Gyslainh ,

I have a few questions:

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/vMarkusK/Advanced-PRTG-Sensors/issues/60#issuecomment-657691222, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQEOEEWVW6IJPE273EP7SK3R3NACHANCNFSM4OYREMTQ.

vMarkusK commented 4 years ago

Ps does your script works with veeam 10? Yes, it does work with v10.

Are you sure that there is no Copy & Paste issue with the content of the PS1? Just to make true, please use this view and copy & past it again: https://raw.githubusercontent.com/vMarkusK/Advanced-PRTG-Sensors/master/Veeam/PRTG-VeeamBRStats.ps1

Is there an obvious difference between the environments?

Gyslainh commented 4 years ago

Nope getting this error now

C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXEXML\Veeam.ps1 : Failed to connect to Veeam BR Host '172.21.1.183' with user 'computername$' At line:1 char:1

Environnement is about the same for everyone either windows 2012R2 or 2016

This Probe doesn’t have the veeam server on it it,s on another server

Gyslain Hamel Administrateur de Système/System Administrator

[cid:image001.png@01D2BDDA.DCDB3780]

[cid:image003.png@01D5AE7A.E31E6200]https://www.canadianbusiness.com/lists-and-rankings/growth-500/2019-information-technology-fastest-growing-companies/

www.equipemicrofix.comhttp://www.equipemicrofix.com/ Bureau/Office: 514-394-0780 Sans-Frais/Toll-Free: 1-855-305-9939 Fax: 450-933-6229

[mcsa-windows-server-2016-certified-2020]https://www.youracclaim.com/badges/ac59d77b-9209-48da-bf7a-dfadeaa187c3/public_url

From: Markus Kraus notifications@github.com Sent: Tuesday, July 14, 2020 1:45 PM To: vMarkusK/Advanced-PRTG-Sensors Advanced-PRTG-Sensors@noreply.github.com Cc: Gyslain Hamel ghamel@equipemicrofix.com; Mention mention@noreply.github.com Subject: Re: [vMarkusK/Advanced-PRTG-Sensors] Strange error while running the script (#60)

Ps does your script works with veeam 10? Yes, it does work with v10.

Are you sure that there is no Copy & Paste issue with the content of the PS1? Just to make true, please use this view and copy & past it again: https://raw.githubusercontent.com/vMarkusK/Advanced-PRTG-Sensors/master/Veeam/PRTG-VeeamBRStats.ps1

Is there an obvious difference between the environments?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/vMarkusK/Advanced-PRTG-Sensors/issues/60#issuecomment-658318764, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQEOEEQBMX3VUSNOOTM46T3R3SKRVANCNFSM4OYREMTQ.

Gyslainh commented 4 years ago

I’m also getting this error at other places

C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXEXML\Veeam.ps1 : Method invocation failed because [Veeam.Backup.Core.CBackupRepository] does not contain a method named 'GetRepositoryBackupsSize'. At line:1 char:1

none are Veeam 10 all are 9.5U4B

Gyslain Hamel Administrateur de Système/System Administrator

[cid:image001.png@01D2BDDA.DCDB3780]

[cid:image003.png@01D5AE7A.E31E6200]https://www.canadianbusiness.com/lists-and-rankings/growth-500/2019-information-technology-fastest-growing-companies/

www.equipemicrofix.comhttp://www.equipemicrofix.com/ Bureau/Office: 514-394-0780 Sans-Frais/Toll-Free: 1-855-305-9939 Fax: 450-933-6229

[mcsa-windows-server-2016-certified-2020]https://www.youracclaim.com/badges/ac59d77b-9209-48da-bf7a-dfadeaa187c3/public_url

From: Markus Kraus notifications@github.com Sent: Tuesday, July 14, 2020 1:45 PM To: vMarkusK/Advanced-PRTG-Sensors Advanced-PRTG-Sensors@noreply.github.com Cc: Gyslain Hamel ghamel@equipemicrofix.com; Mention mention@noreply.github.com Subject: Re: [vMarkusK/Advanced-PRTG-Sensors] Strange error while running the script (#60)

Ps does your script works with veeam 10? Yes, it does work with v10.

Are you sure that there is no Copy & Paste issue with the content of the PS1? Just to make true, please use this view and copy & past it again: https://raw.githubusercontent.com/vMarkusK/Advanced-PRTG-Sensors/master/Veeam/PRTG-VeeamBRStats.ps1

Is there an obvious difference between the environments?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/vMarkusK/Advanced-PRTG-Sensors/issues/60#issuecomment-658318764, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQEOEEQBMX3VUSNOOTM46T3R3SKRVANCNFSM4OYREMTQ.

vMarkusK commented 4 years ago

Now the script works as intended. A copy & paste error must have crept in.

C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXEXML\Veeam.ps1 : Failed to connect to Veeam BR Host '172.21.1.183' with user 'computername$'

This a connection error to the Veeam Server. Please verify the Connection from this Host to the VBR Server via the VBR Console with the same Credentials.

C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXEXML\Veeam.ps1 : Method invocation failed because [Veeam.Backup.Core.CBackupRepository] does not contain a method named 'GetRepositoryBackupsSize'.

This error occurs, when you run this script against a Veeam Backup & Replication Server prior Version 10 with connected Cloud Connect Repositories.

Gyslainh commented 4 years ago

Now the script works as intended. A copy & paste error must have crept in.

C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXEXML\Veeam.ps1 : Failed to connect to Veeam BR Host '172.21.1.183' with user 'computername$'

If I run the script directly from the probe with the same username I have 0 problems its PRTG that give me that error

C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXEXML\Veeam.ps1 : Method invocation failed because [Veeam.Backup.Core.CBackupRepository] does not contain a method named 'GetRepositoryBackupsSize'.

This error occurs, when you run this script against a Veeam Backup & Replication Server prior Version 10 with connected Cloud Connect Repositories. But I have a lot of other users with Cloud connect Repositories and they work fine, why would this one give me that error and how to fix it?

Thanks a lot for your script and your time its’ appreciated

Gyslain Hamel Administrateur de Système/System Administrator

[cid:image001.png@01D2BDDA.DCDB3780]

[cid:image003.png@01D5AE7A.E31E6200]https://www.canadianbusiness.com/lists-and-rankings/growth-500/2019-information-technology-fastest-growing-companies/

www.equipemicrofix.comhttp://www.equipemicrofix.com/ Bureau/Office: 514-394-0780 Sans-Frais/Toll-Free: 1-855-305-9939 Fax: 450-933-6229

[mcsa-windows-server-2016-certified-2020]https://www.youracclaim.com/badges/ac59d77b-9209-48da-bf7a-dfadeaa187c3/public_url

From: Markus Kraus notifications@github.com Sent: Tuesday, July 14, 2020 3:49 PM To: vMarkusK/Advanced-PRTG-Sensors Advanced-PRTG-Sensors@noreply.github.com Cc: Gyslain Hamel ghamel@equipemicrofix.com; Mention mention@noreply.github.com Subject: Re: [vMarkusK/Advanced-PRTG-Sensors] Strange error while running the script (#60)

Now the script works as intended. A copy & paste error must have crept in.

C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXEXML\Veeam.ps1 : Failed to connect to Veeam BR Host '172.21.1.183' with user 'computername$'

This a connection error to the Veeam Server. Please verify the Connection from this Host to the VBR Server via the VBR Console with the same Credentials.

C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXEXML\Veeam.ps1 : Method invocation failed because [Veeam.Backup.Core.CBackupRepository] does not contain a method named 'GetRepositoryBackupsSize'.

This error occurs, when you run this script against a Veeam Backup & Replication Server prior Version 10 with connected Cloud Connect Repositories.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/vMarkusK/Advanced-PRTG-Sensors/issues/60#issuecomment-658378368, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQEOEEUZCAXZA4P4UQ4RPHLR3SZBTANCNFSM4OYREMTQ.

vMarkusK commented 4 years ago

Other users fixed the connection issue by changing the probe service from local system to a named account that has access to veeam. Otherwise you can als configure the credentials for the device in PRTG.

Latest version of the script only works with cloud connect repos and version 10 and older versions only supported up to 9.5 U4 with cloud connect repos.

Gyslainh commented 4 years ago

Ok so I’ll have to use a earlier version to work with 9.5U4B Cloud repo ok thanks

Gyslain Hamel Administrateur de Système/System Administrator

[cid:image001.png@01D2BDDA.DCDB3780]

[cid:image003.png@01D5AE7A.E31E6200]https://www.canadianbusiness.com/lists-and-rankings/growth-500/2019-information-technology-fastest-growing-companies/

www.equipemicrofix.comhttp://www.equipemicrofix.com/ Bureau/Office: 514-394-0780 Sans-Frais/Toll-Free: 1-855-305-9939 Fax: 450-933-6229

[mcsa-windows-server-2016-certified-2020]https://www.youracclaim.com/badges/ac59d77b-9209-48da-bf7a-dfadeaa187c3/public_url

From: Markus Kraus notifications@github.com Sent: Tuesday, July 14, 2020 4:18 PM To: vMarkusK/Advanced-PRTG-Sensors Advanced-PRTG-Sensors@noreply.github.com Cc: Gyslain Hamel ghamel@equipemicrofix.com; Mention mention@noreply.github.com Subject: Re: [vMarkusK/Advanced-PRTG-Sensors] Strange error while running the script (#60)

Other users fixed the connection issue by changing the probe service from local system to a named account that has access to veeam. Otherwise you can als configure the credentials for the device in PRTG.

Latest version of the script only works with cloud connect repos and version 10 and older versions only supported up to 9.5 U4 with cloud connect repos.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/vMarkusK/Advanced-PRTG-Sensors/issues/60#issuecomment-658391419, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQEOEEVKS7WRASDPVFO3KALR3S4OJANCNFSM4OYREMTQ.

vMarkusK commented 4 years ago

Are you fine with that solution?

If so, I will close this issue.

Gyslainh commented 4 years ago

No as the error stands

C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXEXML\Veeam.ps1 : Cannot convert the "System.Object[]" value of type "System.Object[]" to type "System.Guid". At line:1 char:1

This one happens on a client hwere the probe is the same server as the Veeam 9.5U4B

I tried changing the login for the probe service and made sure the windows credentials are good (used a domain admin account) and still doesn’t work

This is a 2012R2 server

Gyslain Hamel Administrateur de Système/System Administrator

[cid:image001.png@01D2BDDA.DCDB3780]

[cid:image003.png@01D5AE7A.E31E6200]https://www.canadianbusiness.com/lists-and-rankings/growth-500/2019-information-technology-fastest-growing-companies/

www.equipemicrofix.comhttp://www.equipemicrofix.com/ Bureau/Office: 514-394-0780 Sans-Frais/Toll-Free: 1-855-305-9939 Fax: 450-933-6229

[mcsa-windows-server-2016-certified-2020]https://www.youracclaim.com/badges/ac59d77b-9209-48da-bf7a-dfadeaa187c3/public_url

From: Markus Kraus notifications@github.com Sent: Wednesday, July 15, 2020 12:52 PM To: vMarkusK/Advanced-PRTG-Sensors Advanced-PRTG-Sensors@noreply.github.com Cc: Gyslain Hamel ghamel@equipemicrofix.com; Mention mention@noreply.github.com Subject: Re: [vMarkusK/Advanced-PRTG-Sensors] Strange error while running the script (#60)

Are you fine with that solution?

If so, I will close this issue.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/vMarkusK/Advanced-PRTG-Sensors/issues/60#issuecomment-658878365, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQEOEEW46AEORXB5DH2ONNTR3XNC5ANCNFSM4OYREMTQ.

vMarkusK commented 4 years ago

Might you please verify this enhanced version on your v10 and v9.5 VBR Server? https://raw.githubusercontent.com/vMarkusK/Advanced-PRTG-Sensors/MultVeeamVersion/Veeam/PRTG-VeeamBRStats.ps1

./PRTG-VeeamBRStats.ps1 -Debug

There was a Bug in the older version of the script if multiple cloud repos are connected. Does this apply to your environment?

Gyslainh commented 4 years ago

Hi, it indeed fixed the one that had multiple cloud repo but the one that has a single cloud repo still fails

C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXEXML\Veeam.ps1 : Cannot convert the "System.Object[]" value of type "System.Object[]" to type "System.Guid". At line:1 char:1

This is the last one left to fix

Gyslain Hamel Administrateur de Système/System Administrator

[cid:image001.png@01D2BDDA.DCDB3780]

[cid:image003.png@01D5AE7A.E31E6200]https://www.canadianbusiness.com/lists-and-rankings/growth-500/2019-information-technology-fastest-growing-companies/

www.equipemicrofix.comhttp://www.equipemicrofix.com/ Bureau/Office: 514-394-0780 Sans-Frais/Toll-Free: 1-855-305-9939 Fax: 450-933-6229

[mcsa-windows-server-2016-certified-2020]https://www.youracclaim.com/badges/ac59d77b-9209-48da-bf7a-dfadeaa187c3/public_url

From: Markus Kraus notifications@github.com Sent: Wednesday, July 15, 2020 2:31 PM To: vMarkusK/Advanced-PRTG-Sensors Advanced-PRTG-Sensors@noreply.github.com Cc: Gyslain Hamel ghamel@equipemicrofix.com; Mention mention@noreply.github.com Subject: Re: [vMarkusK/Advanced-PRTG-Sensors] Strange error while running the script (#60)

Might you please verify this enhanced version on your v10 and v9.5 VBR Server? https://raw.githubusercontent.com/vMarkusK/Advanced-PRTG-Sensors/MultVeeamVersion/Veeam/PRTG-VeeamBRStats.ps1

./PRTG-VeeamBRStats.ps1 -Debug

There was a Bug in the older version of the script if multiple cloud repos are connected. Does this apply to your environment?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/vMarkusK/Advanced-PRTG-Sensors/issues/60#issuecomment-658931148, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQEOEEUHRZTRZ4RWEJVBPGDR3XYVFANCNFSM4OYREMTQ.

vMarkusK commented 4 years ago

To fix the issue I need a bit more detailed feedback.

Might you please also share the Error and Debug output if possible? Do you use the new version (https://raw.githubusercontent.com/vMarkusK/Advanced-PRTG-Sensors/MultVeeamVersion/Veeam/PRTG-VeeamBRStats.ps1) of the script on all VBR Servers within this test?