Ad Widget

Collapse

preprocessing byte to gb

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Shonex
    Junior Member
    • Jan 2023
    • 5

    #1

    preprocessing byte to gb

    Hi I am new with zabbix.I need your help.
    I need to get free disk space from server and i get it in bytes.(vfs.fs.size[D:,free])
    I need to get disk space in Gb.
    anyone can help me with javascript script.I think it needs preprocessing using javascript.
    THanks
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    https://www.zabbix.com/documentation.../preprocessing

    Arithmetic
    Custom multiplier Multiply the value by the specified integer or floating-point value.
    Use this option to convert values received in KB, MBps, etc into B, Bps. Otherwise Zabbix cannot correctly set prefixes (K, M, G etc).
    Note that if the item type of information is Numeric (unsigned), incoming values with a fractional part will be trimmed (i.e. '0.9' will become '0') before the custom multiplier is applied.
    Supported: scientific notation, for example, 1e+70 (since version 2.2); user macros and LLD macros (since version 4.0); strings that include macros, for example, {#MACRO}e+10, {$MACRO1}e+{$MACRO2}(since version 5.2.3)
    The macros must resolve to an integer or a floating-point number.
    If you mark the Custom on fail checkbox, the item will not become unsupported in case of failed preprocessing step and it is possible to specify custom error handling options: either to discard the value, set a specified value, or set a specified error message.
    And thitnk about this:
    https://www.zabbix.com/documentation...fig/items/item
    Units If a unit symbol is set, Zabbix will add post processing to the received value and display it with the set unit postfix.
    By default, if the raw value exceeds 1000, it is divided by 1000 and displayed accordingly. For example, if you set bps and receive a value of 881764, it will be displayed as 881.76 Kbps.
    The JEDEC memory standard is used for processing B (byte), Bps (bytes per second) units, which are divided by 1024. Thus, if units are set to B or Bps Zabbix will display:
    1 as 1B/1Bps
    1024 as 1KB/1KBps
    1536 as 1.5KB/1.5KBps

    Note that if a unit is prefixed with !, then no unit prefixes/processing is applied to item values. See unit conversion.
    Last edited by Hamardaban; 03-02-2023, 14:29.

    Comment

    Working...