All Products
Search
Document Center

Cloud Firewall:Export logs

Last Updated:Apr 01, 2026

You can download logs or query results to your computer, or ship them to an OSS bucket. This facilitates detailed data review and long-term archiving.

Prerequisites

The log analysis feature for Cloud Firewall is enabled. For more information, see Overview of log analysis.

Download logs to your computer

You can download logs directly to your computer from the console.

Download from the console

Important
  • If a download request exceeds the maximum number of logs allowed, only the maximum number is downloaded. To download all logs, narrow the time range of your query and perform multiple downloads.

    You can view your downloads in the Download Tasks dialog box.

  • You can run a maximum of three concurrent download tasks per Alibaba Cloud account, with no limit on the total number of tasks. If you exceed this concurrency limit or if multiple RAM users attempt simultaneous downloads, an error may occur. If this happens, wait for the current tasks to complete and then try again.

  • The system keeps download records for 24 hours and automatically deletes them afterward.

  • The system automatically retries a download task in case of a network error or an inaccurate query. If the task still fails after three retries, the system sets its status to Failed.

  1. Log on to the Cloud Firewall console.

  2. In the left-side navigation pane, choose Detection & Response > Log Analysis, and then click the Logs tab.

  3. If you want to download query results, first set the search criteria and run the query. For more information, see Query and analyze logs.

  4. On the Raw Logs tab, click the image icon and select Download Log.

    Note

    The Download Log option is unavailable if no logs are present.

  5. In the Download Log dialog box, configure the following parameters and click OK.

    image

    Parameter

    Description

    Task name

    The name of the download task.

    Log Quantity

    The number of logs to download.

    Data format

    The supported formats are CSV and JSON.

    • If you select CSV, the column names in the file are generated based on the fields of the first 100 logs. If subsequent logs contain new fields, they are stored in JSON format in the last column of the CSV file, which is unnamed.

    • If you select JSON, the content of each log is converted to the JSON format and then written to the file as a single line.

    Quote

    Select a quote character to enclose special characters in logs and prevent them from being escaped.

    Download Inaccurate Results

    If you select No, the download task fails if the query results are inaccurate.

    Compression Method

    Supported compression methods include gzip, lz4, and zstd. You can also choose not to compress the file.

    For large downloads, we strongly recommend selecting a compression method. This can significantly reduce the file size and download time.

  6. Download tasks run in the background. To retrieve the file, open the Download Tasks dialog box, wait for the task status to become Successful, and then click Download to save the logs to your computer.

    Alternatively, on the Raw Logs tab, click the image icon and select Download Tasks to view your download history.

Ship logs to OSS

If you have a large volume of logs or need long-term storage, you can periodically ship log data to an OSS bucket for storage and analysis. For instructions, see Create a task to ship data to OSS (new version).

References

For detailed descriptions of log fields, see Log fields.