This documentation supports the 11.1 version of BMC Discovery.

To view an earlier version of the product, select the version from the Product version menu.

Using external events

An event source is a collector of events that you can use to trigger a pattern and consequently perform some tasks. An example of an event source is the built-in vCenter event source. You can also define generic event sources which are collectors for defined events. Once the event source is configured, you can use the REST API to POST an event to the event source.  When an event is received, you can use them to trigger patterns to perform tasks.

The following topics are covered:

To create an event source

  1. From the main menu, click the Administration icon.
    The Administration page is displayed.
  2. In the Discovery section, click Event Sources.
  3. Click Add Event Source.
    The Add Event Source page displays.
  4. In the Name field, enter a name for the event source. The name is used as a parameter for posting events.
  5. In the Description field, enter a description for the event source.
  6. Select a period for event removal. In practice, use a shorter period for a chatty system, and a longer period for a less chatty system.
  7. Select Enabled to enable the event source.
  8. Click Apply to apply the changes.

To edit an event source

  1. In the Event Source table, perform any of the following steps as required for the specific event source that you want to edit:
    • To reset an event count, in the Event Sources row, click Actions > Reset Count.
      This resets the count to zero. You might need to perform this step to analyze and determine the number of events that are generated from a source within a set period of time.
    • To update other parameters for the event source, in the Event Sources row, click Actions > Edit.
      The Edit Event Source page is displayed.

To post an event to the event source

Use the REST API to POST an event to the event source. You can use the Swagger UI while testing, or a program or script. See REST API for more information.

To post to the event source, you must have the api/event_source permission. You can use the Event Source template to create a user with this permission.

POST the JSON formatted event to /api/v1.0/events. For example:

  "source": "string - name of event source",
  "type": "string – type of event",
  "params": {"event_detail": "Some useful info", 
             "event_detail2": "Some more info"}  // optional parameters

The event type is the trigger for the pattern.

Write a pattern that triggers on the event type

Write a pattern that performs the tasks required. Use a triggers block of the following form:

        on event := ExternalEvent created where
                            type in [ "EventType1",
                                      "FurtherEventType" ];
    end triggers; 

External event considerations

External events are consolidated from a scanner to consolidation appliance. If the event source does not exist on the consolidator, it is created.

If you disable an event source, it cannot receive events from the local appliance, it causes an error. However, if you disable an event source on a consolidation appliance, it can receive events from a scanning appliance.

If you post to a non-existent event source, it causes an error.

For each external event posted, the system creates an ExternalEvent node.

Related topics

Was this page helpful? Yes No Submitting... Thank you