Hello,
thank you for your inquiry.
It can't be resolved in the way that you expect it (Set the channels mode to percent based on a maximum), but there are two workarounds as both PRTG and the HTTP Data Advanced Sensor are very flexible:
Define Limits
You can append limits to your XML, that way they will be created on the first sensor scan and will trigger the sensor into warning or down based on the current value (It's comparable to a "Disk Used" sensor instead of "Disk Free" (if there was something like that)). The XML output would look like the following:
<prtg>
<result>
<channel>Used capacity protected</channel>
<value>1932696268800</value>
<unit>BytesDisk</unit>
<LimitMode>1</LimitMode>
<LimitMaxWarning>8035054438400</LimitMaxWarning>
<LimitMaxError>9035054438400</LimitMaxError>
</result>
</prtg>
Provide Values in Percent
Depending of the system behind the XML, you can add a percent channel, by performing the following operation within the script which generates the XML: (currvalue/maxvalue)*100 and modify the XML so that PRTG reads the result as a value in Percent:
<prtg>
<result>
<channel>Used capacity Percent</channel>
<value>30</value>
<Unit>Percent</Unit>
<LimitMode>1</LimitMode>
<LimitMaxWarning>80</LimitMaxWarning>
<LimitMaxError>90</LimitMaxError>
</result>
<result>
<channel>Used capacity Bytes</channel>
<value>1932696268800</value>
<unit>BytesDisk</unit>
</result>
</prtg>
You don't have to stick to a single solution, as this is a multi-channel Sensor you can have both, the value in percent for the primary channel (which will be visible in the overview) and the value in Bytes as a secondary channel in case you want to keep track of the "exact number".
Add comment