Ad Widget

Collapse

Literal values Patch

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • spaww
    Senior Member
    Zabbix Certified Specialist
    • May 2009
    • 178

    #1

    Literal values Patch

    Hi All,

    I create a very small patch to add suport to LITERAL VALUES on zabbix.

    The default way of Zabbix presentation of a numeric item is liked:

    Value | Zabbix presentation
    1 | 1
    1000 | 1K
    10000 | 10K


    In most of cases is a good soluction because the size of numbers (1.000.000) BUT, in some cases, we need to get the LITERAL VALUE on charts.

    Example? You need to monitoring the amount of printed pages on your printers.

    In this case you need a chart with 10.000 value... not a 10k value because your customer is not a tecnical is a end user and need the real, literal value.

    For put to work you need to modify the file: "func.inc.php" and add 3 lines (in my patch I add 4 lines to add a comment about the code):

    Code:
    // Special processing with literal ronded values
    	if($units == 'literal'){
    		return round($value, ZBX_UNITS_ROUNDOFF_UPPER_LIMIT);
    	}
    This lines need to be added inside the function "convert_units" (in zabbix 1.8.9 is after line 474).

    I make a post about this in my blog and put the patch available: http://spinola.net.br/blog/?p=124

    Best Regards,
    SpawW
    Adail Horst
    OCA/OCP - Oracle Application Server
    ZABBIX Certified Specialist
    http://www.spinola.net.br/blog (Blog sobre Zabbix e tecnologia)
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    or just edit blackList in func.inc.php
    Zabbix 3.0 Network Monitoring book

    Comment

    • spaww
      Senior Member
      Zabbix Certified Specialist
      • May 2009
      • 178

      #3
      Originally posted by richlv
      or just edit blackList in func.inc.php
      Veeeery Cool... much more easy
      Adail Horst
      OCA/OCP - Oracle Application Server
      ZABBIX Certified Specialist
      http://www.spinola.net.br/blog (Blog sobre Zabbix e tecnologia)

      Comment

      • spaww
        Senior Member
        Zabbix Certified Specialist
        • May 2009
        • 178

        #4
        Originally posted by spaww
        Veeeery Cool... much more easy
        Richl,

        The RESULT of both soluctions is not the same.

        With my aproach we have "10000,01" as result
        With your aproach we have "10000,01 literal"

        I think for this cases my aproach is necessary because in charts we dont have much space...
        Adail Horst
        OCA/OCP - Oracle Application Server
        ZABBIX Certified Specialist
        http://www.spinola.net.br/blog (Blog sobre Zabbix e tecnologia)

        Comment

        • richlv
          Senior Member
          Zabbix Certified Trainer
          Zabbix Certified SpecialistZabbix Certified Professional
          • Oct 2005
          • 3112

          #5
          ah, you want it totally gone... there might be a feature request for that, but i just can't find it right now
          Zabbix 3.0 Network Monitoring book

          Comment

          • spaww
            Senior Member
            Zabbix Certified Specialist
            • May 2009
            • 178

            #6
            Originally posted by richlv
            ah, you want it totally gone... there might be a feature request for that, but i just can't find it right now
            I Think Andre Déo Talk with Alexei about this requirement.
            Adail Horst
            OCA/OCP - Oracle Application Server
            ZABBIX Certified Specialist
            http://www.spinola.net.br/blog (Blog sobre Zabbix e tecnologia)

            Comment

            • Axilla
              Senior Member
              • Aug 2010
              • 130

              #7
              Originally posted by richlv
              ah, you want it totally gone... there might be a feature request for that, but i just can't find it right now
              there is, I put one up a long time ago We ended up using the blacklist method.. this is great

              Comment

              Working...