Git Product home page Git Product logo

Comments (8)

eren-kemer avatar eren-kemer commented on September 25, 2024 1

Please also add to the docs, as the syntax wasn't clear to me, looking at the screenshots on the blog.

from advanced-prtg-sensors.

vMarkusK avatar vMarkusK commented on September 25, 2024

Hello,

output in CMD an PS looks fine for me. So PRTG should process that.
Have you checked the PRTG sensor Log?
The default parameter of the Script normally work fine. So you don’t need to use the -p switch only for BRhost or set the default in the ps1 file.

If you want to use all parameters you should try it this way:
-f="PRTG-VeeamBRStats.ps1" -p="-repoCritical 80 -repoWarn 70 -reportmode Weekly"

Kind regards,
Markus

from advanced-prtg-sensors.

eren-kemer avatar eren-kemer commented on September 25, 2024

Hello,
thanks for the reply!

the default parameter for BRHost in the script has already been modified by me. This is not appropiate for my use case though, as we don't always have the same name for our B&R Servers.
I'd also like to be able to set the warn, critical and reportmode parameters per sensor, like i tried to.
i have set my parameter string in the sensor config to this:
-f="PRTG-VeeamBRStats.ps1" -p="-repoCritical 80 -repoWarn 70 -reportmode Weekly"

Still getting the same XML structural error.

What i have noticed is.. in your powershell script, you mention that reportmode is a string and should be in quotation marks. What is the definitive answer on this?

.EXAMPLE 
PRTG-VeeamBRStats.ps1 -BRHost veeam01.lan.local -reportmode "Monthly" -repoCritical 80 -repoWarn 70 -Debug

To me it seems like the script does not take my parameters.
When i change the default host in the script to the right host, it works:

[string] $BRHost = "backup01",

C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML>PSx64.exe -f= PRTG-VeeamBRStats.ps1" 0:Starting to Process Connection to backup01 ... Connecting BRHost...

When i keep it to

[string] $BRHost = "blabla01",

and try giving it the BRHost as parameter, it doesn't work:

C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML>PSx64.exe -f="PRTG-VeeamBRStats.ps1" -p="BRHost backup01"
0: Failed to connect to Veeam Backup & Replication server

C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML>

What am i doing wrong here? How can i check whether i'm doing something wrong?

from advanced-prtg-sensors.

vMarkusK avatar vMarkusK commented on September 25, 2024

Have you tried the connection via Veeam Console from this server?

from advanced-prtg-sensors.

vMarkusK avatar vMarkusK commented on September 25, 2024

Hello @eren-kemer,

Is the problem solved?

from advanced-prtg-sensors.

eren-kemer avatar eren-kemer commented on September 25, 2024

Please give me a few days to check with latest commits included.

from advanced-prtg-sensors.

eren-kemer avatar eren-kemer commented on September 25, 2024

I have now found the issue with the way i did it.
I have to supply the parameters to Psx64.exe like this:
-f="PRTG-VeeamBRStats2.ps1" -p="localhost",""Monthly"", "80", "70"
This way, i get correct output, even with parameters in the sensor.

You might want to add that to the documentation so people know how to supply parameters.
If i do it like i expected to do(as in the docs) the script would try to literally connect to "-BRHost localhost"
image

So issue is therefore solved. Considering docs get updated.

One question though, how would i go with giving it the Debug switch as well?

from advanced-prtg-sensors.

eren-kemer avatar eren-kemer commented on September 25, 2024

Correction:
required syntax is as follows:
-f="PRTG-VeeamBRStats2.ps1" -p="localhost" ""Monthly"" "5" "8"
At least this works for me now.

from advanced-prtg-sensors.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.