Ad Widget

Collapse

Using Items in the formula for calculated items

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Marvin
    Junior Member
    • Jul 2012
    • 4

    #1

    Using Items in the formula for calculated items

    Hi,

    i am trying to calculate the sum of 2 items which are polled by SNMP.

    For example i have:
    One host called SBC.

    One item called Memory which returns the used RAM in MBs.
    One item called Healthscore which returns the healthscore, usually 100.

    Now as a simple test i want to combine these two into 1 item using the calculated method.

    I tried the following:
    Formula: last("Memory")+last("Healthscore")

    But it seems to fail with an error that i use the function wrong.

    Does anybody know the correct syntax which i need to perform this action?

    Kind regards,
    Marvin
  • Yello
    Senior Member
    • Apr 2011
    • 309

    #2
    What are the item keys for the two snmp items?


    Regards,
    David

    Comment

    • Marvin
      Junior Member
      • Jul 2012
      • 4

      #3
      Hi,

      the item keys are as follows:

      Memory:
      Agent: SNMPv2 Agent
      Key:1.3.6.1.4.1.9148.3.2.1.1.2.0
      OID:1.3.6.1.4.1.9148.3.2.1.1.2.0

      Healthscore:
      Agent: SNMPv2 Agent
      Key:1.3.6.1.4.1.9148.3.2.1.1.3.0
      OID:1.3.6.1.4.1.9148.3.2.1.1.3.0

      Kind regards,
      Marvin

      Comment

      • Yello
        Senior Member
        • Apr 2011
        • 309

        #4
        Originally posted by Marvin
        Hi,

        the item keys are as follows:

        Memory:
        Agent: SNMPv2 Agent
        Key:1.3.6.1.4.1.9148.3.2.1.1.2.0
        OID:1.3.6.1.4.1.9148.3.2.1.1.2.0

        Healthscore:
        Agent: SNMPv2 Agent
        Key:1.3.6.1.4.1.9148.3.2.1.1.3.0
        OID:1.3.6.1.4.1.9148.3.2.1.1.3.0

        Kind regards,
        Marvin
        Try something like this:

        last("1.3.6.1.4.1.9148.3.2.1.1.2.0")+last("1.3.6.1 .4.1.9148.3.2.1.1.3.0")


        Regards,
        David

        Comment

        • Marvin
          Junior Member
          • Jul 2012
          • 4

          #5
          Hi,

          yes that seems to work, thanks a lot!

          One more informational question, can i combine data from multiple hosts?
          Like if i have 3x this configuration lets say SBC1 SBC2 and SBC3
          Can i do a calculation which checks: last("SBC1:<key>")+last("SBC2:<key>")+last("SBC3:< key>")

          Would that work?
          Or am i limited to calculations per host?

          Kind regards,
          Marvin

          Comment

          • Yello
            Senior Member
            • Apr 2011
            • 309

            #6
            Yes, that should work.

            Regards,
            David

            Comment

            • Marvin
              Junior Member
              • Jul 2012
              • 4

              #7
              Yeah it worked! Thanks a lot

              Comment

              Working...