Skip to content

IndustryKit


IndustryKit is a standalone, read-only industrial data collector deployed on a Linux or Windows host that can reach the device network. It collects data from PLCs, meters, OPC UA Servers, MQTT Brokers, and SNMP devices, then reports the data to Dataway as metrics (metric) or logs (logging).

IndustryKit cannot write registers or coils, control PLCs, perform SNMP SET operations, or accept remote configuration.

Features

Protocol Typical devices Collection mode Collected data
Modbus TCP/RTU PLCs, electricity meters, instruments, and variable-frequency drives Active polling Coils, Discrete Inputs, Input Registers, and Holding Registers
OPC UA PLCs, SCADA systems, and OPC UA Servers Read or subscription Configured Node IDs, quality status, and source timestamps
MQTT 3.1.1 IoT gateways, sensors, and MQTT Brokers Message subscription JSON or text payloads mapped to metrics or logs
Siemens S7 Siemens S7 PLCs Active polling DB, Input, Output, and Marker areas
SNMP v3 Switches, gateways, and industrial network devices Active GET Configured numeric OIDs

One IndustryKit process can contain multiple sources. Modbus, OPC UA, S7, and SNMP use points to define collection addresses and output fields. MQTT uses topics and fields to define message mappings. Each source can use a different measurement.

Requirements

  • Release packages are available for Linux amd64/arm64 and Windows amd64/arm64. The online installer detects the architecture automatically.
  • The Linux installer requires a running systemd. Linux commands in this document assume the root user.
  • Windows 10, Windows Server 2016, or later is required. Run the installer from an elevated Windows PowerShell 5.1 or later.
  • The deployment host must be able to reach the protocol port of each target device or Broker and access Dataway over HTTP/HTTPS.
  • Device addresses are resolved from the IndustryKit host. 127.0.0.1 always refers to that host. For a simulator or device on another host, the peer must listen on a reachable address and its firewall must allow the connection.
  • Prepare any device accounts, SNMP v3 credentials, or TLS certificates required by protected devices before configuration.
  • Modbus TCP, classic S7, OPC UA None, and MQTT tcp:// do not provide transport encryption. Use them only on a trusted industrial network, through a VPN, or within a firewall-restricted subnet.
  • No official container image is currently provided.

Installation

The first installation requires a complete Dataway URL containing its token query parameter. Optionally set INDUSTRYKIT_COLLECTOR_ID to specify the collector instance ID; the hostname is used when this variable is not set. IDs support Unicode characters, including Chinese, but must not be blank or contain control characters. The Dataway URL must be an absolute http:// or https:// URL with exactly one non-empty token query parameter and no userinfo or fragment. IndustryKit appends the write path.

Install the latest version:

INDUSTRYKIT_DATAWAY_URL="https://openway.truewatch.com?token=<DATAWAY_TOKEN>" \
  sh -c "$(curl -fsSL https://static.truewatch.com/industrykit/install.sh)"

To install a specific version, replace install.sh in the download URL with install-<VERSION>.sh, for example install-v1.0.1.sh.

The installer selects the amd64 or arm64 package, verifies its SHA-256 checksum, installs the files, and registers industrykit.service. Because the default configuration does not enable any source, the service remains disabled and stopped.

Install the latest version from an elevated PowerShell:

Remove-Item -ErrorAction SilentlyContinue Env:INDUSTRYKIT_*;
$env:INDUSTRYKIT_DATAWAY_URL = "https://openway.truewatch.com?token=<DATAWAY_TOKEN>";
Set-ExecutionPolicy Bypass -Scope Process -Force;
Import-Module BitsTransfer;
Start-BitsTransfer -Source https://static.truewatch.com/industrykit/install.ps1 -Destination .install.ps1;
powershell ./.install.ps1;

To install a specific version, replace install.ps1 in the download URL with install-<VERSION>.ps1.

The installer selects the amd64 or arm64 package, verifies its SHA-256 checksum, installs the files, and registers industrykit as a Manual Windows service. Because the default configuration does not enable any source, the service remains stopped.

Installation paths

