4. Generating and Sending a Test Event

You can use Zenoss to to add an artificial event to the event database to test your setups and mappings. To add a new event:

  1. From the left navigation menu, select Events.

    The Events/Classes tab appears.

  2. Open the Events page menu and select Add Event.

    The Add Event Screen appears.

    Figure 10.6. Add Event Dialog

    Add Event Dialog

  3. Fill out the fields according to the kind of event you want to send. The following fields are available:

    • Message

    • Device

    • Component

    • Severity

    • Event Class Key

    • Event Class

  4. Click the OK button.

    The Event Console appears with your event at the top.

4.1. Sending Events from the Command Line

Zenoss allows you to send events TO Zenoss using a comman line tool. This script only relies on python, so it can be moved easily to other systems. zensendevent uses the following options:

Usage:

zensendevent [options] summary words

Options:

  • -d, --device

    The local fully-qualified domain name

  • -p, --component

    Component from which this event is sent.

  • -s, --severity

    Severity of this event: Critical, Error, Warn, Info, Debug, Clear. Default: Warn

  • -c, --class

    Event class for this event

  • --port

    xmlrpc server port. Default: 8081

  • --server

    xmlrpc server. Default: localhost

  • --auth

    xmlrpc server auth. Default: admin:zenoss

Example:

zensendevent -c /App/Fail -p sky -s Critical Onos\! very bad message\!