Hi,

is it possible to change the unit of an XML Sensor channel dynamically by using a variable?

Like this:

echo " <result>" echo " <channel>Name</channel>" echo " <value>" $bytescopied "</value>" echo " <unit>Custom</unit>" echo " <customUnit>" $bytescopiedVAR "</customUnit>" echo " </result>"

when PRTG runs the script for the first time all works well and unit is equal to the variable but if the script changes the value of the variable the unit does not change.


Article Comments

Attention: This article is a record of a conversation with the Paessler support team. The information in this conversation is not updated to preserve the historical record. As a result, some of the information or recommendations in this conversation might be out of date.

Hello, the unit type is set at the channel level manually, the PRTG doesn't change the unit dinamically if the variable unit changes.


Mar, 2021 - Permalink