System Dump Specification
Subscribe

From OpenNMS

Jump to: navigation, search

Contents

Summary

It can be difficult to support users without getting a detailed amount of information first. The goal is to create a framework for exposing various data that is useful to support, and dumping it to a format that makes it easy for support (or people on the mailing list) to help debug issues.

Strategy

  • Create an interface for exposing debug data
  • Create an API (using the ServiceRegistry) for accessing the debug data plugins
  • Create tools for taking debug data and dumping it to: ReST, email, a file, etc.

Output Formats

STDOUT 
dump data as text to the screen
ReST 
expose data as JSON/XML to ReST
email 
send the data as an email (text or XML format)
file 
write the data as text or XML to a file
FTP 
upload the dumped data to an FTP URL

UI

Web

Create a web UI for performing a STDOUT, email, or file export.

Command-Line

Create a command-line tool for performing a STDOUT, email, or file export.

Format

The command-line tool should allow specifying the output format, compression options, and which plugins are available.

 $ system-dump.sh --list-plugins
 Java: Java and JVM
 OS: Kernel, OS, and Distribution
 OpenNMS: OpenNMS Core, Version, and Basic Configuration
 Configuration Files: The Contents of OpenNMS's Configuration Files
 $ system-dump.sh --format=plain --use-plugins="Java,OS,Configuration Files"
 Java:
   Class Version: 50.0
   Compiler: null
   Home: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
   VM Name: Java HotSpot(TM) 64-Bit Server VM
   VM Version: 16.3-b01-279
   Vendor: Apple Inc.
   Version: 1.6.0_20
 Operating System:
   Architecture: x86_64
   Name: Mac OS X
   Version: 10.6.4
 $ system-dump.sh --format=zip --plugins=Java --output=system-dump.zip
 $ unzip -l system-dump.zip
 Archive:  system-dump.zip
   Length     Date   Time    Name
  --------    ----   ----    ----
    324943  10-09-10 05:21   Java.xml
  --------                   -------
    324943                   1 files

Plugins

  • Java/JVM Information
    • memory
    • version
  • OS Information
  • OpenNMS Information
    • version
    • build (if applicable)
    • nodes, interfaces, etc.
  • Thread Dump
  • Logs
  • PS/Top Output
  • lsof Output
  • Configuration Files
  • Capsd Information
  • Poller Information
  • Provisiond Information
  • Event Information
  • Alarm Information
  • Notifications Information
  • Queued Information
  • SNMP Walk

Acceptance Criteria

C: Basic Dump Capability

  • Java/JVM
  • OS
  • OpenNMS
  • Configuration
  • Thread Dump
  • PS/Top Output
  • lsof Output
  • Logs

The user should be able to run a command on the command-line and get the full output of (at least) these plugins, as an XML file which they can send to us.

 $ system-dump.sh --format=xml
 [ ... xml output ... ]

B: Extra Plugins

The remainder of the plugins should be implemented, with as much in-depth information as possible. Also, the command-line version should be feature-complete (XML & plain text support, zip file support, command-line options to specify).

A: Web UI and Querying

It should be possible to export/email the data through the web UI, and for the user to potentially select which plugins to send. The plugins should also be categorized so that you can select a collection of plugins associated with (performance, device issues, etc.)