Ad Widget

Collapse

Custom multiplier - macro in expression

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Noobz
    Senior Member
    • Jun 2020
    • 105

    #1

    Custom multiplier - macro in expression

    It seems that values can be multiplied by a macro alone, however the macro cannot be part of an expression
    Custom multiplier value 1e-3 is fine
    Custom multiplier value {#MACRO} is fine

    Custom multiplier value 1e-{#MACRO} is NOT ACCEPTED

    What is the way around this in the example where host is monitored by SNMP, item value and the scaling factor are in their own SNMP tables

    Example
    ::1.377 = 29539
    ::2.377 = 3

    The real value is 29539e-3 or 29.539

    Thanks

  • Noobz
    Senior Member
    • Jun 2020
    • 105

    #2
    I've worked around this for now using JavaScript preprocessing with the exact same formula I wanted to use in the custom multiplier

    Comment

    • ripperSK
      Member
      • Jul 2019
      • 42

      #3
      I would suggest that you collect raw data from the SNMP item and from the value of SNMP scale factor item and use calculated item that calculates the real value by using formula of the previous two.

      I hope I made it clear - if not please ask for clarification in the next post.

      Comment

      • Noobz
        Senior Member
        • Jun 2020
        • 105

        #4
        Originally posted by ripperSK
        I would suggest that you collect raw data from the SNMP item and from the value of SNMP scale factor item and use calculated item that calculates the real value by using formula of the previous two.

        I hope I made it clear - if not please ask for clarification in the next post.
        I raised a bug ticket regarding this, https://support.zabbix.com/browse/ZBX-18219 and hopefully it will be resolved soon.

        Comment

        • maclin
          Member
          • Mar 2011
          • 76

          #5
          Hi! A try to create sfp dom monitoring, and there are a lot of values with different data scales http://www.circitor.fr/Mibs/Html/C/C...SensorDataType
          I added it as item prototype but it is not possible to add item prototype as custom multiplier

          Comment

          • maclin
            Member
            • Mar 2011
            • 76

            #6
            Opend issue, hope it will be resolved

            Comment

            • Noobz
              Senior Member
              • Jun 2020
              • 105

              #7
              Originally posted by maclin
              Hi! A try to create sfp dom monitoring, and there are a lot of values with different data scales http://www.circitor.fr/Mibs/Html/C/C...SensorDataType
              I added it as item prototype but it is not possible to add item prototype as custom multiplier
              Hi Maclin,

              The host I was working on was a Cisco ASR using the Entity Sensor MIB. Between discovery rules with LLD macros, and JavaScript preprocessing, I have the whole thing automated.

              Comment


              • maclin
                maclin commented
                Editing a comment
                Can you share it?
            • Noobz
              Senior Member
              • Jun 2020
              • 105

              #8

              Change .txt extension to .yaml - the forum wouldn't let me upload YAML file.
              Attached Files

              Comment

              Working...