Skip to main content

Health assessment and missing-data investigation

info

When tasks fail, target data stops updating, or the interface appears normal but queries find no data, narrow the investigation by service and execution location. A normal health endpoint response or any single health state alone cannot prove the data path works. Ultimately, find an identifiable source record in the target table.

Where to operate: taosExplorer task status and the taosX health endpoint; run SQL in the taosExplorer Data Browser or taos CLI.

Health checks must cover services, tasks, and data, with business requirements for timeliness and completeness as the final criteria.

If node or agent connections have not been established in a new deployment, first confirm components and connection directions using Installation and pre-deployment checks. See Metrics dictionary and alert recommendations for existing task metric definitions, to avoid treating cumulative values or old samples as current evidence of health.

1. Confirm services and execution locations​

Confirm that taosExplorer is accessible, then query Xnodes and tasks in the taosExplorer Data Browser or taos CLI:

SHOW XNODES;
SHOW XNODE TASKS;
SHOW XNODE JOBS;

An online Xnode means the management connection is available. For tasks, desired_state is the desired state, status is the reported actual state, and reason provides the latest failure reason. If a task should run but does not, address its state and failure reason first.

The taosX HTTP service provides /health. The default HTTP port is 6050; use the actual configured address and port. A normal response proves only that the service can handle health requests, not that every task writes successfully.

On a Linux host that can access the same address, check with an installed curl:

curl --fail --silent --show-error --connect-timeout 5 --max-time 10 \
--write-out '\nHTTP %{http_code}\n' 'http://taosx-host:6050/health'

--connect-timeout 5 limits the connection phase to 5 seconds, --max-time 10 limits the whole request to 10 seconds, and --write-out prints the HTTP status code after the response. Normal output includes "ok" and HTTP 200. Connection errors, timeouts, and HTTP 4xx/5xx return a nonzero exit code. If no HTTP response is obtained, HTTP 000 may appear; it is not a status code returned by the service. If curl is not installed, install it through the host's package management procedure. Connectivity using another protocol does not replace an HTTP check.

Replace taosx-host with the actual host address, and adjust HTTPS and ports to match deployment. A normal response has HTTP status 200 and the JSON string "ok". If a request times out or fails to connect, check on the taosX host that the service is started and its listening address and firewall are correct. If the response is normal but business data is missing, stop repeatedly checking this endpoint and continue with tasks and data.

For tasks executed through taosX-Agent, check source networks, plugins, and local files on the agent host. Testing source connectivity on the taosX host does not replace checks on the agent host.

When an agent is involved, run SHOW XNODE AGENTS; to check the task's agent and current connection details. Use the real source host and port from task configuration to test the network from the actual collection host:

If the actual collection host is Linux, use an nc implementation supporting these arguments, such as OpenBSD netcat:

nc -vz -w 5 'source-host' 4840

-z only checks port connectivity without sending business data, -v displays the result, and -w 5 sets a 5-second connection timeout. A successful connection message and exit code 0 indicate TCP reachability. For nonzero codes, use the error to distinguish name resolution failure, connection refusal, and timeout, then check source listeners, routing, and firewalls. nc may not be preinstalled and arguments differ among implementations; check nc -h first. If missing, install it through the host package management procedure. Do not open all ports for testing.

Port 4840 in both TCP examples only illustrates an OPC UA connection check; replace it with the actual source port. Windows TcpTestSucceeded=True or a successful Linux connection proves only TCP connectivity, not correct certificates, user authentication, or point permissions. Continue by checking source reads with the same identity used by the task.

2. Task health states​

The following values are health check states, not management states such as task started or stopped. Search for Health state updated in taosX logs on the actual execution host to see health state changes and the last and state fields. Correlate context using the task identifier and failure time. See Logs and performance for search methods. These logs record state changes, not necessarily one entry per sampling interval. No matching entry does not establish the current health state.

Assess several consecutive check intervals together with metrics, error logs, and business data. A single state change is insufficient to identify a fault. See Logs and performance for where to view read and failure metrics and filter tasks. Do not expect all health states below in the status column of SHOW XNODE TASKS.

Health stateMeaning and next step
initial, readyInitializing or preparing. Wait for the check window and confirm that connections and tasks enter normal processing.
idleNo source messages were received during the check window. Confirm whether the source should have data and whether the read scope or subscription is correct.
activeData processing activity occurred during the check window. Continue checking target records and lag.
pendingSource messages exist, but no target processing messages were observed during the window. Check batch waits, target connections, write logs, and backlog.
busyMessage backlog meets the busy-state criteria. Observe whether it keeps growing, then locate a source burst or target processing bottleneck; this state alone does not mean the actual queue is full.
bounceAn error occurred during processing, such as a transformation error. Locate the specific error in the same period.
source_errorSource-side error. Check source addresses, identities, permissions, certificates, objects, and source service status.
sink_errorTarget-side error. Check target connections, write permissions, structures, and target service status.
fatalSevere error state value. If received, save the complete error context and handle it according to actual task status.

A missing health state may mean checks are disabled, a check window has not formed, or the task is not running. It does not establish health. These states also do not promise automatic repair or takeover.

3. Health monitoring configuration​

Some connectors provide the following four settings under Advanced Options. They serve health monitoring, not task start/stop control, error handling policies, or host resource budgets. Use the relevant connector page for the exact entry and initial values. Values in old screenshots are not universal defaults for all tasks.

