Skip to main content

Metric reference and health assessment

Use this page to answer three operational questions: what a metric means, whether a trend is unhealthy, and when an operator should intervene. For collection setup, see Deploy Prometheus monitoring.

Assessment order​

Review signals in the following order instead of starting with CPU or memory:

  1. Can you trust collection? Check up and Status > Target health in Prometheus. When collection fails, other charts might only show stale data.
  2. Is the business affected? Check failed tasks, sustained retries, connection failures, replication lag, and API 5xx responses.
  3. Is a resource the bottleneck? Correlate CPU, load, disk, JVM or Node.js memory, GC, and file descriptors.

State metrics can use direct value-based alerts. Performance and capacity metrics require a business SLA, resource limits, and historical baseline. Percentages and durations in this guide are initial recommendations, not universal normal values.

What to check first​

CheckHealthy behaviorFirst action when unhealthy
Collection state, upRequired targets are 1Check the target address, port, network, and metric path. Do not interpret charts that stopped updating until collection recovers.
Task state, task_statusRunning tasks are 01 means failed and 2 means retrying. Check task logs, related connections, and Flow Engine. If the query has no data, verify that task metrics exist.
Source or target connection, task_active_db0Test the connection, and check the database service, network, credentials, and certificates.
Replication lag, task_cdc_delay_msWithin the task SLA and recovers after a short spikeIf lag continues to increase, check source writes, node processing, target writes, and network health.
Disk and CPUMore than 20% disk available and no sustained high CPUDetermine whether tasks are affected, and then check data growth, logs, GC, and other processes.

After checking these core signals, use JVM, GC, thread-pool, and file-descriptor metrics to diagnose a specific symptom.

View metrics available in the environment​

Available metrics vary by environment, so you do not need to memorize a complete list. First review the metrics returned by the endpoint, and then decide which dashboards and alerts to enable. To list metric names, help text, and types:

curl -fsS http://<host>:3035/actuator/prometheus \
| grep -E '^# (HELP|TYPE) '

You can also query collected metadata from the Prometheus API:

curl -fsS 'http://<monitor-host-private-ip>:9090/api/v1/metadata?limit=10000'

Before creating an alert for a metric not covered on this page, confirm:

  • Whether the type is Counter, Gauge, or Histogram.
  • Whether the unit is seconds, milliseconds, bytes, a ratio, or a cumulative count.
  • Which labels and values exist, especially task, node, state, and route labels.
  • Whether the metric becomes zero or its data disappears when a task stops, a component restarts, or a feature is disabled.

You do not need to interpret every metric during a routine check. Start with up, task state, connection state, replication lag, and disk. Use JVM, GC, and thread-pool metrics after a core signal becomes unhealthy.

Core task metrics​

Task queries and rules must include job="tapdata-flow-engine" so that same-named metrics from other components are not mixed together.

Verify task metric availability before production use

The following tables describe metrics when they exist. While at least one task is active, run:

curl -fsS http://<host>:3035/actuator/prometheus \
| grep -E '^# (HELP|TYPE) task_(status|active_db|cdc_delay_ms|node_process_data_ms|milestone_status|milestone_time)'

No output means that the endpoint does not provide task-level metrics. Task rules remain Inactive and task dashboards show No data; neither result proves that tasks are healthy. Enable only component, resource, HTTP, or MongoDB monitoring whose metrics you have verified. Continue to view task status, replication progress, and data validation in the TapData task monitoring page.

Keep the Flow Engine filter

The state values below apply only to Flow Engine task metrics. Keep job="tapdata-flow-engine" when copying queries, dashboards, or alert rules from this page. Other components can provide same-named metrics. Removing the filter can mix data with different meanings and produce incorrect task states or counts.

