Example: Retrieve and modify notes in incoming events
To retrieve and modify notes in incoming events, perform the following steps:
Actions used in the example
- Trigger-If
- Variable
- Enrich
- Function
For more information about actions, see Actions-for-advanced-and-time-based-enrichment.
To define the event selection criteria
- Select Configuration > Event Policies and click Create.
- In the Event Selection Criteria, define a condition to select events from the EVENT class that contain the message "testApp".
The following image illustrates how the event selection criteria will look:
To learn how to construct the event selection criteria, see Creating-and-enabling-event-policies.
To build the policy workflow
On the Advanced Enrichment page, perform the following steps to build the policy workflow:
- Add the Trigger-If action by defining a condition, under the Trigger-If Settings, that checks whether the event status changes.
- To retrieve a note from an incoming event, add the Variable action to store the result of the GetNote function as the variable value. This function returns the timestamp, author, and content of the note.
- Now, from the note that you retrieved in the previous step, say, you want to fetch only the note content, add the Variable action to store the result of the ListGetElement function as the variable value.
- Add an Enrich action to enrich the event message and append the note content you retrieved in the previous step to the message.
- To modify a note by using the policy, add a Function action.
Results
The resulting policy workflow retrieves and modifies notes in incoming events as shown in the following image:
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*