Zenpackers Documentation Zenoss, Inc
Total Page:16
File Type:pdf, Size:1020Kb
ZenPackers Documentation Zenoss, Inc. Dec 10, 2018 Contents 1 Welcome to Zenoss 1 1.1 Setup Your GitHub Credentials.....................................2 1.2 Setup SSH Keys.............................................2 1.3 ZenPack Development..........................................2 1.4 Installing Zenoss 4.2.X..........................................3 1.5 Upgrading Zenoss 4.2.X.........................................3 1.6 Installing Zenoss 5.X...........................................3 1.7 Europa 5.X Design:...........................................3 1.8 Monitoring Targets............................................4 1.9 Other Documentation..........................................4 1.10 Recommended Linux apps (Anonymous)................................4 1.11 Recommended MAC apps (Anonymous)................................4 2 Zenpackers Documentation 7 2.1 Description................................................7 2.2 Motivation................................................7 2.3 How to Contribute to Zenpackers: Sphinx-Doc.............................7 2.4 Important Security Information.....................................9 3 Zenpack Troubleshooting and Triage 11 3.1 ZenPack Troubleshooting and Triage.................................. 11 4 Topics for Zenpack Administration 23 4.1 Commandline Monitoring For Slackers (ZP Developers)........................ 23 4.2 Databases and Rabbits.......................................... 24 4.3 Attribute Errors and Other Oddities................................... 29 4.4 Dealing with Bad Relations in ZODB.................................. 30 4.5 RRD Topics............................................... 31 4.6 Third Party Licensing Agreements.................................... 34 4.7 Jenkins.................................................. 34 4.8 Zenpack Versioning Guidelines..................................... 36 4.9 Zenpack Release Notes.......................................... 37 4.10 The MediaWiki Site........................................... 42 4.11 HotFix Release Notes.......................................... 43 4.12 L3 Support Process............................................ 47 4.13 Daemons & Debugging......................................... 48 4.14 Zenwipe.sh: Erase Everything but Core................................. 53 i 4.15 Zendmd Examples............................................ 55 4.16 Parsing an Objects.xml file using JQ................................... 58 4.17 Converting to the new Catalog...................................... 59 4.18 RST Sample............................................... 60 5 General Zenpack Development 63 5.1 File Locations.............................................. 63 5.2 General Considerations......................................... 65 5.3 Event Management............................................ 65 5.4 Special Events and Their Consequences................................. 88 5.5 Event Classes............................................... 91 5.6 GUI Properties and JavaScript Related Methods............................ 100 5.7 Impact Guide............................................... 107 5.8 DynamicVeiw Topics........................................... 123 5.9 Modeling for Zenpacks: Selected Topics................................ 126 5.10 Collection: General Concepts...................................... 138 5.11 Datasources in Detail........................................... 143 5.12 Graphs.................................................. 145 5.13 ZenPython (PythonCollector) Topics.................................. 145 5.14 ZenPack Security............................................. 147 5.15 Reserved Words in Zenoss Modeler................................... 148 5.16 Solr Catalogs (ModelIndex) Review................................... 159 6 Special Zenpack Development Topics 161 6.1 Analytics Bundle Topics......................................... 161 6.2 Catalog Tool............................................... 178 6.3 Migration Guide for Slackers...................................... 181 6.4 Monkey Patching in ZenPacks...................................... 188 6.5 Templating Topics............................................ 189 6.6 Unit Testing Rough Guide........................................ 200 6.7 ZEP Topics................................................ 208 6.8 Bread and Butter: A Quick Primer on Pickles.............................. 208 7 Topics for ZenpackLib 211 7.1 Welcome to ZenPack Library...................................... 211 8 Topics for ControlCenter (ControlPlane) 229 8.1 Welcome to ControlCenter!....................................... 229 8.2 Setup and Configuration......................................... 232 8.3 Zenpack Development.......................................... 240 8.4 Special Topics: ControlCenter and Others................................ 253 9 Topics for OpenStack Group 261 9.1 Welcome to the OpenStack Group!................................... 261 9.2 Setup and Configuration......................................... 261 10 Pythonic Topics: 263 10.1 Regular Expression............................................ 263 10.2 Understanding Twisted.......................................... 264 10.3 Tab Completion in Python........................................ 265 10.4 PDB Tricks................................................ 265 11 Cisco General: 267 11.1 Cisco Background Information..................................... 267 ii 12 Other Topics: 285 12.1 Ansible Rough Guide.......................................... 285 12.2 Git for Gits ;)............................................... 288 12.3 Git and Code Reviews: Keeping History Clean ............................ 295 12.4 Git-Flow................................................. 296 12.5 Installing a VIM IDE setup with Synstastic............................... 303 12.6 DB2 Information for Scavengers..................................... 304 12.7 Convenience Tools............................................ 311 12.8 Simulate devices............................................. 313 iii iv CHAPTER 1 Welcome to Zenoss Hail Might ZenPacker, Welcome to Zenoss. I will be your website spirit-guide. Here are the basics: • Wunderground Austin Weather: http://www.wunderground.com/US/TX/Austin.html • Austin Traffic: http://goo.gl/hlZvsE • Google: – Mail: http://mail.google.com (You can use pop/imap clients too) – Calendar: https://www.google.com/calendar • Slack Channels (We use it heavily): – Solutions – ZenPackers Lounge (ZenPack Technical Topics) – Zia (General Technical Topics) – Engineering (Platform Topics) – Zenoss Austin – Zenossians (Social) – Zenpack Code Review – Developer Code Review Requests • IRC (Server, Channel) – (freenode, #zenoss) – (freenode, #python) • Rally https://rally1.rallydev.com • Jira: https://jira.zenoss.com 1 ZenPackers Documentation • Github Repo: https://github.com/zenoss/ • Jenkins for Solutions: http://jenkins.zenosslabs.com • Evernote: https://www.evernote.com/ 1.1 Setup Your GitHub Credentials Important: Make sure the one of the first things you do when you setup your development system is to setup your github credentials and identifying username and email. This is to assist in tracking and documenting development history: git config-- global user.name"Jane Smith" git config-- global user.email"[email protected]" 1.2 Setup SSH Keys You probably want to setup SSH keys to authenticate to Github. If so: 1.2.1 Setup Your SSH Keys on Linux You first need a key. Generate one as follows: ssh-keygen-t rsa If you have a passphrase you can setup Keychain as per • https://wiki.gentoo.org/wiki/Keychain 1.2.2 Setup Your SSH Keys on OSX First create an SSH key: ssh-keygen-t rsa To add your key to keychain (because you used a passphrase): ssh-add-K~/.ssh/id_rsa 1.3 ZenPack Development • Start Here: http://zenpacklib.zenoss.com • Next: http://docs.zenosslabs.com • IDE’s (Integrated Development Environments): – SublimeText (very popular): http://www.sublimetext.com/2 2 Chapter 1. Welcome to Zenoss ZenPackers Documentation – Intellij PyCharm (popular in Platform group): http://www.jetbrains.com/pycharm/download/ – Vim: https://github.com/scrooloose/syntastic – Komodo: http://komodoide.com/ • Useful glossary of Zenoss-related terms. http://www.zenoss.com/documents/zenoss-dosss.pdf • ZenPack Standards Guide: http://docs.zenosslabs.com/en/latest/zenpack_standards_guide.html • ZenPack Development Guide: http://docs.zenosslabs.com/en/latest/zenpack_development/index.html Step-by-step guide to building a fairly complex ZenPack for modeling and monitoring a custom device using SNMP. 1.4 Installing Zenoss 4.2.X Several methods exist for installing Zenoss 4.2.X • General: : http://wiki.zenoss.org/Install_Zenoss • Debian: http://www.pietervanos.net/knowledge/debian-7-install-zennos-monitoring/ • Various Platforms: http://hydruid-blog.com/?p=710 1.5 Upgrading Zenoss 4.2.X Zenup is a 4.X updating system for Zenoss. • ZenUp: http://wiki.zenoss.org/ZenUp 1.6 Installing Zenoss 5.X • http://wiki.zenoss.org/Zenoss_Core_5_Alpha/Download • CP-Alpha: https://github.com/zenoss/serviced/wiki/Starting-CP-Alpha • CP-Alpha: https://github.com/zenoss/serviced/wiki/_pages • ZenDev: http://zenoss.github.io/zendev/ 1.7 Europa 5.X Design: • http://goo.gl/X0Mqx9 1.4. Installing Zenoss 4.2.X 3 ZenPackers Documentation 1.8 Monitoring Targets This is a potentially useful page when looking for monitoring targets we may already have setup. https://sites.google.com/a/zenoss.com/qa/home/qa-knowledge-base/qa-monitoring-targets 1.9 Other Documentation