Content Linux Windows
Executable /usr/local/bin/industrykit %ProgramFiles%\IndustryKit\industrykit.exe
Runtime configuration /etc/industrykit/industrykit.toml %ProgramFiles%\IndustryKit\industrykit.toml
Configuration sample /etc/industrykit/industrykit.toml.sample %ProgramFiles%\IndustryKit\industrykit.toml.sample
WAL /var/lib/industrykit/wal %ProgramData%\IndustryKit\wal
Runtime log /var/log/industrykit/industrykit.log %ProgramData%\IndustryKit\logs\industrykit.log
PKI (when needed) /etc/industrykit/pki (must be created by an administrator) %ProgramData%\IndustryKit\pki
Service industrykit.service industrykit
Service definition /etc/systemd/system/industrykit.service Windows SCM

Linux installation requires administrator privileges, but the service runs as the unprivileged industrykit user by default. Modbus RTU also requires serial-port permissions for this user. See Modbus serial-port permissions on Linux.

On Linux, the configuration, data root, and log directories use 0755; the configuration and sample use 0644. Standard users can browse these directories and read the configuration, but editing it still requires administrator privileges. New log files retain the logging library's 0600 mode. New WAL category directories and data files use the diskcache defaults of 0750 and 0640, respectively; reading their contents may still require administrator privileges.

On Windows, the installation directory, configuration, logs, WAL, and PKI inherit permissions from their parent directories without additional administrator-only restrictions. Actual access depends on system settings. Installation, upgrades, and service management still require administrator privileges. If saving the configuration is denied, run your editor as administrator.

Configure and start

The generated industrykit.toml contains the Dataway, logging, WAL, and collector ID settings, as well as commented examples for all five protocols. No effective [[sources]] entries are enabled by default, so starting the process in this state does not collect device data.

The configuration format version is declared with version = 1. Common configuration fields are described below. See the protocol-specific documents for device protocol fields.

[collector]

Field Default Description
id The installer uses the hostname Collector instance ID. Required in manually written configurations and reported as the collector_id tag.
tags {} Global tags added to all data, such as site, data center, or environment.
listen 127.0.0.1:19090 Listen address for health checks and self-monitoring metrics. Only loopback addresses are allowed.
shutdown_timeout 10s Timeout for each graceful-shutdown phase.
channel_capacity 50000 Capacity of the metric and logging input channels. Valid range: 1..131072; normally no change is needed.

[logging]

Field Default Description
log Platform default log path IndustryKit runtime log file. A relative path is resolved from the directory containing the configuration file.
level info Log level: debug, info, warn, or error.
rotate 32 Rotate the current log file after it reaches this size, in MiB.
rotate_backups 5 Number of rotated backup files to retain.

Logs are retained for up to 30 days. This retention period is not currently configurable.

The [logging] section controls IndustryKit's own runtime logs. It is unrelated to device data configured with category = "logging".

[dataway] and optional [dataway.tls]

Field Default Description
url None Required absolute Dataway http/https URL. It must contain exactly one non-empty token query parameter and no userinfo or fragment.
timeout 10s Timeout for each HTTP request.
tls.ca_file Empty Additional trusted CA file in PEM format.
tls.cert_file Empty mTLS client certificate. Must be configured together with tls.key_file.
tls.key_file Empty mTLS client private key. Must be configured together with tls.cert_file.
tls.server_name Empty Optional TLS SNI and certificate verification name.

Relative TLS certificate paths are resolved from the directory containing the main configuration file.

[dataway.batch]

Field Default Description
max_points 1000 Maximum number of points in each metric or logging batch. Maximum: 1000.
max_bytes 524288 Maximum encoded size of a batch before gzip compression, in bytes. Maximum: 524288.
flush_interval 1s Send the current batch at this interval even when neither the point nor size limit has been reached.

The current batch enters the WAL for delivery when the point count, encoded size, or wait-time limit is reached, whichever comes first.

[dataway.wal]

Field Default Description
path Linux: /var/lib/industrykit/wal; Windows: %ProgramData%\IndustryKit\wal WAL root directory. Metric and logging data are stored separately beneath it. A relative path is resolved from the directory containing the configuration file.
max_bytes 2147483648 Per-queue capacity threshold for metric and logging data, in bytes. New batches are rejected after the threshold is reached. The two default queues use approximately 4 GiB in total.
max_age 12h Maximum retention time for batches that have not been delivered successfully.
retry_min 1s Minimum backoff for retryable errors.
retry_max 1m Maximum backoff; this also caps the server-provided Retry-After value.

