Each add_field
has some parameters:
add_field
command. This parameter has these possible values:field_index
value denotes which part will be extracted (see field_index
bullet).field_value
bullet.Field_name
- the name of the new field. There are some fields, which have corresponding columns in SmartConsole Logs & Monitor > Logs. This table shows the names to give these fields to show in their Logs & Monitor > Logs column (and not in the Information field, where other added fields appear):
Field Name to be Given |
Column in Logs & Monitor > Logs |
---|---|
|
Source |
|
Destination |
|
Protocol |
|
Source Port |
|
Product |
|
Service (when resolved includes the port and protocol.) |
|
Action |
|
Interface |
|
User |
When you name the above fields accordingly, they are placed in their correct column in Logs & Monitor > Logs. This enables them to participate in all filtering done on these columns. These fields automatically take part in existing event definitions with these field names.
Field_type
- the type of the field in the log. This table shows the possible field types.
Field Type |
Comment |
---|---|
|
|
|
|
|
|
|
For IP addresses used with the Src and Dst fields. |
|
Includes the facility and severity of a syslog. |
|
Includes the date and time of the syslog. Supports the format 'Oct 10 2004 15:05:00'. |
|
Supports the format '15:05:00'. |
|
For a more efficient usage of strings. Used when there is a finite number of possible values for this field. |
|
Supports these actions: drop, reject, accept, encrypt, decrypt, vpnroute, keyinst, authorize, deauthorize, authcrypt, and default. |
|
0 - inbound 1 - outbound |
|
For an interface name (used with the "ifname" field). |
|
The field name should be "proto". |
|
For "service", "s_port" or "port" fields. |
The field type of the field names in this table must be as mentioned:
Field Name |
Field Type |
---|---|
|
ipaddr |
|
ipaddr |
|
protocol |
|
port |
|
port |
|
action |
|
ifname |
field_index
or field_value
- The parameter used depends on the value of the "type" field. If it is index, field_index
shows. If it is const, field_value
shows.field_index
denotes which part of the regular expression is extracted, according to the grouping of the patterns. To make this grouping, write a certain expression in brackets. In this expression, the number in field_index
denotes the bracket number whose pattern is taken into account.
Add_field Command Sample
:command ( |
The pattern for the User, [a-zA-Z0-9]+
, is located in the first pair of brackets. Therefore, the field_index
is one. The pattern for the Source address, [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+
, is located in the second pair of brackets. Therefore, the index is two. The pattern for the port is in the third pair of brackets.
In each parsed regular expression the maximum number of brackets must be up to nine. To extract more than nine elements from the regular expression, break the expression into two pieces. The first regular expression contains the first nine brackets. The remaining of the regular expression is in the on_success
command.
:command ( |
field_value
is the constant value to be added.
:command ( |
Dict_name
is the name of the dictionary to use to convert the value. If the value is not found in the dictionary, the value is the result. See Dictionary.