New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

300.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


SSH Advanced script and custom units

Votes:

0

Your Vote:

Up

Down

Hi,

I've written a script to monitor disk space usage and it displays with a custom unit value of G for gigabytes or T for terabytes, depending on the value pulled. When a disk that was at 500 GB of free space (displayed as "500 G") was cleaned up and changed to 5.5 TB free, the newly displayed value was "5.5 G" despite my script clearly putting a "T" in the custom unit tag. Any way around this? I also have the issue where 5.5 is less space than 500 but that's my own issue to tackle. Thanks for any help.

 <result>
    <channel>Free - jbod6-lv1-p1</channel>
    <float>1</float>
    <unit>custom</unit>
    <customunit>T</customunit>
    <value>5.5</value>
  </result>

advanced custom-unit ssh

Created on Aug 9, 2017 3:00:49 PM by  Kyle Tucker (90) 1 1

Last change on Aug 10, 2017 7:32:22 AM by  Torsten Lindner [Paessler Support]



1 Reply

Votes:

0

Your Vote:

Up

Down

Dear Kyle,

the unit type is only evaluated when the channel is created. You cannot change the unit type later via the script (only manually in the channel settings.)

The reason is that channel units are not intended to be changed later as the graph / table later makes no sense when you have old values for a new unit.

You could return the bytes instead, letting the sensor scale, and form a sensor status message using G or T. The sensor status message is not stored, it can contain a string without line breaks, up to 2000 characters long.

Created on Aug 10, 2017 1:50:54 PM by  Arne Seifert [Paessler Support]

Last change on Aug 10, 2017 1:51:59 PM by  Arne Seifert [Paessler Support]



Please log in or register to enter your reply.


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.