Ad Widget

Collapse

using system.cpu.num in a trigger expression

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jeffreys
    Junior Member
    • Mar 2014
    • 8

    #1

    using system.cpu.num in a trigger expression

    I'm sure this is a simple usage issue, but I'm not seeing the correct way to do this on the web anywhere.

    I'd like to modify my
    Processor load is too high on {HOST.NAME}
    trigger

    by adding in something at the end simple like this:

    {Template OS Linux Load:system.cpu.load[all,avg1].min(#3)}>system.cpu.num[]/2


    thus saying that if the runqueue on the machine (over the last 15 minutes) exceeds the number of cpu cores / 2, then we trigger this - not by giving it an arbitrary number.


    Thoughts on how to make this work?

    I've tried various permutations of this expression and it continues to return Incorrect trigger expression.

    Thanks in advance
  • aib
    Senior Member
    • Jan 2014
    • 1615

    #2
    Try this
    Code:
    {Template OS Linux Load:system.cpu.load[all,avg1].min(#3)}>{Template OS Linux Load:system.cpu.num.last(0)}/2
    Please, check that you already configured both Items
    • system.cpu.load[all,avg1]
    • system.cpu.num
    Sincerely yours,
    Aleksey

    Comment

    • jeffreys
      Junior Member
      • Mar 2014
      • 8

      #3
      ok - this is getting closer

      I no longer get the expression error, but now it's returning

      Incorrect item key "system.cpu.num" provided for trigger expression on "Template OS Linux".

      {Template OS Linux:system.cpu.load[all,avg1].min(#3)}>{Template OS Linux:system.cpu.num.last(0)}/2

      I gather this means I need to define it in the Template Items tab, correct?

      Comment

      • jeffreys
        Junior Member
        • Mar 2014
        • 8

        #4
        just defined the item - will give it a shot - thanks!

        Comment

        • aib
          Senior Member
          • Jan 2014
          • 1615

          #5
          Good Luck!
          Tell me about results - if it works or not.
          Sincerely yours,
          Aleksey

          Comment

          • jeffreys
            Junior Member
            • Mar 2014
            • 8

            #6
            so far so good, both on ticket suppression and ticket creation in appropriate cases.

            Thanks again for your help on this - sorry that it was a basic question, but it definitely helped out.

            Comment

            • aib
              Senior Member
              • Jan 2014
              • 1615

              #7
              Any time!

              I'm happy that everything works.
              Sincerely yours,
              Aleksey

              Comment

              • tchjts1
                Senior Member
                • May 2008
                • 1605

                #8
                Excellent! I need to do something very similar.

                Comment

                Working...