Preprocess
The preprocess mapping uses an xpath expression to separate a message into multiple messages. This mapping is the first one to be applied. The attributes that need to be set in a preprocess mapping are:
Attribute | Required | Description |
---|---|---|
from | Y | Defines the field name before mapping. To indicate the key needs to be preprocessed, it needs to include the suffix "[*]" |
to | Y | Defines the field name after mapping. |
precedence | N | Defines the precedence used when mapping. |
Function type | Y | Defines the function type of the mapping. Needs to be "Message functions". |
Function | Y | Defines the type of mapping. Needs to be "Preprocess". |
The following example has one message with a result array in it. The preprocess mapping splits this message into multiple messages at the result element.
Image 1. Zabbix mapper with a preprocess mapping and other mappings.
To test the mapper, wait a few seconds until the preprocess is applied. Then, use the Message section to view a test result message. The Test message (source message) will show an already preprocessed message.
The message before preprocessing (as gotten from Zabbix):
First message after preprocessing:
Second message after preprocessing: