Archived community.zenoss.org | full text search
Skip navigation
Currently Being Moderated

Zenoss/MindTouch Mashup

VERSION 2  Click to view document history
Created on: Apr 29, 2010 6:07 PM by Matt Ray - Last Modified:  Apr 29, 2010 6:17 PM by Matt Ray

The Zenoss/MindTouch mashup places live data from a Zenoss installation in the context of MindTouch wiki pages for taking configuration notes and other possible future mashups. It pulls Zenoss device lists and events and creates dynamic wiki pages for the individual devices, populated them with information from Zenoss and you can add notes and attach files as needed. Dynamic links are created between Zenoss and MindTouch, so you can jump back and forth between the applications. Many sysadmins keep a wiki around for tracking their changes to their systems, now you can put some live data in there! Check it out, customize it, submit patches, use it however you like.

 

http://sourceforge.net/projects/zenossdeki/

 

 

The mashup requires installing Python scripts on the Zenoss installation and linking to those scripts in the MindTouch code.  The Python scripts are fairly simple and could be expanded to include more useful information, they currently query the dmd and build HTML blocks for inclusion in the MindTouch wiki.

 


From the README.txt

 

TO INSTALL THE ZENOSS PYTHON SCRIPTS:

 

getMyDeviceList.py

 

1) Login to Zenoss as "admin" and go to the URL http://yourhost:8080/zport/dmd/Devices/manage
2) From the pull-down menu on the top-right, select Script (Python)
3) Enter "getMyDeviceList" in the Id field.
4) Select "Browse..." and find the zenoss/getMyDeviceList.py script
5) Select "Add"
6) You may now reach the URL http://yourhost:8080/zport/dmd/Devices/getMyDeviceList and see a raw list of devices.

 

getDekiDevice.py

 

1) Login to Zenoss as "admin" and go to the URL http://yourhost:8080/zport/dmd/Devices/manage
2) From the pull-down menu on the top-right, select Script (Python)
3) Enter "getDekiDevice" in the Id field.
4) Select "Browse..." and find the zenoss/getDekiDevice.py script
5) Select "Add"
6) You may now reach the URL http://yourhost:8080/zport/dmd/Devices/getDekiDevice?id=id_of_yourdevice and see a raw HTML block with a bunch of fields from your device.  Note the passing of the parameter id with the value of the device name.

 

getDekiDevices.py

 

1) Login to Zenoss as "admin" and go to the URL http://yourhost:8080/zport/dmd/Devices/manage
2) From the pull-down menu on the top-right, select Script (Python)
3) Enter "getDekiDevices" in the Id field.
4) Select "Browse..." and find the zenoss/getDekiDevices.py script
5) Select "Add"
6) You may now reach the URL http://yourhost:8080/zport/dmd/Devices/getDekiDevices and see a raw HTML block listing your devices.

 

getDekiEvents.py

 

1) Login to Zenoss as "admin" and go to the URL http://yourhost:8080/zport/dmd/ZenEventManager/manage
2) From the pull-down menu on the top-right, select Script (Python)
3) Enter "getDekiEvents" in the Id field.
4) Select "Browse..." and find the zenoss/getDekiEvents.py script
5) Select "Add"
6) You may now reach the URL http://yourhost:8080/zport/dmd/ZenEventManager/getDekiEvents and see a raw list of devices.

 

You should know be able to hit the corresponding URLs with your browser (i.e. Firefox, Safari) or via command line (i.e. curl, didn't test with wget).

 

TO ADD LINKS FROM THE ZENOSS DEVICES BACK TO THE WIKI

 

1) Click on "Devices" on the left pane of your Zenoss installation.
2) Click on "zProperties"
3) In the "zLinks" property, enter this block of HTML, replacing the "yourwiki" to match your MindTouch installation:
   <a href="http://yourwiki/Devices?id=${here/id}">MindTouch</a>

 


TO INSTALL THE MINDTOUCH SCRIPTS:

 

Login to the MindTouch installation as "Admin"

 

Install the Zenoss CSS

 

1) Select Tools->Control Panel
2) Click "Customize"
3) Click "Custom CSS"
4) Select "Upload CSS file" and choose "Append"
5) Browse to your $ZENHOME/zenoss/Products/ZenEvents/skins/zenevents/ and select the zenevents.css file.
6) Click "Save Changes"
7) Click "Return to MindTouch"

 

template_Device_Notes.deki

 

1) Select Tools->Templates
2) Click on "New Page"
3) Click on "Source"
4) Delete the placeholder content.
5) Paste in the contents of deki/template_Device_Notes.deki
6) Click on "Source"
7) Click on "Save"
8) Click on "mindtouch" to go back to the base url.

 

Dashboard.deki

 

1) Click on "New Page"
2) Click on "Source"
3) Delete the placeholder content.
4) Paste in the contents of deki/Dashboard.deki
5) Replace the value of the baseurl "yourmachine" to match your Zenoss installation. (3 occurrences)
6) Replace the values of the "admin:zenoss" with your "user:password" to log in to your Zenoss installation. (2 occurrences)
7) Click on "Source"
8) Click on "Save"

 

Devices.deki

 

1) Click on "New Page"
2) Click on "Source"
3) Delete the placeholder content.
4) Paste in the contents of deki/Devices.deki
5) Replace the value of the baseurl "yourmachine" to match your Zenoss installation. (4 occurrences)
6) Replace the values of the "admin:zenoss" with your "user:password" to log in to your Zenoss installation. (4 occurrences)
7) Click on "Source"
8) Click on "Save"

 

At this point the Zenoss Dashboard page should have live data being pulled from the getDekiDevices and getDekiEvents scripts.  You can click on the links under "Zenoss" or "Wiki" to go to the device in Zenoss or the wiki page for it.  If you select one of the wiki links, you will get a wiki device page with live Zenoss data and the option of adding your own notes (the template provides some ideas).

 


BRAINSTORMING IDEAS:

  • One of the nice side-effects of MindTouch keeping the source restricted is that you can embed usernames and passwords and use MindTouch as a read-only Zenoss dashboard.
  • Exporting Zenoss reports or other custom dmd queries directly into MindTouch.
  • Grabbing the Google Map from Zenoss and embedding it in MindTouch.
  • Grabbing RRD graphs and embedding it in MindTouch.
  • Adding/deleting devices, locations, groups, systems from MindTouch.
  • Mashing up Zenoss' CMDB information like service tag numbers into MindTouch and creating links straight into the vendor (ie. Dell or IBM).
  • Mashing up Zenoss, MindTouch and other IT management applications (ie. nfsen or Puppet).


KNOWN ISSUES:

  • For some reason Device pages stop updating the events once there is a note added to a device wiki page.
  • Editing the notes on a wiki page and saving sends you back to the note, instead of the device page with the note embedded.
  • MindTouch caches the Zenoss data, so response time is a bit slow at times.
  • The hard-coding of URLs within the pages and credentials is sloppy, more variables would help.
  • Better formatting and cleaning up the pages in general would be nice.
  • The device data could be arranged better or more relevant information could be pulled.
Comments (0)

More Like This

  • Retrieving data ...

More by Matt Ray