All Products
Search
Document Center

Realtime Compute for Apache Flink:View historical job logs

Last Updated:Mar 09, 2026

Realtime Compute for Apache Flink lets you view the logs of historical job instances on the job log interface, in Object Storage Service (OSS), or in Simple Log Service (SLS). This topic describes how to view the logs of historical job instances using these methods.

Background information

You may need to view the logs of a historical job instance in the following scenarios:

  • You want to view, search for, and analyze the operational logs of a historical job instance. By default, the system retains the latest 5 MB of operational logs.

  • The Flink UI cannot be opened, and you need to view the Job Manager logs to identify the cause of the issue.

This topic describes three ways to view the logs of a historical job instance:

Prerequisites

  • To view the logs of historical job instances on the Job Log tab, the log archiving feature must be enabled in the log configuration. By default, this feature is enabled and archived logs are retained for seven days.查看历史作业实例日志2.jpg

  • To view the logs of historical job instances in OSS or SLS, you must configure log output to OSS or SLS in Realtime Compute for Apache Flink. For more information, see Configure job log output.

Notes

  • When a log file reaches the specified size, the system automatically archives it. The system also periodically deletes expired archived log files. Archived logs are retained if a job is stopped, but are deleted if the job is deleted.

    Note

    After the new version is released in November 2024, all existing job logs in the Realtime Compute for Apache Flink management console will be deleted after their retention period expires. This includes archived logs that were retained after a job was stopped.

  • Logs are written to SLS or OSS only if a Task Manager or the Job Manager starts successfully. If neither of them starts properly, logs are not written to SLS or OSS.

  • If you cannot find the corresponding log file in OSS because the Job Manager and Task Managers failed to start, contact technical support.

  • By default, the log configuration retains two files, each 5 MB in size. Do not change this value. If this log retention size does not meet your needs, you can export the logs to OSS.查看历史作业3.jpg

    Note

    The number of files shown in the image does not include the file that is being written to. For example, if you set this value to 1, a maximum of two files are saved: one in memory and one on your local disk.

View logs on the job log interface

  1. Log on to the Realtime Compute for Apache Flink console.

  2. In the Actions column of the target workspace, click Console.

  3. In the navigation pane on the left, choose Operation Center > Job O&M.

  4. Click the name of the target job.

  5. Click the Job Log tab.

  6. On the Operational Log tab, click the drop-down list next to Job and select a historical job instance.

    查看历史作业实例日志.jpg

  7. View the Job Manager and Task Manager logs.

    On the Job Manager or Running Task Managers tab, click the name of the log file that you want to view.

Viewing on OSS

  1. Log on to the OSS console.

  2. In the navigation pane on the left, click Buckets.

  3. Click the Bucket Name that you specified when you created your Flink workspace.

  4. In the Files section, view the logs in the corresponding folders.

    Folder

    Description

    artifacts

    Uploaded JAR packages are stored in this directory.

    flink-jobs

    Stores the checkpoints of Flink jobs.

    flink-savepoints

    On the Operation Center > Job O&M page of the development console of Realtime Compute, when you click Create Snapshot for a job, a Savepoint operation is triggered and the final Savepoint file is stored in this directory.

    logs

    If you set Log Template to OSS for your job, the job logs are stored in this folder.

    Note

    The storage path for jobs in the logs folder is logs/${Workspace ID}/${Job ID}/${Instance ID}. You can use this path structure to find the Job Manager (JM) and Task Manager (TM) logs for the corresponding job.

Viewing in SLS

  1. Log on to the Simple Log Service console.

  2. In the Projects section, click the target project.

  3. On the Logstores tab, click the target Logstore.

  4. Enter a query statement, select a time range, and click Query/Analyze.

    For more information, see Quick start for query and analysis.