Discussion:
device dependency
aletatone
2011-10-27 16:29:58 UTC
Permalink
aletatone [http://community.zenoss.org/people/aletatone] created the discussion

"device dependency"

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

--------------------------------------------------------------
Hi Gents,

I followed that one:

http://community.zenoss.org/blogs/zenossblog/2009/05/28/tip-of-the-month-event-suppression http://community.zenoss.org/blogs/zenossblog/2009/05/28/tip-of-the-month-event-suppression

if device and 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

but the trasform seems to be wrong with Zenoss 3.2.
Can anyone of you help me to fine the right one?

Thanks
Ale
--------------------------------------------------------------

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

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]
Shane Scott
2011-10-27 19:26:39 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: device dependency"

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

--------------------------------------------------------------
aletatone:

Try:

if device and device.location() == 'location_1' and device.id != 'test_router_1':
    dc1_router = device.findDevice('test_router_1')
    if dc1_router.getPingStatus() > 0:
        evt.eventState = 2

Best,
--Shane W. Scott(Hackman238)
  ZCA - http://community.zenoss.org/community/zca/blog http://community.zenoss.org/community/zca/blog
--------------------------------------------------------------

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

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]
aletatone
2011-10-28 10:05:05 UTC
Permalink
aletatone [http://community.zenoss.org/people/aletatone] created the discussion

"Re: device dependency"

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

--------------------------------------------------------------
I tried but it didn't work; I placed it in /Event/Status/Ping class

if device and device.location() == '/Ufo' and device.id != 'serverA':
    dc1_router = dmd.findDevice('serverA')
    if dc1_router.getPingStatus() > 0:
        evt.eventState = 2

I have 3 servers:

serverA, serverB and serverC (location= Ufo; device class=Server);
If serverA goes down I don't want to recieve alarms from the other two.
I tried to change the transform in this way:

if evt.DeviceClass == '/Server' and evt.device != '172.16.50.61':
    dc1_router = device.findDevice('172.16.50.61')
    if dc1_router.getPingStatus() > 0:
        evt.eventState = 2


Now if serverA goes down I correctly don't receive alarms from serverB and serverC.
That seems to be good, but now a strange thing happend.

If serverA goes up again, I still don't receive alarms from serverB and serverC so
I deleted the transform. But STILL don't receive any alarms then I restarted Zenoss too...
But still don't receive any alarm frmo serverB and serverC.

It looks like the transform is stuck somewhere.
To be honest it is not the first time in my zenoss experience that I suspect that transforms were stuck...

Any ideas?
Thanks
--------------------------------------------------------------

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

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]
aletatone
2011-10-28 13:20:56 UTC
Permalink
aletatone [http://community.zenoss.org/people/aletatone] created the discussion

"Re: device dependency"

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

--------------------------------------------------------------
pleeeeeaaaaaseeeeee!!!! :D
--------------------------------------------------------------

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

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]
Shane Scott
2011-10-31 13:20:24 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: device dependency"

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

--------------------------------------------------------------
aletatone:

In my opnion, transform based dependancy is best done by using transforms that condition off of the 'System' of a device. Build a heirachy of 'Systems', add devices to them then use the heirarchy to mass implement the dependancy transformation. It'll be time consuming to setup, however, it'll save you management cycles in the end.

Best,
--Shane W. Scott(Hackman238)
  ZCA - http://community.zenoss.org/community/zca/blog http://community.zenoss.org/community/zca/blog
--------------------------------------------------------------

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

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...