What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Can I specify that a channel has a maximum?

Votes:

0

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

custom-channel custom-sensor http-data-advanced web-api xml

Created on Nov 30, 2015 11:28:58 PM

Last change on Dec 1, 2015 12:34:45 PM by  Luciano Lingnau [Paessler]



2 Replies

Accepted Answer

Votes:

0

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

Created on Dec 1, 2015 12:31:55 PM by  Luciano Lingnau [Paessler]

Last change on Dec 1, 2015 12:41:07 PM by  Luciano Lingnau [Paessler]



Votes:

0

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

Looking forward to having my drobo monitored!

Created on Dec 1, 2015 12:34:37 PM




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.