lordmilko / PrtgAPI

C#/PowerShell interface for PRTG Network Monitor
MIT License
301 stars 37 forks source link

Change "Connection Status Handling" status #352

Closed Simisled closed 11 months ago

Simisled commented 1 year ago

What's going on?

Hello everyone,

I have created many sensors using PrtgAPI. However, all of my traffic sensors have the "Connection Status Handling" parameter set to "Ignore all disconnected states". I actually want to change this parameter to "Show down status for all disconnected states".

I have explored the ObjectProperty of my sensors, but I haven't been able to locate this particular parameter.

Could someone guide me on how to change this parameter? Your assistance is greatly appreciated.

Best regards,

Due Dilligance

lordmilko commented 1 year ago

In Chrome, if you do Ctrl+Shift+J and use the selector tool to select the "Connection Status Handling" input field in the PRTG UI, you should be able to see the name that corresponds to this setting.

Then, when you look at the output of New-SensorParameters when creating your dynamic object, there should be a property with the same name on there that you can set.

If this is not the case, its possible that creating traffic sensors requires an especially complex configuration, in which case the best thing to do is to use Fiddler Classic to trace creating a new sensor in the PRTG UI, and look at the request parameters that were submitted to see where exactly the Connection Status Handling parameter fits in (e.g. it may be part of some larger data structure that will also be found on the object returned from New-SensorParameters)

Simisled commented 11 months ago

Ok peassler say it's impossible with the api.