Hello there,

I'm using PRTGApi from lordmilko to manage a bulk sensors creation. I'm trying to automatically configure a new HTTP advanced sensor with a sentence verification into the web page.

I use this PS command :

$HttpSensorParams = $PRTGDevice | New-SensorParameters -RawType httpadvanced 
$HttpSensorParams.httpurl = "http://"+$IPAddress
$HttpSensorParams.includemust = "my verif text"
$HttpSensorParams.includemusttype = ???? <= Valid value that I'm looking for !
$HttpSensor = $HttpSensorParams | Add-Sensor 

However, I don't know how to set up $HttpSensorParams.includemusttype which is 0 by default. I would like to directly check "Set sensor to error if keyword is missing" option. I tried multiple integer 1, 2, -1 but it never checks the option.

How can I know possible value for this object property ?

Thanks a lot !


Article Comments

This question was also asked on GitHub, where the resolution was provided:

By inspecting the HTML of the webpage, we see that the property "httpmustneeded" must be set to 1

Please note that PrtgAPI is a third party piece of software, and as such is not supported by Paessler. Please direct all queries regarding PrtgAPI to the GitHub repo (which in this case you have also done)


May, 2022 - Permalink

Duly noted. thanks!


May, 2022 - Permalink