Discussion:
cisco memory theshold
ignacio freyre
2013-09-18 15:26:08 UTC
Permalink
ignacio freyre [http://community.zenoss.org/people/nachofw] created the discussion

"cisco memory theshold"

To view the discussion, visit: http://community.zenoss.org/message/74696#74696

--------------------------------------------------------------
Hi,
I want to set a threshold for mem5minFree on cisco routers.
The trick is that i want to set it to 30% based on the installed memory which i can see that zenoss knows about since it is in the overview section on the device.

So the question is how can i reference that value in the threshold?.
linux servers uses: (here.hw.totalMemory/1024 * 0.30) but isnt working for cisco.
where can i see the  parameters avilable for a device like : totalMemory which i can then reference in thesholds, etc.?

using zenoss 4.2.4
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/74696#74696]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
ignacio freyre
2013-09-18 20:23:33 UTC
Permalink
ignacio freyre [http://community.zenoss.org/people/nachofw] created the discussion

"Re: cisco memory theshold"

To view the discussion, visit: http://community.zenoss.org/message/74702#74702

--------------------------------------------------------------
ok, so it is working now: small change, removed the 1024 division:
(here.hw.totalMemory * 0.30)

Now, event messages arent being transformed, from what i can see the line 'match = re.search' needs to be altered to match the message, did that but still get:
threshold of MEM not met: current value 161252760.000000

this is the original transform taht i found in the forum:

------------------------------------------------------------------------------------------------------------------------------------
  import re
match = re.search('threshold of Free Memory [^:]+: current value ([\d\.]+)', evt.message)
if match and device:
    avail = float(match.groups()[0]) * 1024
    total = device.hw.totalMemory
    percent_used = (1 - (avail / total)) * 100
    evt.summary = "Memory threshold exceeded: current value %3.1f%%" % (percent_used)
------------------------------------------------------------------------------------------------------------------------------------

please advise what must i change so the transform will match?
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/74702#74702]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Loading...