Gateway configuration value mapping
For some destinations, it is necessary to map values from a cell domain to a gateway domain. You can implement value mapping by defining a map table and using the value mapping function.
You define a value map table using the parameter map suffixed with the name of the map table.
map.name=[original_value=converted value,original_value=converted value, etc.]}
name represents the name you give the map table; original_value is the value to be replaced and converted_value is the replacement value.
You convert a value applying a map table, by using the variable $MAP.
$MAP.name(value)
If the specified value cannot be found in the map table, it is not replaced.
For example: You want to modify the value of the enumeration SEVERITY when it is sent to a certain gateway. A WARNING value is replaced with LOW, and value CRITICAL with URGENT.
To do this, create a map table to define the required mapping:
All other values of SEVERITY are passed unchanged.
To actually replace the values of slot severity, the slot has to be dropped and a new slot, with the same name, has to be added, mapping the value:
Example of printed events
To print events in BAROC format, set the parameters as shown in the following figure.
Parameters used to print event in BAROC format
body=\t$NAME=$VALUE;\n
term=END\n
The BAROC format produces output similar to the example shown in the following figure.
Example of printed events
server_handle=0;
date_reception=1010183001;
event_handle=2;
source=;
sub_source=;
...
END
The slots are displayed, one per line, indented by a tab (\t). For every slot, the slot name and value are printed, separated by an equals sign (=) and terminated with semicolon and a new line (\n). To terminate, END is printed on a line at the end of the data.
In the example shown in the following figure, the first two lines configure the export file so that it exports new events and modified events differently. Specifically, slots.new=[$ALL] exports all slots of new events to the database and slots.mod=[event_handle,$NAME,$VALUE] exports event_handle, slot name, and value of events that are modified to the export file.
Command to configure the export file
slots.mod=[event_handle, $NAME, $VALUE]