This document provides key alert metrics, recommended alert configurations, and operational examples for Realtime Compute for Apache Flink, enabling effective system performance monitoring and issue diagnosis.
Prerequisites
Refer to Configure monitoring and alerting and select the appropriate configuration method for your workspace's monitoring service.
In ARMS, multi-metric monitoring is supported only when you use a custom PromQL statement to create an alert rule. For a simpler setup, you can configure alerts with CloudMonitor.
Recommended alert rules
|
Scenario |
Metric/event name |
Rule configuration |
Severity |
Actions |
|
Job run status event |
= FAILED (Event-based alert) |
P0 |
1. Check if the restart policy is misconfigured. Using the default configuration is recommended. 2. Determine if the failure is caused by the restart policy or a JobManager/TaskManager exception. 3. Restore the job from the latest savepoint or successful checkpoint. |
|
|
Overview / NumOfRestart |
≥ 1 for 1 consecutive period |
P0 |
1. Identify the root cause.
2. Restore the job from the latest savepoint or successful checkpoint. |
|
|
NumOfCheckpoints (5-minute aggregate) |
≤ 0 for 1 consecutive period |
P0 |
1. Refer to System checkpoints to troubleshoot the root cause of checkpoint failures. 2. Identify and resolve the issue.
3. Dynamically update the configuration or restore the job from the latest successful checkpoint. |
|
|
Overview / CurrentEmitEventTimeLag && NumOfRecordsInFromSourcePerSecond |
Maximum latency ≥ 180,000 ms Input records > 0 for 3 consecutive periods |
P1 |
1. Refer to Monitor metrics to identify the cause of the latency.
Step 2: Adjust based on the specific cause.
|
|
|
Overview / NumOfRecordsInFromSourcePerSecond && SourceIdleTime |
Input records ≤ 0 (depending on your business logic) Maximum idle time ≥ 60,000 ms for 5 consecutive periods |
P1 |
1. Check taskmanager.log, flame graphs, and upstream service metrics to confirm if the issue is no upstream data, rate limiting, or an exception, or a stalled thread stack. Step 2: Adjust based on the specific cause.
|
|
|
Overview / NumOfRecordsOutToSinkPerSecond |
≤ 0 for 5 consecutive periods |
P1 |
1. Verify if data is reaching the sink operator.
2. Verify if the sink can write to the external system.
3. For a temporary fallback, implement a dual-write to a backup storage system. |
|
|
CPU / TMCPUUsage |
≥ 85% for 10 consecutive periods |
P2 |
1. Use a flame graph or the Flink UI to identify the hotspot operator.
2. Increase the parallelism of the bottleneck operator or allocate more CPU cores to the TaskManager. |
|
|
TMHeapMemoryUsed |
≥ 90% for 10 consecutive periods |
P2 |
1. Analyze GC logs to identify the problem.
2. Increase the heap size or parallelism to reduce the data volume per slot. |
Job availability
Job failure alerts
Console (ARMS)
-
Log in to the console of Realtime Compute for Apache Flink and click Console in the Actions column of your target workspace.
-
In the left-side navigation pane, choose . Click the name of your target job.
-
Click the Alarm tab.
Click Add Alert Rule. In the Create Rule panel, configure the alert. For the Rule, enter a name and description, select Job Failed as the Metric, and set the Effective Period and Mute For intervals. For the Notification Method, select your preferred methods and a contact group. To manage contacts, click the Manage Contact link.
CloudMonitor
-
Log on to the Cloud Monitor console.
-
In the left-side navigation pane, choose .
-
On the Subscription Policies tab, click Create Subscription Policy.
-
On the Create Subscription Policy page, configure the parameters. For more information, see Manage event subscriptions (Recommended).
In the Subscribe to Events step, set Type to System Event. In the Scope section, select Realtime Compute for Apache Flink for Product, and select Job Failed for Event Name. You can leave Level and application group set to All.
Job stability
Frequent JobManager restarts
-
Metric:
NumOfRestart -
Rule: Alert if the job restarts within one minute.
-
Recommended configuration:
-
NumOfRestartValue ≥ 1
-
Period: 1 minute
-
Notification: Phone + SMS + Email + Webhook (Critical)
-
Checkpoint success rate
-
Metric:
NumOfCheckpoints -
Rule: Alert if no successful checkpoint occurs within 5 minutes.
-
Recommended configuration:
-
NumOfCheckpoints -
Value ≤ 0
-
Period: 5 minutes
-
Notification: Phone + SMS + Email + Webhook (Critical)
-
Data timeliness
Latency SLA
-
Metrics:
-
CurrentEmitEventTimeLag -
NumOfRecordsInFromSourcePerSecond
-
-
Rule: Alert if data is being ingested and the business latency exceeds 5 minutes. You can adjust the threshold and alert level based on your business requirements.
-
Recommended configuration:
-
CurrentEmitEventTimeLagMaximum value ≥ 300,000
-
NumOfRecordsInFromSourcePerSecondValue > 0
-
Period: 5 minutes
-
Upstream data flow interruptions
-
Metrics:
-
NumOfRecordsInFromSourcePerSecond -
SourceIdleTime
-
-
Rule: Alert if data input stops and the source remains idle for more than 1 minute. You can adjust the threshold and alert level based on your business requirements.
-
Recommended configuration:
-
NumOfRecordsInFromSourcePerSecondValue ≤ 0
-
SourceIdleTimeMaximum value > 60,000
-
Period: 5 minutes
-
No data output
-
Metric:
NumOfRecordsOutToSinkPerSecond -
Rule: Alert if no data is sent for more than 5 minutes. You can adjust the threshold and alert level based on your business requirements.
-
Recommended configuration:
-
NumOfRecordsOutToSinkPerSecondValue ≤ 0
-
Period: 5 minutes
-
Resource performance bottlenecks
CPU performance bottleneck
-
Metric:
TMCPUUsage -
Rule: Alert if CPU utilization exceeds 85% for more than 10 minutes.
-
Recommended configuration:
-
TMCPUUsageMaximum value ≥ 85
-
Period: 10 minutes
-
Memory performance bottleneck
-
Metric:
TMHeapMemoryUsed -
Rule: Alert if heap memory usage exceeds 90% for more than 10 minutes.
-
Recommended configuration:
-
TMHeapMemoryUsedMaximum value ≥ Threshold (90%)
You can find this threshold on the page. For example, if the total memory is 413 MB, you can set the threshold to 372 MB (90% of 413 MB).
-
Period: 10 minutes
-