The nat time command sets the start time, end time, or timestamp in NAT syslogs to the local time or UTC time.
The undo nat time command deletes the setting of the local or UTC time for the start time, end time, or timestamp.
By default, a device displays the UTC time in flexible NAT syslogs.
This command is supported only on the NetEngine 8000 F1A.
nat time { endtime-second-dec | endtime-second-hex | starttime-second-dec | starttime-second-hex | starttime } { local | utc }
nat time { timestamp-second-dec | timestamp-second-hex | timestamp } { local | utc }
undo nat time { endtime-second-dec | endtime-second-hex | starttime-second-dec | starttime-second-hex | starttime } { local | utc }
undo nat time { timestamp-second-dec | timestamp-second-hex | timestamp } { local | utc }
Parameter | Description | Value |
---|---|---|
endtime-second-dec |
Indicates the end seconds expressed in decimal notation included in a log. |
- |
endtime-second-hex |
Indicates the end seconds expressed in hexadecimal notation included in a log. |
- |
starttime-second-dec |
Indicates the start seconds expressed in decimal notation included in a log. |
- |
starttime-second-hex |
Indicates the start seconds expressed in hexadecimal notation included in a log. |
- |
starttime |
Indicates the start time, including the year, month, day, hour, minute, and second. |
- |
local |
Indicates the local time. |
- |
utc |
Indicates the UTC time. |
- |
timestamp-second-dec |
Indicates the seconds expressed in decimal notation of a timestamp. |
- |
timestamp-second-hex |
Indicates the seconds expressed in hexadecimal notation of a timestamp. |
- |
timestamp |
Indicates the timestamp, including the year, month, day, hour, minute, and second. |
- |
Usage Scenario
The format of NAT syslog information can be flexibly configured. To configure a device to display the local time in NAT syslogs, run the nat time local command.
Prerequisites
A flexible NAT syslog template has been created, and the flexible log template view is displayed.
Precautions
The time format configured using the nat time command takes precedence over that configured using the nat time local command in the flexible log template view. If the nat time command is run, the time format of the end time, start time, or timestamp takes effect according to the configured format. If the nat time command is not run, the nat time local command takes effect. If neither the nat time command nor the nat time local command is run, the default UTC time takes effect.