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

Custom Share Size Script - incorrect "sizing"

Votes:

0

I use the following script

#du /data/ -s

#array=($(du /data/ -s))

array=($(du /data/* -s))
#echo ${array[@]}
#echo ${array[1]}

echo "<prtg>"

#looping
for ((i=0; i<${#array[*]}; i++));
do
        echo " <result>"
        echo "  <value>${array[i]}</value>"
        ((i++))
        echo "  <channel>${array[i]}</channel>"
        echo "  <Unit>BytesFile</Unit>"
        echo "  <VolumeSize>GigaByte</VolumeSize>"
    echo " </result>"
done

echo "</prtg>"

with the result

<prtg>
 <result>
  <value>1662621368</value>
  <channel>/data/backup</channel>
  <Unit>BytesFile</Unit>
  <VolumeSize>GigaByte</VolumeSize>
 </result>
 <result>
  <value>137446176</value>
  <channel>/data/backupsnapshot</channel>
  <Unit>BytesFile</Unit>
  <VolumeSize>GigaByte</VolumeSize>
 </result>
....more results...
</prtg>

But the result show like that: PRTG view

What actually really confused me is that it makes no difference, when I change <VolumeSize>GigaByte</VolumeSize>" to Byte. What did I miss here, if I'd like to have it in TB or GB?

custom-sensor prtg ssh-script-advanced-sensor

Created on Jun 23, 2018 12:49:04 PM

Last change on Jun 25, 2018 11:49:01 AM by  Luciano Lingnau [Paessler]



3 Replies

Accepted Answer

Votes:

0

Hello there,
thank you for your KB-Post.

You don't need to use <VolumeSize>GigaByte</VolumeSize>. Simply head to the device's settings (or the parent group, or probe, or root) and adjust the Channel Unit Configuration.

Since you're working with BytesFile, Set the Bytes (File) in the Channel Unit configuration to be GByte or TByte, and all sensors that use the unit <BytesFile>on this device will report in the selected unit.

Best Regards,
Luciano Lingnau [Paessler Support]

Created on Jun 25, 2018 11:52:16 AM by  Luciano Lingnau [Paessler]



Votes:

0

Thanks for the hint. Actually I knew that this exist, but on this sensor I missed it :D But also I tought the Gigabyte at Volumesize would somehow be a "preset".

But actually i discovered a Problem. Whats the minimum update time for a sensor to connect the points because on this sensor it makes not much difference if I check it more than all 6 hours but with that it does only connect the measured points in live view

not connected

not connected

connected

connected

Created on Jun 26, 2018 6:22:34 AM

Last change on Jun 26, 2018 11:53:10 AM by  Luciano Lingnau [Paessler]



Votes:

0

Hello and thank you for your update/reply.

It depends on what setting(s) you're using under Setup > User Interface for the Graph Settings option.

The Live data (first graph) will always show "connected" points or readings in the graph. But the other graphs, for instance the (&tabid=3) (Default: 2 Days) will use one of the following options:

  • 1 day with 1 minute averages: Results in 1440 values.
  • 1 day with 5 minutes averages: Results in 288 values.
  • 1 day with 15 minutes averages: Results in 96 values. Uses least RAM memory. We recommend this setting for installations with 10,000 sensors or more.
  • 2 days with 1 minute averages: Results in 2880 values. Uses most RAM memory.
  • 2 days with 5 minutes averages: Results in 576 values.
  • 2 days with 15 minutes averages: Results in 192 values.
  • 4 days with 1 hour averages: Results in 96 values. Uses least RAM memory. We recommend this setting for installations with 10,000 sensors or more.

For the graph entries to be connected, you need the readings to be at least as short as the average. If the sensor scans every 6 hours, but the average is 1 hour, the graph will show dots (i.e. will not connect the values) because there simply isn't enough precision to "connect" the graph.

Alternatively, consider that int the "Historic Data Tab" of the sensor, you can use any average (between a minute and up to a day) for any sensor at anytime. In many cases, it makes more sense to use this than to change the configuration for the whole PRTG.

Best Regards,
Luciano Lingnau [Paessler Support]

Created on Jun 26, 2018 1:09:06 PM by  Luciano Lingnau [Paessler]

Last change on Jun 26, 2018 1:09:18 PM by  Luciano Lingnau [Paessler]




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.