Archived community.zenoss.org | full text search
Skip navigation
14341 Views 8 Replies Latest reply: Aug 29, 2012 6:36 PM by rolfs RSS
German Zuccoli Rank: White Belt 19 posts since
Sep 28, 2009
Currently Being Moderated

Apr 26, 2010 10:59 AM

Device Dependency

I read the post, but I do not understand how to apply to this case.

 

Create a device dependency docs/DOC-3215

 

I need to create an alert  for a dependency device, Here I attached my example.

 

How to create an alert if device A is up but dependency device B is down.

I don't need an alert for each device or for condition: "if device A is down> device B

is down too..." Only an alert for dependency device B (is used ICMP) .


Any ideas?

 

Regards

Attachments:
  • chitambira Rank: Brown Belt 711 posts since
    Oct 15, 2008
    Currently Being Moderated
    1. Apr 28, 2010 10:17 AM (in response to German Zuccoli)
    Re: Device Dependency

    currently are u able to ping device B from zenoss?

    when you add device B to zenoss, it should have discovered that to get to B, you go thru A and this will be indicated in the "Routes" component of the OS tab.

    zPingMonitor is True by default for added devices, so if device B goes down, you will receive an alert to say device B is down, you dont need to do anything in this case.

    however if the route to B is not in routes, thats when you can have a situation where both A and B alert as down when only A goes down.

     

    if you cant ping device B, it means icmp is blocked along the way (possibly by the router) so you need to modify ACLs on the router to allow icmp both ways.

  • chitambira Rank: Brown Belt 711 posts since
    Oct 15, 2008
    Currently Being Moderated
    3. Apr 29, 2010 11:24 AM (in response to German Zuccoli)
    Re: Device Dependency

    Like i said, You can only reach B when A is up. so when B goes down (when A is up) the ping monitor will notice this and will generate a device down event. Now if you want to receive that alert, you put an alert rule for the specifi user who should receive the alert, with:

    Event State = New

    Severity >= Error

  • chitambira Rank: Brown Belt 711 posts since
    Oct 15, 2008
    Currently Being Moderated
    5. Apr 29, 2010 11:36 AM (in response to German Zuccoli)
    Re: Device Dependency

    To receive alert when B goes down (when A is up)

          Do as I described above

    To AVOID or SUPRESS (not to receive)   alerts when B goes down (and A is down)

          Use an event transform which implements dependency for example:

     

    if device.id == 'device_B':
        device_A = device.findDevice('id_of_device_A')
        if device_A.getPingStatus() > 0:
            evt.eventState = 2 # suppress or substitute this with line below to drop it
            evt.action = "drop"

    This supresses all events for device B when device A is down.

  • OneLoveAmaru Rank: White Belt 73 posts since
    May 30, 2011
    Currently Being Moderated
    7. Aug 29, 2012 2:27 PM (in response to chitambira)
    Re: Device Dependency

    I know this is an old post but this code no longer works with Zenoss 4.2.

     

    Problem with line 2: if device.id ==

     

    Anyone know what it needs to be now?

  • rolfs Rank: White Belt 27 posts since
    Jan 27, 2010
    Currently Being Moderated
    8. Aug 29, 2012 6:36 PM (in response to OneLoveAmaru)
    Re: Device Dependency

    Just a thought: Is the indenting correct? python scripts are quite strict on how the indenting of the lines are to get the right syntax.

     

    http://en.wikipedia.org/wiki/Python_syntax_and_semantics#Indentation

More Like This

  • Retrieving data ...

Legend

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