Map Kafka message payload attributes to alert fields
Map Kafka message attributes to alert fields to make alerts based on the messages more meaningful. Use event field mapping to map Kafka severity values to appropriate ServiceNow values.
Avant de commencer
Role required: evt_mgmt_admin
Pourquoi et quand exécuter cette tâche
Depending on your payload, Use event field mappings to provide more comprehensive information in an event alert by substituting values from the event field mapping rule into the event. Depending on your payload, transform information in events to populate specified alert field values and compose alert fields from various values to generate alerts for tracking and remediation. If needed, use both event field mappings and alert rules.
The following table compares a message received from a topic and a flattened payload in the event Additional info field. The message received from a topic is flattened as a single field and appears in the event Additional info field. Use these flattened messages to create event rules and mappings.
| Actual Payload inserted into a topic | Flattened payload in the Additional Info field |
|---|---|
|
|
Procédure
-
To
map the Kafka message attributes to the predefined alert fields to generate
alerts by creating event field mappings.
- Navigate to .
- In the Event Field Mapping window, select New.
- In the Name field, enter a name for the field mapping.
- In the Source field, enter Kafka Consumer.
- In the Mapping type field, select the appropriate mapping type
- For a list of the available mapping types, see Event Field Mappings.
-
To map the Kafka message attributes to the predefined alert fields to generate
alerts by creating event rules.
-
In the All Events screen, check whether any of the events from Kafka are in an
error state due to a missing event rule and provide missing rules.
Résultats
Your Apache Kafka consumer connector is configured. When new messages arrive into the Kafka topic, they are received into the ServiceNow instance as events, and alerts are then created from those events.