MetricMeaning and valuesHealth assessmentInitial alert and investigation
task_status0 running, 1 failed, 2 retrying.0 is healthy; 1 has failed; a persistent 2 means recovery has not completed.Critical when 1 continues for one minute. Warning when 2 continues for ten minutes. Check task logs, connections, and Flow Engine.
task_active_db0 healthy, 1 server or network failure, 2 invalid credentials.A nonzero state normally prevents the node from reading or writing.Critical when nonzero for one minute. Test the connection and check the network, database, credentials, and certificates.
task_cdc_delay_msIncremental replication lag in milliseconds. Relevant to continuously incremental tasks.A short spike that recovers can be transient. Sustained growth means input exceeds processing capacity.Start with a warning above 30 seconds and critical above five minutes, but replace these values with the task SLA. Check source writes, node processing, target writes, and network.
task_node_process_data_msAverage processing time for one task node, in milliseconds.Compare with the historical baseline for the same node. Do not compare unrelated databases or tasks directly.Do not trigger an urgent notification from this metric alone. If it increases with replication lag, investigate the affected source or target.
task_milestone_statusStartup milestone state. Related labels include milestone_status, milestone, and order.Startup should progress through milestones. Long waits, sustained running states, or errors require investigation.Use as supporting evidence for startup failures. Avoid separate notifications for every milestone.
task_milestone_timeDuration of a completed or failed milestone, in milliseconds.Compare with similar tasks and the same task's startup history.Use for startup degradation and capacity planning. Do not set one universal threshold.

Use the following labels to filter data by task or node. When getting started, focus on task_name and node_name. Prometheus also adds job, instance, and the configured project label.

MetricCommon labelsUsage
task_statustask_id, task_name, task_typeLocate running, failed, or retrying tasks.
task_active_dbtask_id, task_name, task_type, node_id, node_nameLocate a connection failure by task node.
task_cdc_delay_mstask_id, task_name, task_typeAppears only when the task produces incremental-lag samples.
task_node_process_data_msnode_id, node_name, node_type, task_id, task_name, task_typeCompare a node with the same task's history.
task_milestone_status, task_milestone_timetask_id, task_name, task_type, milestone_status, milestone, orderCommon milestone_status values include waiting, running, error, and finish. State series normally use sample value 1 for the current label combination.

Some task metrics exist only during a specific phase. For example, lag metrics might be absent before a task enters the incremental phase, and milestone metrics might be absent before a milestone runs. In these cases, No data means that the query has no matching data. It does not mean that the metric value is 0.

If a task is running but all the task metrics above are absent, treat task metrics as unavailable in the environment. Use the TapData task monitoring page to review task state.

Common queries:

# Failed or retrying tasks.
task_status{job="tapdata-flow-engine"} != 0

# Ten tasks with the highest lag.
topk(10, task_cdc_delay_ms{job="tapdata-flow-engine"})

# Average node processing time over the last ten minutes.
avg_over_time(task_node_process_data_ms{job="tapdata-flow-engine"}[10m])
Data validation is outside the scope of these alerts

Continue to review data validation results on the TapData task monitoring page. The task metrics on this page do not include validation results, difference counts, or validation state. A running task with low lag does not prove that source and target data are identical.

Component and runtime metrics​

Management and Flow Engine​

MetricType or unitOperational use
upGauge, 0 or 1Whether Prometheus can scrape the target. It does not indicate task health.
disk_free_bytes, disk_total_bytesGauge, bytesCalculate available disk ratio and consumption trend.
system_cpu_usage, process_cpu_usageGauge, 0 to 1Review host and process CPU. Escalate sustained high usage only when it occurs with task lag, errors, or other service impact.
system_cpu_countGauge, coresInterpret load and capacity.
system_load_average_1mGaugeCompare with CPU cores to investigate CPU, I/O, or blocking pressure.
process_files_open_files, process_files_max_filesGaugeCalculate descriptor usage and identify sustained growth toward the process limit.
jvm_memory_used_bytes, jvm_memory_committed_bytes, jvm_memory_max_bytesGauge, bytesReview Heap, Metaspace, and other areas by labels such as area and id. Calculate usage ratio only when max is greater than 0.
jvm_buffer_memory_used_bytesGauge, bytesReview off-heap buffers such as Direct Buffer.
jvm_gc_pause_seconds_count, jvm_gc_pause_seconds_sum, jvm_gc_pause_seconds_maxCounter or Gauge, secondsUse rate(sum)/rate(count) for average GC pause in a window. Correlate with maximum pause and business lag.
jvm_threads_live_threads, jvm_threads_peak_threads, jvm_threads_states_threadsGauge, threadsReview thread totals and state changes. Use thread dumps when counts or blocked threads keep increasing.
http_server_requests_seconds_countCounter, requestsUse rate() for Management request rate and error ratio.
http_server_requests_seconds_sumCounter, secondsCombine with count for average response time. Do not interpret the cumulative value as current latency.
http_server_requests_active_seconds_countGauge or active long-running requestsReview current active request count.
http_server_requests_active_seconds_maxGauge, secondsLocate the longest current active request.

