Event functions
Event functions are also known as void functions and do not return a value.
DropNewEvent
This function drops incoming events as they occur. After execution, the dropped events are not saved and are not available on the UI.
GenerateNewEvent
This function generates events for a specific event class. The following table lists the parameters and slots for the selected class that are displayed as inputs for the function. After execution, the generated event is displayed on the Events page.
Input
Input | Type | Description | |
---|---|---|---|
1 | Event Class | ENUM | Out-of-the-box or custom class for which you want to generate the event. Default: Event Note: The Anomaly event class is not supported. |
2 | Event Severity | ENUM | Severity for the generated event. Default: Minor |
3 | Event Priority | ENUM | Priority for the generated event. Default: Moderate |
4 | Source Hostname | String | Host name of the event provider. We recommend a character limit of 256 characters. |
5 | Message | String | Message that you want to include in the generated event. Use the % character to include slot placeholders. When the policy is applied, the placeholders are replaced with values from the incoming event. We recommend a character limit of 1024 characters. |
6 | Source Identifier | String | Unique event source identifier which can be used for associating the event with the Entity/CI. We recommend a character limit of 256 characters. |
7 | Mandatory and dedup slots | String, Integer, List of string, ENUM | Mandatory and dedup slots for the selected class. Dedup slots may or may not be mandatory. If you do not mention a value in dedup slots, a blank value is considered for enrichment. For more information on mandatory and dedup slots, see Slot-facets. For example: If you select the Alarm class, Alarm ID is displayed as a dedup slot which is a mandatory slot. If you haven’t set a default value for a slot in the event class definition, the function considers the slot value that you enter. The date and List of integer data types are not supported for slots. |
8 | Non-mandatory slots | String, Integer, List of string, ENUM | Choose additional slots to add in the generated event for the selected class by using the If you haven’t set a default value for a slot in the event class definition, the function considers the slot value that you enter. If you have set a default value for a slot in the event class definition, but you haven’t added the slot in the function. In this case, the default value for the slot is considered the slot value. Use the delete icon to delete the added slot. Once you add and save a slot from the list, the slot is disabled for selection. To enable the slot, delete and add it again. The date and List of integer data types are not supported for slots. |
To understand a use case for this function, see Example-Generate-events-to-check-application-availability.
AddOperationNote
This function adds a note in an incoming or existing event when an event is assigned, acknowledged, unacknowledged, closed, owned, declined, or prioritized. A note is a list of strings that contains information such as the timestamp, owner, and note content. The following table lists the parameters that are displayed as inputs for the function. After execution, the note is displayed on the Event Details page.
Input
Input | Type | Description | |
---|---|---|---|
1 | Operation name | ENUM | Indicates the following event operations:
|
2 | Note | String | Inserts a note that you want to include in the event. We recommend a character limit of 256 characters. You can specify the following value for this input:
|
To understand a use case for this function, see Example-Add-operation-note-for-event-assignment.
AddNote
This function adds a note in an incoming or existing event. The following table lists the parameters that are displayed as inputs for the function. The owner of the note is set to the event policy name. After execution, the note is displayed on the Event Details page.
Input
Input | Type | Description | |
---|---|---|---|
1 | Note | String | Inserts a note that you want to include in the event. We recommend a character limit of 256 characters. You can specify the following values for this input:
|
To understand a use case for this function, see Example-Add-notes-to-incoming-events-to-indicate-event-generation.
SetNote
This function modifies the note content for a specific note from a list of notes in an incoming or existing event. After execution, the modified note is displayed on the Event Details page.
Input
Input | Type | Description | |
---|---|---|---|
1 | Position | Integer | The sequence number of the note that you want to modify. Notes are numbered, starting from 1 for the oldest note. To modify the most recent note, specify the position as 0. If you specify an incorrect position, an exception message is displayed in the _errors slot for the event. |
2 | Note | String | The new text of the note that you want to set in the existing note of the event. We recommend a character limit of 256 characters. You can specify the following values for this input:
|
To understand a use case for this function, see Example-Retrieve-and-modify-notes-in-incoming-events.
LookupNodeDetails
This function fetches node details, such as node IP address, source, location, and so on, from BMC Discovery according to the Node ID (_node_id)slot and the topology lookup slots for an event class present in the incoming event. The fetched node details can further be used to enrich events. This function returns String or List of String node attribute values.
Input
Input | Type | Description | |
---|---|---|---|
1 | Node Attributes to fetch | List | Comma-separated list of node attributes that you want to fetch from BMC Discovery. To refer to node attributes in BMC Discovery, run the GET/data/nodes/{node_id} endpoint by using the _node_id value present in an existing event. For more information, see Endpoints in the REST API. The state attribute returned in the API response contains the node attribute details that you could specify for this input. The attributes can be specified by using standard JSON path conventions. For example, the following attribute list can be used to retrieve node attributes: ["kernel", "os", "model", "kind", "__all_ip_addrs[0]"] After the attributes are fetched, you can use these attributes as local variables in the function input by using the $NODE prefix to further enrich events. For example, $NODE. kernel and $NODE.os. |
To understand a use case for this function, see Example-Enrich-events-with-node-details.