I have a Powershell script that is doing some free space calculation. In PRTG is shows the last channel value as 0%, min and max also at 0%.

I have enabled the debugging on the sensor and have it output being written to disk. Here is the output

<result> <channel>Space Remaining (%)</channel> <unit>Percent</unit> <value>23.96</value> </result>

If I changed the script to not multiple the value by 100 (not sure if PRTG does that since its unit is Percent) I get the output below, but the value is still 0% in PRTG.

<result> <channel>Space Remaining (%)</channel> <unit>Percent</unit> <value>0.24</value> </result>


Article Comments

Hi,

Since your value is a float value you will need to define this in your xml. Otherwise PRTG will display 0. For this just add following:

<Float>1</Float>

The default is 0 (no). If set to 1 (yes), PRTG will show your values.

If you want, you can also define the decimal places with the <DecimalMode> element.


Kind regards

Felix Wiesneth - Team Tech Support


Apr, 2022 - Permalink

Ah I see, I just went and adjusted the Powershell script to round the numbers instead and all is coming out as expected. Thanks!


Apr, 2022 - Permalink