Agent deployment and maintenance
This page describes creating, installing, and verifying taosX-Agent layer by layer when the source system is accessible only from another host or connector dependencies must be installed near the source. An online agent proves only that the management connection is established. Verify source reads and target ingestion separately.
Where to operate: taosExplorer → Data In → Agents; agent.toml and service management on the collection host.
taosX-Agent runs in an environment that can access the source system and delivers collected data to taosX. Confirm agent support, required plugins, and runtimes for each connector. Do not assume that every protocol can use an agent simply because the source network is isolated.
1. Prerequisites
Install the agent on the source host or another host on the same network that can reach the source. The source host does not need a full TDengine installation for this purpose. If taosX can already access the source directly and has all dependencies, an additional agent is unnecessary.
| Check | Pass condition |
|---|---|
| Product version | taosX-Agent and the taosX it connects to use the same version; the download package matches the agent host platform and architecture. |
| Host and dependencies | The agent host has the connector's required plugins and runtimes. See the Connector selection matrix. PI and OPC DA use Windows collection hosts; corresponding steps for direct collection on Linux are not provided. |
| Two network segments | The agent can reach the actual source ports and the gRPC port of every intended taosX (default 6055). |
| Accounts and permissions | Accounts are authorized to install, edit controlled configuration, and start services; the agent service identity can read source data, plugins, and required files. |
| Directories and existing services | Configuration, log, and cache directories and existing services are recorded; do not overwrite configurations still in use or start a second identical instance. |
| Management interface | Access to taosExplorer and permission to create an agent are available; the target Xnode is online. |
See Installation and pre-deployment checks for port directions and custom values. The Token authenticates the agent to taosX. It is not a source database password and does not grant source read access.
2. Create an agent identity
- Open taosExplorer in a browser, go to Data In, open the Agents tab, and click +Create New Agent.
- In the Download/Install step, click the Windows or Linux download link to obtain the taosX-Agent installation package matching the agent host. Transfer the downloaded package to the actual agent host and install it using the platform instructions below. A matching package is also available from the TDengine Download Center.
- Return to the wizard, click Next, enter a unique name that identifies the collection location, and continue to generate an authentication Token.
- Save the
endpointandtokensupplied by the wizard in controlled configuration on the agent host, as described in the next section. A lost Token cannot be retrieved from the original creation wizard. Recreate it through the agent management procedure; do not export diagnostic materials containing secrets to recover a Token. - For multiple nodes, confirm that the generated endpoints cover all intended Xnodes. Nodes added later are not automatically written back to an existing
agent.toml; plan an update.
The browser download location is not the service installation location. The endpoint must be reachable from the agent host. Unless taosX and the agent are actually on the same host, do not copy localhost:6055 literally.
When creating several agents consecutively in the same browser session, check the endpoint currently shown in the wizard each time. Do not assume it always resets to the cluster default. Before copying configuration for another factory or collection host, confirm that the host can reach every listed endpoint and use the Token generated for this new agent. Do not reuse the previous agent's authentication value.
The agent name identifies the agent when selecting it in a task. Use distinct names for different factories or collection hosts. Save the Token immediately after the wizard generates it. Do not show its actual value in screenshots, tickets, or public documents.
2.1 Install and check the version
- Linux
- Windows
On the approved Linux agent host, extract the downloaded package into a separate directory, enter the extracted directory containing install.sh, review the package's installation instructions, and run:
sudo ./install.sh
taosx-agent -V
The first command installs components and may change service state; run it in an approved maintenance window. The second command should report the actual distribution version of the taosX it connects to; also confirm that this distribution supports the required collection capability. The version number may omit the v prefix. If the command is not found, check installation logs and the actual program location. Do not start a second agent process from the extracted directory.
On the approved Windows agent host, double-click the downloaded package and follow the installation wizard. The default installation location is C:\TDengine. If another path is used, use that actual location in subsequent commands. Reopen PowerShell and check the program version before starting collection:
& 'C:\TDengine\taosx-agent.exe' -V
The output should match the actual distribution version of the taosX it connects to; also confirm that this distribution supports the required collection capability. The version number may omit the v prefix. If the file does not exist, check the installation directory. Do not replace installation by copying an individual program from another version's directory. A full path does not depend on PATH. If direct execution of taosx-agent is needed, have the deployment operator confirm that the actual installation directory is in PATH.
After the version command succeeds, also confirm that the service uses this program, the Token is valid, and the source can be read. Then configure and verify each layer.
3. Minimal configuration and startup
Record the original configuration first. Merge the following snippet into agent.toml on the agent host; do not overwrite the entire file with it. Replace the endpoint and Token with actual values. In a TLS environment, use https:// and configure a trusted CA. See TLS, DSNs, and sensitive files.
endpoint = "http://taosx-host:6055"
token = "REPLACE_WITH_AGENT_TOKEN"
instanceId = 1
keep_online = true
instanceId is unique among instances on the same host; it is not the SQL Agent ID. Keep keep_online = true in the minimal example. See Agent-specific configuration for other values and the conditions for CA and client port range settings to take effect. Limit both file permissions and service account permissions to the minimum required. Staying online does not guarantee that source data will not be lost.
- Linux
- Windows
Operate on the Linux agent host. Package installation must be complete, the system must use systemd, and the executing account must have the sudo permissions required for these steps. The default configuration path is /etc/taos/agent.toml. Use an installed editor to enter and save the values supplied by the wizard:
sudo vi /etc/taos/agent.toml
systemctl show taosx-agent -p User -p ExecStart -p ActiveState
The second command checks the service identity, startup command, and state. A system service runs as root by default if User is unset. If the unit is missing, check the installation first. Do not create a service that conflicts with the package. A Linux agent supports eligible connectors, but cannot load the PI AF SDK or collect OPC DA through Windows DCOM on this host.
After obtaining approval from the service owner and confirming that the initial startup is permitted, run:
sudo systemctl start taosx-agent
systemctl status taosx-agent --no-pager
The expected state is active (running). If startup fails, check the agent's actual logs and the service startup information in journalctl -u taosx-agent -n 50 --no-pager. Service logs do not necessarily contain all application logs.
Operate on the Windows agent host, not another host running the browser. The default configuration path is C:\TDengine\cfg\agent.toml. For a custom installation directory, locate it from the actual service configuration. Open the file in an administrator PowerShell session, enter the wizard's values, and save:
notepad 'C:\TDengine\cfg\agent.toml'
Get-CimInstance Win32_Service -Filter "Name='taosx-agent'" | Select-Object Name,State,StartName,PathName
The second command checks service state, account, and startup command. If the service is missing, first check whether installation is complete. A running service does not necessarily adopt new values when the file is saved. Confirm the maintenance window first; do not start an additional foreground process.
After obtaining approval from the service owner and confirming that the initial startup is permitted, run:
Start-Service -Name taosx-agent
Get-Service -Name taosx-agent
The expected state is Running. If startup fails, check Windows service errors and agent logs. Do not replace investigation with repeated installation or Token regeneration.
If the service is already running and its endpoint or Token must change, record bound tasks and the interruption scope under the maintenance plan, then schedule a restart of the relevant service. Do not repeatedly click startup in the creation wizard.
4. Layered verification
- Follow the previous section to confirm that the service runs on the intended host, reads the correct configuration file, and uses an identity authorized for the source.
- Return to the taosExplorer wizard, click Next, then Check Agent Connection. After Normal appears, click Finish. Run
SHOW XNODE AGENTS;in the taosExplorer Data Browser or taos CLI to check the name and online status. An online agent proves only that the management connection is established. - Create or select a test task and select this agent in the Agent option. Confirm that the agent service account can read the plugins, source authentication materials, and files.
- Check target timestamps, values, tags, and actual table names against known source records, then observe several changes. If the task fails, collect agent and taosX logs for the same period.
- For store-and-forward scenarios, also verify the disconnection window according to Restarts, checkpoints, and store-and-forward. Until a drill has been performed, do not treat online status as proof that replay has passed verification.
5. Cache, delivery windows, and maintenance
The memory cache and the delivery window for sent but unacknowledged data limit different parts of the data flow. Neither is equivalent to persistent store-and-forward or a process memory limit. See Agent-specific configuration for capacity, byte-window, and timeout defaults and units.
Configure delivery variables in the agent service environment, not as TOML fields. Restart the relevant service under the maintenance plan for changes to take effect; settings in a terminal do not automatically affect an already running service. Reaching the window limit pauses sending, and an oversized batch is not automatically split. See Delivery windows and timeouts for log verification and systemd configuration steps. See Tuning and resource control for process resource budgets.
Before maintenance, record the agent's bound tasks, last data boundary, cache directories, and version. Preserve configuration and persistent directories. During upgrades or rollback, align taosX and every connected agent to the same version. Do not clear caches to resolve protocol incompatibility. After recovery, verify the agent, tasks, and data window in that order.
6. Troubleshooting
| Symptom | Next step |
|---|---|
| Cannot come online | Test every gRPC endpoint from the agent host, then check TLS, the Token, and protocol versions |
| Online but source reads fail | Check the agent service identity, source network, plugins, and source read permissions; do not repeatedly replace the agent Token |
| Intermittent connection | Correlate logs at both ends with the network, and check keep_online and endpoint reachability; do not merely extend timeouts to hide write failures |
| Incomplete data after reconnection | Distinguish data never collected, unacknowledged data resent, and source data past retention; check the target for the interruption window |
The agent has no /metrics browsing endpoint of its own and does not export the taosX resource_* dictionary. See Logs and performance for monitoring access.
7. Change a task or maintain the agent
| Change | Where to operate and precautions |
|---|---|
| Change collection intervals, point lists, or mappings; start or stop tasks | Operate on the specific task in taosExplorer, save, and verify using the connector steps; do not reinstall the agent or generate a new installation package for point changes. |
| Replace agent endpoints or Token | Edit agent.toml on the actual agent host, record affected tasks, and arrange a maintenance window; after the change, reverify online status and source/target data. |
| Upgrade the agent or change the service identity or cache settings | Maintain the agent service under the maintenance plan and preserve configuration and persistent directories; after changing identity, recheck source and file read permissions. |
To pause collection, stop the relevant task first. Stopping the entire agent affects its other tasks. Resume with the original configuration and task, and check the interruption window. Agent reconnection does not guarantee that every source can backfill data that was never collected.