WAL records are removed only after Dataway returns a successful response. New batches are rejected when the queue is full, and records past the retention limit are discarded during consumption.

Common [[sources]] fields

Field Default Description
id None Required and unique within the current configuration. Reported as the source_id tag.
type None Required: modbus, opcua, mqtt, s7, or snmp.
measurement industrial Metric measurement or log source reported to Guance. Give each protocol or workload an explicit name when practical.
interval 10s Collection interval for polling sources. Set SNMP explicitly to the recommended 30s. MQTT and OPC UA subscriptions do not use this setting to control message frequency.
tags {} Static tags for this source. They are merged with the global tags.

Common point fields

The [[sources.<type>.points]] entries for Modbus, OPC UA, S7, and SNMP share the following fields. MQTT uses topic mappings; see MQTT configuration.

Field Default Description
field None Required output field name.
category metric Output category: metric or logging.
tags {} Static tags for this point. They are merged with the global and source tags.
scale / offset 1 / 0 Modbus, S7, and SNMP transform numeric values as value * scale + offset. OPC UA currently does not apply these fields.
on_change false When true, emit a metric only after its value changes. Logging output is always change-driven.
emit_initial false Whether logging output or an on_change metric emits the first observed value. By default, the first value only establishes the change baseline.
status info Status field for logging output.

collector_id, protocol, and source_id are fixed tags added by the system and cannot be set in tags.

Choose the required protocol document, uncomment or copy a complete source example into the configuration file, and replace the device address, points, <...> credential placeholders, and certificate paths:

Protocol configuration Primary information required from the device
Modbus TCP/RTU IP address or serial port, Unit ID, register area, address, and data type
OPC UA Endpoint, authentication and security policy, and Node ID
MQTT Broker, authentication, topic filter, and payload structure
Siemens S7 PLC address, rack/slot, DB or area, and byte offset
SNMP v3 Agent address, USM credentials, and OID

Each source must also contain the protocol subsection whose name matches its type. Output is mapped as follows:

category Field source Delivery behavior
metric Point field, or MQTT topic fields/value_field Sent when polled or when a message arrives. Use on_change to suppress unchanged points.
logging Fixed point fields message, status, and value; MQTT fields message and status Points are emitted only when their values change by default. MQTT emits every matching message.

Validate the configuration, then start the service after validation succeeds:

industrykit validate --config /etc/industrykit/industrykit.toml
systemctl start industrykit
systemctl status industrykit --no-pager
$IndustryKit = "$env:ProgramFiles\IndustryKit\industrykit.exe"
$Config = "$env:ProgramFiles\IndustryKit\industrykit.toml"
& $IndustryKit validate --config $Config
& $IndustryKit service start
Get-Service industrykit

Starting at boot is optional: run systemctl enable industrykit on Linux, or Set-Service -Name industrykit -StartupType Automatic in an administrator PowerShell session on Windows.

The configuration is read only at startup. Restart the service after making changes.

Configuration supports ${ENV_NAME} variable references, but systemd and Windows services do not automatically inherit temporary environment variables from the current shell. When using this syntax, persist the variables through the corresponding service manager. Otherwise, put the actual values directly in the TOML file. The configuration contains credentials; review and set its read permissions according to your host's security requirements.

Verify collection and delivery

After the service starts, check the local health endpoints first:

