Enterprise SNMP Integration with Zenoss

Zenoss is a fascinating new option for enterprise SNMP management systems. Not only is Zenoss a completely open source application, it is also written in pure Python. Zenoss is a new breed of enterprise application that is both incredibly powerful and extendable via an XML-RPC or ReST API. For more information on ReST, take a look at RESTful Web Services by Leonard Richardson and Sam Ruby (O'Reilly).

Finally, if you want to help develop Zenoss, you can contribute patches.

Zenoss API

For the latest information on the Zenoss API, please visit http://www.zenoss.com/com munity/docs/howtos/send-events/.

Using Zendmd

Not only does Zenoss come with a robust SNMP monitoring and discovery system, it also includes a high-level API called zendmd. You can open up a customized shell and run commands directly against Zenoss.

Using zendmd:

>>> d.os.interfaces.objectIds()

>>> for d in dmd.Devices.getSubDevices():

Device API

You can also communicate directly with Zenoss via an XML-RPC API and add or remove devices. Below are two examples.

Using ReST:

wget 'http://admin:[email protected]:8080/zport/dmd

/ZenEventManager/manage_addEvent?device=MYDEVICE&component=MYCOMPONENT&summary=^ MYSUMMARY&severity=4&eclass=EVENTCLASS&eventClassKey=EVENTCLASSKEY

Using XML-RPC:

>>> from xmlrpclib import ServerProxy

>>> serv = ServerProxy('http://admin:[email protected]:8080/zport/dmd/ZenEventManager') >>> evt = {'device':'mydevice', 'component':'eth0', 'summary':'eth0 is down','severity':4, 'eventClass':'/Net'} >>> serv.sendEvent(evt)


Was this article helpful?

0 0

Post a comment