The following groups can also appear on Management or Flow Engine endpoints. Use them for deeper diagnosis. Do not trigger an urgent alert from one absolute value alone.

GroupMetricsOperational use
Application startupapplication_started_time_seconds, application_ready_time_secondsTrack startup duration. If a restart becomes much slower, correlate it with logs and dependencies.
Executorexecutor_active_threads, executor_pool_core_threads, executor_pool_max_threads, executor_pool_size_threads, executor_queued_tasks, executor_queue_remaining_tasks, executor_completed_tasks_totalIdentify a saturated thread pool or continuously growing queue. Investigate when remaining capacity approaches zero together with task lag.
JVM classes and compilationjvm_classes_loaded_classes, jvm_classes_unloaded_classes_total, jvm_compilation_time_ms_total, jvm_infoExplain JVM, memory, or startup behavior. Do not alert on these metrics alone.
JVM buffersjvm_buffer_count_buffers, jvm_buffer_memory_used_bytes, jvm_buffer_total_capacity_bytesReview off-heap buffer count, usage, and capacity by buffer type.
JVM GC datajvm_gc_live_data_size_bytes, jvm_gc_max_data_size_bytes, jvm_gc_memory_allocated_bytes_total, jvm_gc_memory_promoted_bytes_total, jvm_gc_memory_usage_after_gc, jvm_gc_overheadReview live data after GC, allocation and promotion rate, and GC overhead. Intervene when degradation occurs with lag or memory pressure.
Additional JVM threadsjvm_threads_daemon_threads, jvm_threads_started_threads_totalReview daemon thread count and thread creation rate. Investigate unusual creation rates as possible connection or pool churn.
Process lifecycleprocess_cpu_time_ns_total, process_start_time_seconds, process_uptime_secondsUse rate(process_cpu_time_ns_total[5m]) for CPU-time growth. Use start time and uptime to find unplanned restarts.
Log eventsef_errors_log_total, log4j2_events_totalUse increase(...[5m]) for new errors or log events by level. Use labels and raw logs to diagnose; a cumulative total is not a current error rate.
Scheduled taskstasks_scheduled_execution_active_seconds, tasks_scheduled_execution_active_seconds_max, tasks_scheduled_execution_seconds, tasks_scheduled_execution_seconds_maxReview execution count, total duration, active duration, and maximum duration against the same instance's baseline.

Average Management request duration:

sum by (instance) (rate(http_server_requests_seconds_sum{job="tapdata-management"}[5m]))
/
sum by (instance) (rate(http_server_requests_seconds_count{job="tapdata-management"}[5m]))

File descriptor and JVM Heap usage ratios:

process_files_open_files{job=~"tapdata-(management|flow-engine|agent)"}
/
process_files_max_files{job=~"tapdata-(management|flow-engine|agent)"}

sum by (project, job, instance) (jvm_memory_used_bytes{area="heap"})
/
sum by (project, job, instance) (jvm_memory_max_bytes{area="heap"} > 0)

Agent​

Common Agent metrics include up, disk_free_bytes, disk_total_bytes, process_cpu_time_ns_total, process_cpu_usage, process_files_open_files, system_cpu_count, system_cpu_usage, and system_load_average_1m. Apply the same health assessment as the table above. Do not substitute zero for a metric that the endpoint does not provide.

API Server​

Enable the corresponding panels and rules only if API Server /metrics returns these metrics.

MetricType or unitOperational use
http_requests_totalCounterCalculate request rate and non-2xx or 5xx ratio by method, path, and statusCode.
nodejs_eventloop_lag_secondsGauge, secondsSustained growth can indicate synchronous work, CPU saturation, or event-loop blocking.
process_cpu_seconds_totalCounter, secondsUse rate() for process CPU trend.
process_resident_memory_bytesGauge, bytesCompare resident memory with container or host limits.
nodejs_heap_size_used_bytes, nodejs_heap_size_total_bytesGauge, bytesReview V8 Heap usage and growth.
nodejs_external_memory_bytesGauge, bytesReview external memory managed by V8.
nodejs_heap_space_size_used_bytesGauge, bytesLocate memory growth by Heap Space.
nodejs_gc_duration_seconds_count, nodejs_gc_duration_seconds_sumCounterUse rate() to determine whether GC frequency and duration keep increasing.
process_files_open_filesGaugeReview open file descriptors.
log_level_count_totalCounterUse increase() for new log events by level within a window.
nodejs_version_infoInfoIdentify instance, process, and Node.js version. Do not use as an alert threshold.

