You have three choices of destinations for your
Cloud NGFW logs. These destinations all reside outside of the Cloud NGFW service
but within your AWS account—S3 bucket, Cloudwatch log group, or Kinesis data
firehose. Each log file is generated as a JSON file.
When you
Subscribe to Cloud NGFW for
AWS, you're asked to set up your AWS CloudFormation template stack.
The stack prepopulates the logging destinations for CloudWatch log group and
Kinesis Data Firehose delivery stream with a destination called
PaloAltoCloudNGFW. The S3 Bucket field isn't
prepopulated. If you want to send the logs to a different destination, you must
create that destination and replace the default value the name before you
complete stack creation.
Each NGFW resource (displayed as the NGFW name in
the log stream name) outputs its logs into multiple streams (distinguished by the
string of random characters in the log stream name). Therefore, logs for a
particular Cloud NGFW resource might be spread across multiple streams.If you
send the logs to a CloudWatch log group, you can view the log entries directly
in the AWS CloudWatch console. In the CloudWatch log group you specify when
configuring logging, you will see a list of log streams. The log stream name is
displayed as:
/<aws-account-id>/<region>/<NGFW-name>/<random-string>/<log-type>.<year>.<month>.<day>.<hour>
For
example
/account123/us-west-1/firewall-1/qadd232312345dea/TRAFFIC.2022.02.10.Twenty-three
The <random string> refers to the individual NGFW resource that generated
the log.
You can click on the stream name to view log entries, which are displayed
as shown in the following example.
If you send the logs to an S3 Bucket, the log files are saved as a JSON
file. The NGFW sends a new log file when one of the following criteria is
met—the firewall has generated 256 MB of logs or 10 minutes have elapsed since
the last log file was generated. To locate the files in the S3 Bucket you
specify, access the S3 console in AWS and find the bucket you specified. Then
select . S3 bucket log file names adhere to the following format:
<aws-account-id>-<region>-<NGFW-name>-<log-type>-<year>-<month>-<day>-<hour>-<random-string>
The <random string> refers to the individual NGFW resource that generated
the log.
You can then download the file and use a JSON reader to view the logs in a
more readable format. In addition to the log information, each log entry also
contains a header that records the date, priority, time, firewall hostname, log
type, year, month, day, hour, minute, and second.
If you send log files to a Kinesis Firehose, logs are sent to the stream
name that you specify and then to the final destination; such as an S3 Bucket,
Datadog, or Splunk. The source for your Kinesis firehose must be Direct PUT
or other sources. In addition to the log information, each log entry
also contains a header that records the date, priority, time, firewall hostname,
log type, year, month, day, hour, minute, second, region, firewall name, and AWS
account ID. The NGFW adds the region, firewall name, and AWS account ID to the
logs to help identify where the log was generated because this information isn't
included in the log file name. You can then download the JSON file for viewing.
The times and dates recorded in log entries and log file names are displayed
in UTC time. However, the log dates displayed in the AWS console are
displayed in your local time and date.
Although URL filtering data is a subtype of the Threat log category, Cloud
NGFW implements special handling for these logs. URL filtering logs are
routed to a separate, dedicated log group rather than being bundled
into the primary Threat log group. Ensure you look for or allocate a
separate log path explicitly for URL filtering logs when verifying your AWS
destination services (like CloudWatch).