Best way I've found to do it is using a rest call:

A simple REST call when someone calls "reimage" will set the device's
production state: (Maintenance = 300)
wget
http://admin:passw...@zenhost:8080/zport/dmd/Devices/Server/Linux/devices/server_name/manage_editDevice?productionState=300<http://admin:[email protected]:8080/zport/dmd/Devices/Server/Linux/devices/mon02.ops.sjc1.metaweb.com/manage_editDevice?productionState=350>

When finished another simple call can be made to return the device to
"production":  (production = 1000)
wget
http://admin:passw...@zenhost:8080/zport/dmd/Devices/Server/Linux/devices/server_name/manage_editDevice?productionState=1000<http://admin:[email protected]:8080/zport/dmd/Devices/Server/Linux/devices/mon02.ops.sjc1.metaweb.com/manage_editDevice?productionState=1000>


-trey

On Mon, Jan 12, 2009 at 2:58 PM, stugreen <[email protected]> wrote:

> Is there an API call or a way to script or automate the change in
> production state for a given server or class of devices?  When we deploy our
> new software we have a program that manages the process. It moves web pages,
> takes down services on various machines, etc.  We would like to be able to
> put our production environment into maintenance mode within Zenoss from
> within this program and then put it back to production mode again, through
> this program when our work is complete.
>
> If there is no API call, is there any documentation about which queries
> would need to be run or trigger run or whatever within mysql to affect the
> change in state?
>
> Thanks
>
>
>
>
> -------------------- m2f --------------------
>
> Read this topic online here:
> http://forums.zenoss.com/viewtopic.php?p=29915#29915
>
> -------------------- m2f --------------------
>
>
>
> _______________________________________________
> zenoss-users mailing list
> [email protected]
> http://lists.zenoss.org/mailman/listinfo/zenoss-users
>
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to