SettingMeaningOperational use
Health monitoring periodObservation window for summarizing recent activity; the interface must also show the time unitChoose a window covering normal collection intervals to avoid mistaking normal idle periods in low-frequency data for missing data; do not use it to change source query or subscription frequency.
Busy state thresholdRatio used to determine busy state. Busy may be reported when the positive difference between received and processed messages in the window reaches the threshold relative to the queue-length referenceThis is not CPU percentage or target database utilization. First observe input, processing, and failures for the same task continuously, then assess tuning needs.
Write queue lengthMessage-count reference used to calculate the health busy ratioIt does not establish a hard limit on actual queue capacity and cannot directly calculate pending business rows or disk capacity.
Write error thresholdError-count setting provided by the interfaceIt does not guarantee automatic transition to fatal or task stop above the threshold. Address persistent errors proactively using logs, failure counts, and target data rather than waiting for a threshold trigger.
warning

Do not set these four values to 0 to mean disabled checks, no restrictions, or unlimited capacity; zero does not have a uniform meaning. The existence of an interface option or a successful save does not establish that the current task uses all these settings.

Before a change, export the original configuration and record values, units, normal collection intervals, and target arrival lag. Adjust only one setting at a time within an approved small scope. Restart the original task and observe health changes, continuous metrics, error logs, and target records under the same load. If no state change occurs or results differ from expectations, restore the approved configuration first. Follow Diagnostic packages and support tickets to retain the task definition, screenshots of relevant options, and time window, and contact technical support to confirm the setting's effective scope. Do not repeatedly lower thresholds to conceal missing data. See Logs and performance for monitoring samples and interpretation, and Tuning and resource control for resource budgets.

4. Investigate each segment of the data flow​

Check locationRequired evidenceFirst checks when evidence is missing
SourceA known existing record, message, or point value, with time or positionWhether the producer sent data, the point changed, and the query window and objects are correct
Actual collection hostThe task connects to the source and shows read activityNetwork, service identity, authentication, certificates, plugin dependencies
Parsing and mappingInput samples generate the expected timestamps, values, tags, and table namesJSON paths, data types, time units, filters, and naming templates
Target writesNo persistent write errors and processing metrics changetaosAdapter or taosd reachability, write permissions, table structures, and error handling policies
Target queriesThe record is found in the correct table and time rangeTarget cluster, database name, child table name, time zone, time precision, and query conditions

For message sources, first send a test message with a unique business identifier. For industrial points, select a verifiable value change. For historical tasks, start with a short time range known to contain source records. Follow the same record through every segment to avoid mixing logs from different times and tasks.

4.1 Procedure for one missing-data investigation​

  1. Have the source administrator provide a real existing record, and record its object, value, time, and time zone. For Kafka, also record topic, partition, and offset. For industrial points, record the complete NodeId or point name.
  2. Check saved source objects and read scope on the task page. If the message predates the read starting point, the point does not match, or the historical interval excludes the record, correct the test scope first instead of immediately resetting progress.
  3. View two consecutive monitoring samples for the same task. If input does not increase, check source reads. If input exists but failures increase, check logs and archives. If processing exists but the target record is missing, check filtering, mapping, and target queries.
  4. Preview parsing and mapping using the record's actual fields. Check the generated database, child table name, primary timestamp, values, and tags. If the record is filtered, confirm whether that follows the rules; normal filtering is not a write failure.
  5. Query the corresponding child table on the target cluster. Start with the time range around the record, remove extra conditions that might exclude it, then add business filters back individually.
  6. After fixing the issue, retest with a new identifiable record and retain before-and-after queries and logs. If the old record has already been consumed or handled by an error policy, configuration changes do not necessarily replay it automatically.

5. Verify target data​

Query the actual child table generated by task mapping, limit the query to the time range under review, and compare primary-key timestamps, values, and tags. Use field and table names from task configuration. See Migrate a time range with the CLI as a reference.

For example, if the actual target is taosx_opc_demo, the child table is t_2_Demo_Temperature, and the primary timestamp and value columns are ts and val, run the following in the target cluster's taosExplorer Data Browser or taos CLI:

SELECT ts, CAST(ts AS BIGINT) AS ts_ms, val
FROM taosx_opc_demo.`t_2_Demo_Temperature`
ORDER BY ts DESC LIMIT 10;

These database and table names are not universal; replace them according to actual mapping. Keep backticks around mixed-case table names. ts_ms represents milliseconds only in a millisecond-precision database. Confirm the target and fields before analyzing empty results; querying the wrong table is not a collection failure.

For real-time tasks, observe several consecutive source changes and compare target arrival times. For historical tasks, check object inventories, boundaries, and source/target counts. One source message may expand into multiple rows, be filtered, or overwrite an existing record with the same primary key. Do not mechanically require source message count to equal new row count.

Cumulative processing counts may include retries, and identical timestamps may not increase target row counts. Assess growing processing metrics together with target query results.

6. When to proceed to troubleshooting​

If the source should have data but reads do not increase, pending work keeps growing, failures persist, or target lag exceeds business limits, use Troubleshooting by symptom. For tasks just out of maintenance, also check Restarts, checkpoints, and store-and-forward to determine whether data from the interruption can be backfilled.