API 5xx ratio:

sum by (instance) (rate(http_requests_total{job="tapdata-api-server",statusCode=~"5.."}[5m]))
/
sum by (instance) (rate(http_requests_total{job="tapdata-api-server"}[5m]))

MongoDB​

MongoDB metric names depend on the mongodb_exporter version, compatibility mode, and enabled collection options (collectors). Use the exporter /metrics output as the source of truth. The templates use these core metrics:

MetricMeaningHealth assessment and usage
up{job="mongodb"}Whether Prometheus can scrape the exporter.Should be 1. If 0 continues for two minutes, check the exporter process, network, and port.
mongodb_upWhether the exporter can connect to MongoDB.Should be 1. If up=1 but this value is 0, check the system database, URI, authentication database, certificates, and network.
mongodb_rs_myStateCurrent replica set member state.1 PRIMARY, 2 SECONDARY, 7 ARBITER. Investigate other persistent states. Standalone deployments do not have this metric.
mongodb_rs_members_state, mongodb_rs_members_healthState and health of each member, with labels such as member_idx and member_state.Member count and state should match rs.status(). Health should be 1.
mongodb_ss_connectionsCurrent, available, and other connections by conn_type.Look for sustained growth in current connections and a sustained decline in available connections. Compare with capacity and baseline.
mongodb_ss_opcountersCumulative MongoDB operations by legacy_op_type.Use rate() for operation rate. Correlate spikes with task traffic, lag, connections, and cache.
mongodb_ss_wt_cache_bytes_currently_in_the_cache, mongodb_ss_wt_cache_maximum_bytes_configuredCurrent WiredTiger cache usage and configured maximum.Compare usage with the limit. Assess capacity when usage remains high together with service impact.
mongodb_oplog_stats_storageStats_storageSizeCurrent Oplog storage size.This is capacity, not remaining time. Estimating the window also requires earliest and latest timestamps and write rate.

For exporter setup, see Configure MongoDB monitoring. For dashboard usage, see Read the MongoDB dashboard.

Initial health thresholds​

SignalHealthy or observation stateWarning starting pointCritical starting pointFirst investigation
up1Not applicable0 for two minutesTarget, network, port, process, and metric path.
mongodb_up1Not applicable0 for two minutesSystem database, URI, authentication database, certificates, and network.
MongoDB replica set statePRIMARY, SECONDARY, or ARBITERAnother state for five minutesEscalate by business impactReplica set status, MongoDB logs, node network, and disk.
Available diskAbove 20% with a stable decline rateBelow 20% for 15 minutesBelow 10% for five minutesLogs, temporary files, backups, and data growth. Confirm ownership before deleting anything.
Host CPUBelow 85% or a short spikeFive-minute average above 85% for 15 minutesFive-minute average above 95% for five minutesHigh-load tasks, GC, other processes, and scaling.
System loadConsistent with CPU cores and baselineSustained above CPU core countAlso occurs with lag, errors, or unavailabilityCPU, I/O wait, and blocked threads.
JVM or Node.js memoryReturns after a peakSustained growth toward a limitOOM, restart, or business failureMemory limits, task concurrency, leak, Heap, and Direct Memory.
File descriptorsVaries within the historical rangeSustained growthNear the system limit or open-file failuresConnection leaks, file operations, and ulimit.
API 5xx ratioNear zeroAbove 5% for ten minutes while traffic existsAbove 20% for five minutesRoute, dependency, logs, and recent changes.

Establish an environment baseline​

During the first production week, record task lag, node processing time, CPU, memory, GC, disk growth, and API traffic during both peak and off-peak periods. Then adjust rules with task SLAs and historical percentiles. This avoids thresholds that are so low that on-call staff ignore them or so high that notification arrives after business impact.

After each real incident, review whether the alert was too early, late, or repetitive and whether the notification lacked a task, instance, or runbook link. Record threshold changes through the normal change process instead of editing production rules ad hoc.