Ad Widget

Collapse

Setting up a trigger that fires off when memory of an SNMP device is > 90 percent

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ericgearhart
    Senior Member
    • Jan 2009
    • 115

    #1

    Setting up a trigger that fires off when memory of an SNMP device is > 90 percent

    I've been playing around with the Cisco ASA template, and I added an item for "memory used" along with the "memory free" one it comes with. I built a graph off this, so that one can see the amount of memory in use versus how much is left.

    This little exercise led me to next try to setup a trigger that fires off when the percent memory usage is above 90 percent, hence this post.

    The basic expression to get the precentage for this thing needs to be:

    (free memory / total memory) * 100

    ...but to get the total memory I need to add my "free memory item" and my
    "used memory" item (that's straight out of Cisco's official MIB... if I could query a "total memory" SNMP OID I would and then use that)

    So really the expression needs to be:

    (free memory / (free memory + used memory) ) * 100 > 90

    I can't get this to work though... the order of operations matters, because the addition needs to happen first before the division happens (PEMDAS for those that remember from school.. do addition first, then division)

    Here's my real expression from the trigger I'm trying to build (with linebreaks to make it more readable):

    ({Template_Cisco_ASA:CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolFree.1.last(0)}
    /{Template_Cisco_ASA:CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolFree.1.last(0)}
    +{Template_Cisco_ASA:CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolUsed.1.last(0)})*100>90
    Last edited by ericgearhart; 03-01-2010, 19:56. Reason: fixed copyedit
  • tighep
    Senior Member
    • Dec 2007
    • 124

    #2
    ({Template_Cisco_ASA:CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolFree.1.last(0)}
    /({Template_Cisco_ASA:CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolFree.1.last(0)}
    +{Template_Cisco_ASA:CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolUsed.1.last(0)})*100)>90

    That's the syntax I use, well similar at least.

    Comment

    Working...