I'm using the HTTP Data Advanced Sensor to monitor some devices that have no native monitoring available.

My sensor is returning a channel that is effectively like a hard drive with space used, and total available. On the UI I can specify that the channel should be Data and I can type in the maximum. Ideally I would like my channel to return this.

This xml:

<result>
<channel>Used capacity protected</channel>
<unit>BytesDisk</unit>
<volumeSize>GigaByte</volumeSize>
<mode>Absolute</mode>
<value>1932696268800</value>
<valueLookup/>
</result>

will return the current used capacity correctly, but I can't find a way to return the maximum size of the drive. I tried to mimic the UI by adding these nodes but it didn't work:

<data>Percent</data>
<maximum>9935054438400</maximum>

Can anyone give me a clue about what I need to do?

Ta


Article Comments

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".


Dec, 2015 - Permalink

Thanks for your reply - I'll probably go down the percent route!

Looking forward to having my drobo monitored!


Dec, 2015 - Permalink