Archived community.zenoss.org | full text search
Skip navigation
12350 Views 13 Replies Latest reply: Mar 10, 2010 11:16 PM by Matthew Kitchin (public) RSS
Matthew Kitchin (public) Rank: Green Belt 170 posts since
Nov 12, 2009
Currently Being Moderated

Feb 26, 2010 5:07 PM

Set dependency using wildcards in a transform

Sorry for the people who are basically seeing this twice or more. I've discussed it in several threads, but I'm trying to create one that is actually devoted to it. Here goes.

 

My wan is Verizon MPLS circuits, and apparently not compatible with Zenoss network topology modeling.
thread/12061?tstart=0

 

I have seen the transforms that have an entry specific to a given subnet/location, but I have 120 locations, so I would prefer not to have a line for every

location in the transform. When a router goes down, I don't want to know about a server or a WAP going down at the same location. I have not

filled out the location value on my routers, but would certainly be glad to if that could help somehow. I had tried to do it below based on our naming convention.

 

All my devices are named like this

 

TX252-RTR

      TX252SRV

      TX252WAP1

 

I had tried the code below (I didn't write it; I don't know python) , but it doesn't seem to be working.

 

if device.id.endswith('WAP') or device.id.endswith('SRV'):

   rtr = device.id[0:5]+'-rtr-ser'

   rtr_server = device.findDevice(rtr)

   if rtr_server.getPingStatus() > 0:

     evt.eventState = 2 # suppressed

 

We are getting swamped with alerts about devices behind the router being down when a circuit goes down. If there is any way I could just say, if TX252-RTR is down, ignore all TX252*** devices, this app would be absolutely wonderful for us.

  • phonegi Rank: Brown Belt 446 posts since
    Apr 15, 2009

    The code is close, let's see if we can clean it up:

     

    router = device.findDevice(device.id[0:5] + '-RTR')
    if not router is None and not router is device:
       if rtr.getPingStatus() > 0:
          evt._action = 'drop'
    

     

    Description:

    Line 1 - This takes the first five letters of the name of the device that generated the event, attaches '-RTR' and then tries to retreive the object. So if device TX252SRV generates an event, line 1 will attempt to retrieve the object named 'TX252-RTR' and assign it to the variable name router.

     

    Line 2 - Verifys that the device object was found and that it is not a router.

     

    Line 3 - Checks to see if the device 'router' has any 'ping down' events

     

    Line 4 - If 'router' has ping down events, then drop this event.

     

     

    Now, this still may not work. Why? Ping sequencing. There is no way to force the ping command to ping in a specific order. Consider this example with three devices - a router: R, a server: S1, another server: S2. Assume S1 and S2 are behind router R.

     

    If the ping sequence is R, S1, S2, then the script should work. The ping to R will time out and generate an event. Next the ping to S1 will time out. However, when line 3 is executed, getPingStatus will return a value greater than 0 because R has an active 'ping down' event. The S1 'ping down' event will be dropped. The same will occur for S2.

     

    Now, if the ping sequence is S1, S2, R, we're in trouble. The ping to S1 will generate an event; however, when line 3 is executed getPingStatus will return 0 because there is no active 'ping down' event for R yet, so the event will be recorded and you will be alerted. Same for S2. Finally R will generate a 'ping down' event.

     

    Without control of the ping sequence, this won't work.

  • phonegi Rank: Brown Belt 446 posts since
    Apr 15, 2009
    Currently Being Moderated
    3. Feb 27, 2010 11:01 PM (in response to phonegi)
    Re: Set dependency using wildcards in a transform

    You may also want to check out this article:

     

    blogs/zenossblog/2008/08/26/tip-of-the-month-layer-3-dependency-checker

     

    Zenoss is supposed to perform Layer 3 dependencies, which sounds like what you're trying to do. Also search for "layer 3 depencencies" and you will get more info.

  • terrys Rank: White Belt 62 posts since
    Nov 27, 2009

    It depends on how the MPLS network operates.  More than likely, the carrier is hiding its internal routers and a traceroute that you run will only show one hop across the carrier's network.  In that case, the MPLS network looks like a single hop and should be indistinguishable from a single physical link.

  • phonegi Rank: Brown Belt 446 posts since
    Apr 15, 2009

    Check out fdeckerts comments on this thread. It is complicated, but he figured out a way to create dummy routes through the "cloud" of  a service providers MPLS network.

  • phonegi Rank: Brown Belt 446 posts since
    Apr 15, 2009

    Hmmm. can you tracepath.py to your local gateway? If not, did you set the name variable to your FQDN?

  • phonegi Rank: Brown Belt 446 posts since
    Apr 15, 2009

    Yes, it would mean dynamic route discovery for that device would stop.

     

    To remove the zenoss.snmp.RouteMap collector:  From a device, select the main drop down > More > Collector Plugins

     

    z.jpg

     

    From the list, click the "x" next to zenoss.snmp.RouteMap

More Like This

  • Retrieving data ...

Legend

  • Correct Answers - 4 points
  • Helpful Answers - 2 points