The expression message command configures a content expression for session logs or URL session logs in the syslog format.
The undo expression message command cancels the configuration.
| Parameter | Description | Value |
|---|---|---|
ipv6 |
Define the IPv6 session logs in the syslog format.
|
- |
content |
Specifies the content expression of session logs in the syslog format. |
The name is a string of case-sensitive characters and cannot contain question marks (?) or hyphens (-) .If the name does not contain any space, the length ranges from 1 to 480 characters. If the name contains spaces, the length ranges from 3 to 482 characters, and you must use double quotation marks ("") to enclose it. |
Prerequisite
The expression message command is run in the session log template view. Therefore, before running the command, run the session-log template command to create a session log template and access the view of the template.
Usage Scenario
You can use the expression message command to define log contents. Based on the user-defined content expression in the template, the FW sends the contents of session logs in the syslog format or URL session logs to a log server.
Field Name |
Description |
|---|---|
$systime |
System time |
$hostname |
Host name |
$ipversion |
IP version |
$protocol |
Protocol |
$srcip |
Source IP address |
$srcport |
Source port |
$dstip |
Destination IP address |
$dstport |
Destination port |
$srcnatip |
Source NAT IP address |
$srcnatport |
Source NAT port |
$dstnatip |
Destination NAT IP address |
$dstnatport |
Destination NAT port |
$begintime |
Start time |
$endtime |
End time NOTE:
Only session aging logs support the field. |
$sendpackets |
Number of sent packets |
$sendbytes |
Number of sent bytes |
$rcvpackets |
Number of received packets |
$rcvbytes |
Number of received bytes |
$srcvpnID |
Source VPN ID |
$dstvpnID |
Destination VPN ID |
$secpolicy |
Security policy |
$user |
User name NOTE:
Only session packets carrying a user name support the field. |
$usrgroup |
User group NOTE:
Only session packets carrying a user name support the field. |
$srczone |
Source zone |
$dstzone |
Destination zone |
$vsys |
Virtual system name |
$closereason |
Reason why a session is closed |
$logtype |
Log type
|
$duringtime |
Duration The unit is millisecond. Aged session logs and periodic session logs have the field. |
$servicetype |
User service type |
$httptype |
POST or GET type NOTE:
Only URL session logs has the field. |
$application |
Indicates the application name (configured in a security policy) that the session matches. |
$url |
URL address NOTE:
Only URL session logs has the field. |
c ipver=4 pro:udp source=4.4.4.1:10009 destination=4.4.4.2:20009
ipver= and pro: are configurable.
A space exists in the contents behind the expression message, and therefore double quotation marks ("") are required to enclose these contents.
Follow-up Procedure
Run the firewall log syslog content format template or firewall log session url-log template command to reference the configured template.