I'm looking into how I can run a programmatic report on which sensors/channels don't have limits set up. We have 16,000+ sensors, so it has to be programmatic. I planned on using the API but it seems to have a major flaw. Some of the sensors such as "SSH Disk Free" have default limits on the Free Space channels. 25% for warning and 10% for error. These numbers however, are not in the properties of the channel. This seems unintended. If there are defaults for a channel, it should enable the limits (change limitmode) and set the properties that I would set (limitmaxerror, limitmaxwarning).

If I run this query on an SSH Disk Free sensor

https://prtghost/api/getobjectproperty.htm?id=53730&subtype=channel&show=nohtmlencode&username=username&passhash=passhash&name=limitminwarning&subid=4

Returns:

<?xml version="1.0" encoding="UTF-8" ?>
<prtg>
	<version>21.2.67.1562+</version>
	<result></result>
</prtg>

This goes for all limit properties (limitmaxerror, limitmaxwarning, limitminwarning, limitminerror). limitmode returns 0, or disabled.

Is there any other way I can create a list of sensors / channels without limits?


Article Comments

Hi there,

I'm afraid it is not possible to filter your sensor by "no limits set". You may create an additional script which filters this with the result of the whole list.


Kind regards

Felix Wiesneth - Team Tech Support


Jun, 2021 - Permalink