Apr 30, 2009 1:38 PM
dependencies... again!
-
Like (0)
if getLocationName == '/datacenter1':
dc1_router = device.findDevice('router_in_dc1')
if p1n_router.getPingStatus() > 0:
evt.eventState = 3
if device.id == 'router_in_dc1':
evt.eventState = 5
_______________________________________________
Well I am tired of getting alerts that an entire datacenter's worth of devices are down when its just a dropped vpn tunnel...
we have multiple locations (/dc1, /dc2 ... /dc10 etc) and then sub locations defined under that (/dc1/rack5 etc). one firewall or router per /dcX is handling the vpn web.
now every time there's a hickup in a vpn tunnel... you get the picture
so here is what i have so far:
Code:
if getLocationName == '/datacenter1':
dc1_router = device.findDevice('router_in_dc1')
if p1n_router.getPingStatus() > 0:
evt.eventState = 3
if device.id == 'router_in_dc1':
evt.eventState = 5
it however doesnt work. if it did; we would just get a singular alert (for the router in question and not for every device behind it as well)...
any ideas how this can be fixed or some other work around?
thanks.
_______________________________________________
zenoss-users mailing list
zenoss-users@zenoss.org
http://lists.zenoss.org/mailman/listinfo/zenoss-users
_______________________________________________
its actually right out of zenoss wiki on dependencies (look here: http://www.zenoss.com/Members/netdata/create-a-device-dependency/)
tried to modify it to fit the situation by using locations rather than per device
_______________________________________________
zenoss-users mailing list
zenoss-users@zenoss.org
http://lists.zenoss.org/mailman/listinfo/zenoss-users
if device.location().id == 'location_1' and device.id != 'test_router_1':
dc1_router = device.findDevice('test_router_1')
if dc1_router.getPingStatus() > 0:
evt.eventState = 2
_______________________________________________
A quick note on the difference between eventState and severity. severity (0-5) maps to Critical, Warn, etc. eventState (0,1,2) maps to New, Acknowledged, Suppressed. I think what you're looking for would be along the lines of:
Code:
if device.location().id == 'location_1' and device.id != 'test_router_1':
dc1_router = device.findDevice('test_router_1')
if dc1_router.getPingStatus() > 0:
evt.eventState = 2
chip
zenoss
_______________________________________________
zenoss-users mailing list
zenoss-users@zenoss.org
http://lists.zenoss.org/mailman/listinfo/zenoss-users
if device.location().id == 'Peer1' and device.id != 'v60-WWW1':
dc1_router = device.findDevice('v60-WWW1')
if dc1_router.getPingStatus() > 0:
evt.eventState = 2
if device.location().id == 'Puretracks' and device.id != 'x5505e-260King':
dc2_router = device.findDevice('x5505e-260King')
if dc2_router.getPingStatus() > 0:
evt.eventState = 2
if dc1_router.getPingStatus() > 0:
heres what im using exactly...
this transform is on /EVENTS/STATUS/PING
Code:
if device.location().id == 'Peer1' and device.id != 'v60-WWW1':
dc1_router = device.findDevice('v60-WWW1')
if dc1_router.getPingStatus() > 0:
evt.eventState = 2
if device.location().id == 'Puretracks' and device.id !=
'x5505e-260King':
dc2_router = device.findDevice('x5505e-260King')
if dc2_router.getPingStatus() > 0:
evt.eventState = 2
locations are as follows:
/Peer1/Rack80
/Peer1/Rack81
/Peer1/Rack83
/Puretracks/B100
/Puretracks/B204
v60-www1 is in /Peer1/Rack80 but i want it as dependency for that
entire DC
x5505e-260King is in /Puretracks/B100 but again I need this to be
the dependency for all the nodes in this building, not just B100.
_______________________________________________
zenoss-users mailing list
zenoss-users@zenoss.org
http://lists.zenoss.org/mailman/listinfo/zenoss-users
Follow Us On Twitter »
|
Latest from the Zenoss Blog » | Community | Products | Services Resources | Customers Partners | About Us | ||
Copyright © 2005-2011 Zenoss, Inc.
|
||||||||