Thanks Chet,
The pointer that you gave me really helpful. Following this link:
http://www.zenoss.com/community/docs/zenoss-api-docs/2.2/, I now manage to
identify the steps that should be taken within zendmd.
Testing with one device first:
Manual UI way:
1- Go to device page
2- Click Manage -> Reset IP & Leave blank to use DNS (which will get new IP
from DNS)
3- Go to Device Events & Acknowledge/push the red alert events to
history
4- Clear Heartbeats
5- Push changes
6- Remodel the device.
Zendmd way:
1- find('clf*')
Returns:
<Device at /zport/dmd/Devices/Server/Dumas/devices/clfantasy.dyndns.org>
d = find('clf*')
2- d.getManageIp()
'xx.xx.2.183' <--- OLD IP
d.setManageIp()
'xx.xxx.48.189' <--- NEW IP from DNS
commit()
3- I dont see what class should I used to push red alert event down to history,
perhaps the Zen Master could enlighten me on this one. [Wink]
d.????
4- Clear Heartbeats
d.manage_deleteHeartbeat() <--I'm not sure about this since run this returns
error which is shown below:
>>> d.manage_deleteHeartBeat()
Traceback (most recent call last):
File "<stdin>", line 1, in ?
AttributeError: manage_deleteHeartBeat
5- Push changes
d.pushConfig()
6- Remodel the device.
d.collectDevice()
Refreshing my zenoss page, I can see the the IP has change, everything green
coming back again EXCEPT the red alert event still inside the Event tab since
I haven't do anything about that one inside the zendmd.
Thanks Chet!! Really appreciate it.. If only you can tell me what class to use
to push the red event down to history... that will make much more cool! I start
to like zendmd now..
Okay, with my limited knowledge in Python, I will now try to write some script
for mass-resetting devices DNS.. [Idea]
-------------------- m2f --------------------
Read this topic online here:
http://community.zenoss.com/forums/viewtopic.php?p=24829#24829
-------------------- m2f --------------------
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users