lordmilko / PrtgAPI

C#/PowerShell interface for PRTG Network Monitor
MIT License
305 stars 38 forks source link

Cannot see or find drive sensor limits #401

Closed HoneyBadger54 closed 3 months ago

HoneyBadger54 commented 3 months ago

What's going on?

Hello,

I want to get/see the limits for a drive sensor. We get alerts in PRTG when a drive gets under a specific value. So I assume this works and is set up. I can see there a limits set in the web interface.

image

I think the right command to get this information should be something like: Get-Sensor -Name "Drive" -Device "Hostname" | Get-Channel | fl * When I execute this command I get a lot of information. But the fields I assume are the correct once are empty:

image

Am I missing something or did I make a mistake?

Kind regards HoneyBadger54

Due Dilligance

lordmilko commented 3 months ago

It sounds like this is a Multi Disk Sensor. Multi Disk Sensors store their thresholds under the Settings page of the sensor, rather than under the settings of each channel.

You can interact with these settings via the Get-ObjectProperty and Set-ObjectProperty cmdlets. As these settings are not natively supported by PrtgAPI, you have to use "raw" mode to interact with them

Get-Sensor -Id 1001 | Get-ObjectProperty -Raw

For more information on interacting with raw properties, please see the wiki

HoneyBadger54 commented 3 months ago

Thank you very much! I will take a look at those commands.