Discussion:
Dependency/Layer 2 - revisited
l2huynh
2011-10-07 20:24:34 UTC
Permalink
l2huynh [http://community.zenoss.org/people/l2huynh] created the discussion

"Re: Dependency/Layer 2 - revisited"

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

--------------------------------------------------------------
I'm not good with python and I have not successfully implement layer 2/3 dependency using transform. The way that I used was hacking the filter in the Alert Rule. For those who does not know, at the Alert Rule page, if you append the zenoss url with "/manage", it would take you to the Zope page; click on Property and then in the "where" textbox is the mysql filter for event. I added the following to suppress all events except for zenoss local gateway if the local gateway goes down:

and (ipAddress = 'ip.of.master.device' or (ipAddress = 'ip.of.dependent.device' and (select count(*) from status where ipAddress = 'ip.of.master.device' and eventclass = '/Status/Ping' and severity = 5) = 0))
--------------------------------------------------------------

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

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
tlkhorses
2011-10-07 22:13:43 UTC
Permalink
tlkhorses [http://community.zenoss.org/people/tlkhorses] created the discussion

"Re: Dependency/Layer 2 - revisited"

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

--------------------------------------------------------------
Not sure that one would help much in my case l2huynh. In my case I need one of those for each router so that if the router in front of it goes down, the down router alerts and the others don't.

@jude16, where did you put that and by location I assume you grouped items at a location. Say I have a string of towers, hops, to get to the Zenoss server and edge. If tower 2 goes down tower 3 and tower 4 would be unknown or acknowledged in your script and not alert.
--------------------------------------------------------------

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

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
OneLoveAmaru
2011-11-14 16:09:58 UTC
Permalink
OneLoveAmaru [http://community.zenoss.org/people/OneLoveAmaru] created the discussion

"Re: Dependency/Layer 2 - revisited"

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

--------------------------------------------------------------
Have any tried this: http://community.zenoss.org/blogs/zenossblog/2008/08/26/tip-of-the-month-layer-3-dependency-checker http://community.zenoss.org/blogs/zenossblog/2008/08/26/tip-of-the-month-layer-3-dependency-checker

I have all of my layer 3 devices in Zenoss and a manual traceroute from the zenoss server shows all hops but the ./tracepath.py does not show all hops. Very weird.

In any case, if a router goes down, I get 100 messages about every IP service and server that is down. Quite annoying.
--------------------------------------------------------------

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

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jeronimo
2012-12-14 23:26:09 UTC
Permalink
jeronimo [http://community.zenoss.org/people/jeronimo] created the discussion

"Re: Dependency/Layer 2 - revisited"

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

--------------------------------------------------------------
FYI, I actually think there's only one JIRA request for Layer 2.  Maybe I missed something.  Anyway, here it is if you want to vote for it.  Maybe that will nudge things along.

http://jira.zenoss.com/jira/browse/ZEN-2678 http://jira.zenoss.com/jira/browse/ZEN-2678
--------------------------------------------------------------

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

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
j053ph4
2012-12-17 21:45:09 UTC
Permalink
j053ph4 [http://community.zenoss.org/people/j053ph4] created the discussion

"Re: Dependency/Layer 2 - revisited"

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

--------------------------------------------------------------
I was just thinking about this and wondering about taking the following approach (code sample below):

The basic idea is as mentioned to supress events caused by a network path failure.  I'm wondering if  that path can be deduced from the object database in the following fashion (as an event transform):

Given an event:

1) determine collector of the affected device (as another device in the dmd)
2) exame the os.routes() entries of both the device and its collector, in particular if the "nexthops" refer to other known devices
3) determine whether any of the "nexthops" are shared between devices
4) if not, examine each list of hops for both devices and try to determine if they share common "hops"
5) if a list of shared "hops" can be determined, and any of those hops is "down", then suppress the event.


*The following code is fragile, untested and best regarded as "probably a bad idea".  it almost certainly won't work as intended or described above:*


def findNextHops(dev):
  """
     return list of dmd devices from given device routes
  """
  hops = []
  for r in dev.os.routes():
    hop = r.nexthop()
    if hop is not None:
      if hop.device() is not None:
        if hop.device() not in hops:
          hops.append(hop.device())
  return hops

def findCommon(d,c):
  """
    attempt to find hops in common between 2 nodes
  """
  dhops = findNextHops(d)
  chops = findNextHops(c)
  inter = set(dhops).intersection(chops)
  if len(inter) > 0:
    return inter
  else:
    for e in dhops:
      for f in chops:
        return findCommon(e,f)

try:
  # find the collector for the event device
  collector= dmd.Devices.findDevice(d.getPerformanceServerName())
  common = findCommon(device,collector)
  for c in common:
    if c.getPingStatus() > 0:
      evt._action = "drop"

except:
  pass


I realize there's much not taken into account, but perhaps this can be a starting point?

Joseph
--------------------------------------------------------------

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

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