TECHZEN Zenoss User Community ARCHIVE  

Change production state from transform

Subject: Change production state from transform
Author: [Not Specified]
Posted: 2016-01-27 03:12

I am looking for a simple way to trigger device production state change from event transform. My original need is to change device state from decommissioned to production everytime particular trap sent from the device is received. My Zenoss version (please bear with me) is 2.5.1
I tried something like

d=dmd.Devices.findDevice(evt.device)
if d and d.id == 'foo' and d.productionState=-1:
d.productionState=1000

but this does not work, maybe because it is left uncommited, and I could not find a way to produce here the commit() that I am doing in zendmd for the same thing to take effect.

In advance, thanks for your help, and sorry if this is the wrong place for asking this question.



Subject: 2.5.1 is _VERY_ old, and
Author: Andrew Kirch
Posted: 2016-01-29 12:42

2.5.1 is _VERY_ old, and almost entirely unsupported. I strongly recommend upgrading to 4.2.5 and setting up a testing instance for 5.x as well.

Andrew Kirch

akirch@gvit.com

Need Zenoss support, consulting or custom development Look no further. Email or PM me!

Ready for Distributed Topology (collectors) for Zenoss 5 Coming May 1st from GoVanguard



< Previous
Delete Dashboard from Command Line
  Next
Zenoss Core 5 - Zenoss service status how to
>