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

How to define custom sensor's channel units correctly? ("MB/s", "MB" etc.)

Votes:

0

I tried to create two different custom sensors: one was "SSH SCRIPT ADVANCED" and second was "REST CUSTOM" and can't found the method to display values of bandwidth and size channels correctly (in MB/s and MB).

As I understand there are four tags in xml config for this: "Unit", "SpeedSize", "VolumeSize" and "SpeedTime". For example, if I need to display values in "MB/s" - "Unit" must be set to "BytesBandwidth", "VolumeSize" to "MegaByte" and "SpeedTime" not needed (because 1s by default). But it is not work. I alredy tried to specify all these tags in various combinations, but always get simple " /s" as unit.

Moreover, I found strange behaviour in charts for channels where I defined "mode" as "Difference": in table all units displays as " /s", but in charts "/s" is added to every next channel (i.e. " /s/s", " /s/s/s", " /s/s/s/s").

Next question - I can't found the way to display value (size) in MB. My sensor provides data in bytes, I tried to set "Unit" as "BytesFile" and "VolumeSize" as "MegaByte" or "Mega" without any success - sensor still display bytes in bytes.

Now I define all sensors as "Custom", but I see in old forum threads, that some years ago this syntax was work correctly.

And maybe anyone know definition (and difference) of predefined unit types?

custom-sensor rest-custom ssh-script-advanced-sensor units xml

Created on Mar 23, 2018 1:01:29 PM



6 Replies

Votes:

0

Note that you'll need to configure those before the channel is actually created (as the data type is only read upon channel creation). Or does it also appear with a newly created sensor? Did you configure the channel unit settings at device level already?


Kind regards,
Stephan Linke, Tech Support Team

Created on Mar 27, 2018 10:07:14 AM by  Stephan Linke [Paessler Support]



Votes:

0

I'm using newly created configs. Did some tests to clarify API documentation. 1. Default unit sizes (name, volume, speed):

SpeedDisk: " ", " /s" SpeedNet: " ", " /s" BytesBandwidth: "KByte", "kbit/s" BytesMemory: "MByte", "MByte/s" BytesDisk: "MByte", "MByte/s" BytesFile: "Byte", "Byte/s" 2. "Speed" column appears only if Channel mode set to "Difference".

3. "Volume" setting "KiloByte" work only with these Units:

  • SpeedDisk
  • SpeedNet
  • BytesBandwidth

3.1. "Volume" setting "TeraBit", "Giga" work only with these Units:

  • SpeedDisk
  • SpeedNet

4. "Speed" setting "Gigabyte", "GigaBit", "Tera" work only with these Units (in "Speed" column):

  • SpeedDisk
  • SpeedNet

5. If you add "Speed" setting to the channel with "Absolute" mode it will display "Kbyte/s" in "Volume" column instead of absolute unit sizes: "SpeedDisk" "SpeedNet"

6. If you add more than one channel with Unit = "Custom" and Mode = "Difference" you will see fancy bug on the graph - it will displays in legend area "/s", "/s/s", "/s/s/s" for every custom channel.

Conclusion:

  1. If you need channel with high level of customization through "Speed" or/and "Volume" setting - choose "SpeedDisk" or "SpeedNet". All other unit types does not respond to the Speed and Value settings.
  2. If your sensor returns speed as absolute value you need to set Unit = "SpeedDisk", "Speed" and "Volume" to the apropriate unit size ("MegaByte" for example) - result will be displayed as "Mbyte/s".

Created on Mar 27, 2018 2:37:04 PM

Last change on Mar 27, 2018 3:23:40 PM by  Stephan Linke [Paessler Support]



Votes:

0

I'll review the /s/s/s issue - other than that, is the issue resolved?


Kind regards,
Stephan Linke, Tech Support Team

Created on Mar 28, 2018 6:23:32 AM by  Stephan Linke [Paessler Support]



Votes:

0

Could you provide me with the complete XML output that causes the units to have /s appended indefinitely? Thanks! :)


Kind regards,
Stephan Linke, Tech Support Team

Created on Mar 28, 2018 1:08:40 PM by  Stephan Linke [Paessler Support]



Votes:

0

Here is the Custom REST template:

{
  "prtg": {
    "result": [
      {
        "channel": "17 - " ,
        "value": $.controllerStats[0].readBytesTotal,
        "mode": "Difference",
	"float":"0",
	"Unit": "Custom",
	"CustomUnit": "IOPS"
      },
      {
        "channel": "18 - " ,
        "value": $.controllerStats[0].readBytesTotal,
        "mode": "Difference",
	"float":"0",
	"Unit": "Custom",
	"CustomUnit": "IOPS"
      },
      {
        "channel": "19 - " ,
        "value": $.controllerStats[0].readBytesTotal,
        "mode": "Difference",
	"float":"0",
	"Unit": "Custom",
	"CustomUnit": "IOPS"
      }
    ]
  }
}

Created on Mar 29, 2018 6:49:58 AM

Last change on Mar 29, 2018 8:29:06 AM by  Stephan Linke [Paessler Support]



Votes:

0

Thanks for that. It's seemingly indeed related to another bug (i.e. expanding it). Thanks for reporting, we'll make sure to address this in a future release. Unfortunately, I don't have a workaround at hand :/


Kind regards,
Stephan Linke, Tech Support Team

Created on Mar 29, 2018 8:30:06 AM by  Stephan Linke [Paessler Support]




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.