curl -fsS http://127.0.0.1:19090/healthz
curl -fsS http://127.0.0.1:19090/readyz
curl -fsS http://127.0.0.1:19090/metrics
(Invoke-WebRequest -UseBasicParsing http://127.0.0.1:19090/healthz).Content
(Invoke-WebRequest -UseBasicParsing http://127.0.0.1:19090/readyz).Content
(Invoke-WebRequest -UseBasicParsing http://127.0.0.1:19090/metrics).Content

Pay particular attention to these self-monitoring metrics:

Metric Description
industrykit_source_up Whether the source's latest connection or poll succeeded. The healthy value is 1.
industrykit_samples_total Number of device samples received. This increases continuously during normal collection.
industrykit_dataway_points_total Number of points successfully delivered to Dataway. This increases continuously during normal delivery.

/readyz only indicates that the process and WAL can continue accepting data; it does not prove that any device is online. To verify the complete path, inspect the source status, sample count, Dataway delivery count, and runtime log together. For Modbus, S7, SNMP, or OPC UA poll mode, wait for at least one interval. For OPC UA subscription mode, wait for a node update. For MQTT, the publisher must produce a matching message. Then query the measurement configured for the source in Guance. Query data with category = "logging" under Logs.

View runtime logs:

tail -f /var/log/industrykit/industrykit.log
Get-Content "$env:ProgramData\IndustryKit\logs\industrykit.log" -Wait

Upgrade

An upgrade requires INDUSTRYKIT_UPGRADE=1. By default, an upgrade preserves the existing Dataway setting. Supplying a new complete URL updates only [dataway].url.

Upgrade to the latest version:

INDUSTRYKIT_UPGRADE=1 \
  sh -c "$(curl -fsSL https://static.truewatch.com/industrykit/install.sh)"

To update Dataway at the same time, add INDUSTRYKIT_DATAWAY_URL with its token query parameter.

Upgrade to the latest version:

Remove-Item -ErrorAction SilentlyContinue Env:INDUSTRYKIT_*;
$env:INDUSTRYKIT_UPGRADE = "1";
Set-ExecutionPolicy Bypass -Scope Process -Force;
Import-Module BitsTransfer;
Start-BitsTransfer -Source https://static.truewatch.com/industrykit/install.ps1 -Destination .install.ps1;
powershell ./.install.ps1;

To update Dataway during the upgrade, insert the following lines after $env:INDUSTRYKIT_UPGRADE and before Set-ExecutionPolicy:

$env:INDUSTRYKIT_DATAWAY_URL = "https://openway.truewatch.com?token=<DATAWAY_TOKEN>";

To upgrade to a specific version, use install-<VERSION>.sh or install-<VERSION>.ps1. An upgrade replaces the executable; on Linux it also refreshes the systemd unit, while on Windows it validates and reuses the existing SCM service definition. The current configuration, WAL, logs, Linux enable state, and Windows startup type are preserved. A service that was running before the upgrade is restarted; a service that was stopped remains stopped.

Service and commands

Operation Linux Windows elevated PowerShell
Validate configuration industrykit validate --config /etc/industrykit/industrykit.toml & "$env:ProgramFiles\IndustryKit\industrykit.exe" validate --config "$env:ProgramFiles\IndustryKit\industrykit.toml"
Show version industrykit version & "$env:ProgramFiles\IndustryKit\industrykit.exe" version
Start service systemctl start industrykit & "$env:ProgramFiles\IndustryKit\industrykit.exe" service start
Stop service systemctl stop industrykit & "$env:ProgramFiles\IndustryKit\industrykit.exe" service stop
Restart service systemctl restart industrykit & "$env:ProgramFiles\IndustryKit\industrykit.exe" service restart
Show status systemctl status industrykit Get-Service industrykit
Run in foreground industrykit run --config /etc/industrykit/industrykit.toml & "$env:ProgramFiles\IndustryKit\industrykit.exe" run --config "$env:ProgramFiles\IndustryKit\industrykit.toml"
Unregister service industrykit service uninstall & "$env:ProgramFiles\IndustryKit\industrykit.exe" service uninstall

service uninstall only unregisters the service; it does not delete the executable, configuration, WAL, or logs. On Linux, rerun the installation command without INDUSTRYKIT_UPGRADE to preserve the existing configuration and register the service again. Start it manually afterward. The Dataway URL is optional when a configuration exists; supplying it updates only [dataway].url. Windows does not yet support reinstalling directly with retained files.

Notes

  • validate checks only the configuration structure and values. It does not connect to devices, Brokers, or Dataway.
  • IndustryKit does not discover point addresses, Node IDs, DB offsets, or OIDs. Obtain them from device manuals, engineering configuration, or on-site scans.