In ENA, events include a standard set of attributes, e.g. source, name, severity. Please see this article for further information on the standard event attributes.
You can add additional attribute information to the event and store it in the database. The below example demonstrates how to add additional information to the event by adding a location to the Port Speed Change event. It involves the following stages:
- creation of a Pre Storage Generic processing stage and rule.
- Event Type Test matching on the Port Speed Change event type.
- a new database attribute to hold the location of a port.
- Groovy script that navigates the ENA type hierarchy to identify a port's location, through attributes held against its device:
To define a rule that adds a location to the Port Speed Change event:
- Click Main Menu and then Administration. This will open the Administration page.
- Click Event Administration. On the Event Administration page, click the Rules tab.
- On the left, click Pre Storage and then click Add Processing Stage.
- In the Add Processing Stage window, define the stage with the Name of 'Enrichment' and a Description of 'Add new attributes to events.' Click OK to save.
- Select the Enrichment processing stage from the list of processing stages, and then click Add Rule.
- Set the Type to 'Generic', and enter a meaningful Name and Description to the rule.
- Set Condition to 'All tests must succeed'.
- Add an Event Type Test that matches on Port Speed Change.
- Add an Action Step:
- Type set to 'Set Attribute'
- Attribute set to 'New Attribute'. For the New Custom Event Attribute, enter a Name, set Storage to 'Database', and enter a Description. Click OK.
- Value, enter:
- Click OK to save the action step.
- Click OK to save the rule.
- Save and deploy the new event project.