The log analysis feature of Security Center supports exporting log data to a local machine. You can download log data on a specified page to a local CSV file or all log data to a TXT file. This topic describes how to export log data.

Procedure

  1. Log on to the Security center console.
  2. In the left-side navigation pane, click Investigation > Log Analysis.
  3. On the right of the Raw Logs tab, click 1 to open the Log Download dialog box.
    Download
  4. In the Log Download dialog box that appears, select a download method to export log data.
    • Select Download Log in Current Page, and click OK.Download log data on a specified page

      Log data on the specified page is exported to a local CSV file.

    • Select Download All Logs with Cloud Shell to download all log data.Use Cloud Shell to download all log data.
      1. Click OK to go to the Cloud Shell command line.
      2. Follow the instructions that appear on the page to enter the required information.
      3. Specify a local path where you want to store the log file.

      All logs of Security Center are saved to a local TXT file.

      Note Currently, Cloud Shell is deployed in the China (Shanghai) region. If the current Logstore is not in the China (Shanghai) region, downloading log data incurs data consumption fees. Click Log Service Pricing to learn more about the pricing of data usage.
    • Select Download All Logs Using Command Line Tool to download all log data.Use a command line tool to download all log data
      1. Click Documentation in the Log Download dialog box to learn how to install a command line tool.
      2. Install the command line tool.
      3. Click Security information management to view and copy the AccessKey ID and AccessKey secret of the current user.
      4. Click Copy Command and replace the AccessKey ID in step 2 and AccessKey secret in step 2 with those of the current user.
      5. Run the command in the CLI command line tool.

      After you run the command, all the log data of Security Center are automatically downloaded and saved to the download_data.txt file in the current directory where the command is executed.