Live streams

Site collector

Install the collector on your site: OPC UA, logger files or your own Python source to end-to-end encrypted streams.

The site collector is a program that runs on one host in your network (normally in the DMZ). It reads process data from OPC UA and OPC DA servers, MQTT brokers, Modbus devices, databases and historians, REST APIs, files that loggers drop in a folder, or your own Python code, encrypts it and publishes it as relay streams. This page is written for your OT engineer who installs it and your IT security team, who approves it. To install it, pick your source under Which source do I use? and follow its step-by-step page; this page holds what every source shares.

What it does

Data flow
 YOUR NETWORK                       SITE DMZ                         INTERNET
 +----------------+  OPC UA 4840   +----------------------+  443   +-----------------------+
 | DCS / PLC /    | <------------- | kymoscope-collector  | -----> | Kymoscope             |
 | Kepware        |   (the         |  - reads, shapes     | (only  |  - relay: forwards    |
 +----------------+   collector    |  - encrypts          | out-   |    ciphertext         |
 +----------------+   connects     |  - disk buffer       | bound) |  - holds no key, cannot 
 | Logger files   | -- to it) ---> |    (ciphertext)      |        |    read the values    |
 +----------------+                +----------------------+        +-----------------------+
                                                                              |
                                                          your browser decrypts and charts
  • It is a client (OPC UA, OPC DA, MQTT subscriber, Modbus master, database reader). It opens the connection to your server; nothing connects to it. The one exception is the optional webhook receiver, which listens on a port you choose.
  • Every value is stored at the rate the server offers it: nothing is resampled, averaged or deadbanded by the collector. A tag that reports only on change is stored when it changes.
  • A value with a Bad status is stored as a gap with its status, never as a number. Booleans and enumerations become numbers (the enumeration labels are not sent). Text, arrays and structures are not channels and are dropped; the health stream counts them in shaper_dropped.
  • Data is encrypted on the collector with your project key before it leaves. The relay holds no key and cannot read it.
  • It publishes the streams you list under streams:, each with one or more sources, and optionally one more with its own health. Each stream says its mode: live (watched as it comes) or record (also kept in the cloud). Kymoscope admits each stream against your plan when it starts; see Limits and usage.
  • A mode: record stream is recorded on this machine in files cut every split_every and uploaded to Kymoscope or your project's own storage. Every stream also carries a mark channel that flags moments. See Recording.
  • Optionally, cycles: cut any stream into cycles and phases on this machine, publish them as live channels and email when one runs late. See Cycles.
  • Alerts set to run on the sending machine run here on every value, with nobody’s browser open. See Alerts with nobody watching.

Which source do I use?

Each source in collector.yaml has a type. Find what you have in the first column; the last column is the page that explains that type. Install the matching pip extra on the collector host (several can be combined: pip install "kymoscope-collector[mqtt,sql]").

What you haveType, pip extra and page
An OPC UA server (DCS, PLC, Kepware, Ignition, a historian’s UA server)opcua. No extra (core). OPC UA to Kymoscope
An OPC DA (Classic) server, for example read by the PI Interface for OPC DAopcda. Extra opcda (plus windows). Windows only. OPC DA
A past period or a gap, and the OPC UA server keeps historybackfill_gaps on an opcua source, or the backfill command. No extra. OPC UA history
An MQTT broker, a Unified Namespace or Sparkplug Bmqtt. Extra mqtt. MQTT and Sparkplug
A CAN or CAN FD bus with a DBC file (test bench, vehicle, battery lab), or a CAN log (.blf, .asc, .trc)can. Extra can. Adapters: SocketCAN on Linux, PEAK, Vector, Kvaser, Ixxat, slcan and gs_usb with their drivers on Windows. Time stamps from the adapter. CAN and CAN FD
Meters, drives, skids, batteries, solar inverters on Modbus (SunSpec inverters need no map)modbus. Extra modbus. Modbus
Rockwell ControlLogix, CompactLogix or Micro800 PLCs, no OPC UAlogix. Extra logix. Rockwell Logix
Siemens S7-300, 400, 1200, 1500 PLCs (S7-1200 and 1500 need PUT/GET enabled)s7. Extra s7. Siemens S7
A Beckhoff TwinCAT PLC (machine builders, test benches), read by variable nameads. Extra ads. A missing AMS route on the PLC is the usual pitfall. Beckhoff ADS
Lab and legacy instruments: balances, gas analysers, meters on RS-232/RS-485 or a serial server, and SCPI/VISA multimeters, supplies and scopes (LAN, GPIB, USB)serial (extra serial) or scpi (extra scpi). Serial and SCPI
Building automation: HVAC controllers, chillers, meters on BACnet/IPbacnet. Extra bacnet. UDP 47808 must be open inbound as well as outbound; devices on another subnet need their address or a BBMD. BACnet/IP
A database: MES, LIMS, batch, cycler logs, AVEVA (Wonderware) Historian, Aspen IP.21, TimescaleDBsql. Extra sql. The AVEVA Historian, IP.21 and Timescale presets are written from vendor documentation: validate on your system. SQL and historians
CNC machines through an MTConnect agent (HTTP/XML)mtconnect. Extra mtconnect. Built from the public standard: validate on a real machine; history is only the agent's buffer. MTConnect
An InfluxDB 2.x (Flux) or 1.x (InfluxQL) that already holds the datainflux. Extra influx. Built from public docs: validate on your InfluxDB. InfluxDB
A REST API (including Canary and GE Proficy Historian), or a system that can push JSONrest (extra rest) or webhook (extra webhook). The Canary and Proficy presets are also unvalidated: validate on your system. REST and webhooks
A Kafka (or Redpanda, Confluent) cluster already carrying your datakafka. Extra kafka. JSON, raw numbers or Sparkplug B; no Avro. Offsets are committed only once the data is saved. Kafka
A simulator, a custom DAQ box or an embedded device that broadcasts fixed binary packets (or JSON / CSV lines) over UDP or TCPudp. No extra. You describe the packet in a small layout file; listening is an inbound port your IT team must approve. UDP and TCP packets
EEG, eye-tracking or motion-capture devices in a lab that stream over Lab Streaming Layer (LSL), with their event markerslsl. Extra lsl. Streams are found on the network; text markers become numbered channels. Lab Streaming Layer
CSV, Parquet, TDMS or MF4 files dropped in a folderfiles. No extra for CSV; extra files for the other formats. File watcher, below.
Battery cycler files (Neware .nda/.ndax, BioLogic .mpr, Arbin .res/Excel, Maccor, Basytec, Digatron exports) or HDF5 filesfiles with format. Extra cyclers or hdf5. The binary readers are written from public format descriptions: check the first file from each cycler. Battery cyclers and HDF5
A bench or a vendor SDKpython. No extra. Custom Python sources, below.
Anything else (DNP3, IEC 104, IEC 61850, CNC controllers without MTConnect)A gateway that exposes OPC UA or MQTT, or a custom Python adapter. Gateways

Two commands work with any source type that supports them:

Shell
# write the tags a configured source offers into a tags file
kymoscope-collector discover --config collector.yaml --source "Customer A DCS" --out tags.csv

# send a time range of a source's history into its stream, marked as history
kymoscope-collector backfill --config collector.yaml --source "Customer A DCS" --from 2026-10-01T00:00:00Z --to 2026-10-02T00:00:00Z

# try one source without sending anything: one line of JSON with each problem and its fix
kymoscope-collector check --config collector.yaml --source "Customer A DCS"

# what this collector is doing: blocks sent and dropped, whether anyone watches, recent problems, as one line of JSON
kymoscope-collector status --config collector.yaml

--source is the source's name. backfill works only for sources that can read history: OPC UA (the server's own history), SQL and REST, alone in their stream. For the others it stops with "can't read history". browse is the OPC UA-only variant of discover for a server you have not configured yet.

check exits with 0 when every check passed and 1 otherwise. It tests for --seconds (10 by default), saves no progress and leaves the source's state alone. The report holds tag names, counts and ranges; --samples adds a few raw values and exception messages. --offline only loads the configuration and the adapter. When a test could disturb the source (a files or webhook source, or a port the running collector holds), the report's not_run field says what was skipped and why.

Requirements

  • Host: Windows Server 2019 or later, a Linux server, Docker, or a Mac (set up through the Kymoscope MCP, which installs it as a launchd daemon). Python 3.10 to 3.14 for a pip install, from python.org or your distribution (not the Microsoft Store).
  • To the control system: the OPC UA port of your server or gateway (4840 or the vendor's port), from the collector to the server.
  • To Kymoscope: outbound TCP 443 (HTTPS and WebSocket), directly or through an HTTP proxy (see Proxy). No inbound ports.
  • Disk: room for the buffer (up to 2 GB per stream by default) plus the 1 GB free-disk floor.
  • Clock: synchronised (NTP). Data keeps its source timestamps, and the health stream reports the offset to the OPC UA server.
Outbound host (port 443)Used for
live.kymoscope.comThe relay: the collector publishes encrypted blocks over a WebSocket. The Kymoscope service tells the collector which relay address to use; if your firewall works with an allow list, allow *.kymoscope.com.
api.kymoscope.comThe Kymoscope service: API key check, stream registration and short-lived publish tickets.

When the project records to its own storage, recording files go to your bucket's endpoint or folder instead. See Record to your own server.

No other host is contacted. Package downloads (PyPI, the Docker registry) are needed only while installing.

Before installing

A checklist for your IT team, before anything is installed on a Windows host:

  • Application control (WDAC, AppLocker, Smart App Control): the Windows service runs in pythonservice.exe, the service host from pywin32, which is not code-signed (python.exe from python.org is). If your policy blocks unsigned binaries, allow that file by path or hash, run the collector in Docker or WSL instead, or wait for the signed installer.
  • Network: outbound TCP 443 to the hosts under Requirements (two, or three when the collector records streams itself), or an HTTP proxy that allows them (see Proxy). Nothing inbound.
  • Proxy authentication: Basic (a user and password in proxy), NTLM and Kerberos all work (proxy_auth, see Proxy). With proxy_auth: negotiate the collector authenticates as the account its service runs as, with no password in any file. For LocalSystem that is the computer account (DOMAIN\HOST$): allow that account (or a group it is in) through the proxy, or run the service under a dedicated domain account.
  • TLS inspection: if the proxy decrypts and re-signs HTTPS, the collector trusts the inspection root certificate once it is in the Windows certificate store (Local Computer, Trusted Root Certification Authorities), where group policy usually puts it. Nothing to configure. The data stays end-to-end encrypted inside the inspected connection.
  • Python: 3.10, 3.11, 3.12, 3.13 or 3.14 from python.org, installed for all users if the service will run under a dedicated account. The Microsoft Store Python is not supported: service install refuses it.
  • Account: the service's own account NT SERVICE\KymoscopeCollector (the default), LocalSystem (--account localsystem) or a dedicated local account; the Windows service steps below list the rights it needs.

Install

Windows service (pip)

  1. Install: pip install "kymoscope-collector[windows]", plus the extra of your source type (see Which source do I use?). To read Parquet, TDMS or MF4 files add the files extra: "kymoscope-collector[windows,files]".
  2. Create a folder (for example C:\ProgramData\Kymoscope) with collector.yaml and tags.csv (see below).
  3. Check the configuration in a console first: kymoscope-collector run --config C:\ProgramData\Kymoscope\collector.yaml, then stop it with Ctrl+C.
  4. Install and start the service from an administrator console.
Shell
kymoscope-collector service install --config C:\ProgramData\Kymoscope\collector.yaml
kymoscope-collector service start --config C:\ProgramData\Kymoscope\collector.yaml
kymoscope-collector service stop --config C:\ProgramData\Kymoscope\collector.yaml
kymoscope-collector service remove --config C:\ProgramData\Kymoscope\collector.yaml

service takes --config with every action. If the configuration reads a secret with env:NAME, set that variable for the service account, or use file:key.txt so the secret stays in a file only that account can read.

The service runs as its own account, NT SERVICE\KymoscopeCollector, with no right to act as another account: service install lets it read the configuration's folder and write state_dir. Give it modify rights on every watched folder and its done and failed folders, and read access to anything else outside that folder. service install --account localsystem installs it as LocalSystem instead. To run it under a dedicated local account, create a user such as kymoscope, then, from an administrator console:

Shell
sc.exe config KymoscopeCollector obj= .\kymoscope password= "<the password>"
icacls C:\ProgramData\Kymoscope /grant "kymoscope:(OI)(CI)M"
icacls C:\ProgramData\Kymoscope\streams /grant "kymoscope:(OI)(CI)M"
icacls C:\ProgramData\Kymoscope\pki\own\key.pem /grant kymoscope:R
icacls C:\ProgramData\Kymoscope\api-key.txt /grant kymoscope:R

The account needs: read access to the Python installation (service install prints its folder) and to the virtual environment, if you use one, so a Python installed for one user only, under C:\Users, will not do; modify rights on state_dir (the buffers, certificates and logs are written there), plus read access to pki/own/key.pem if it already exists (for example after a browse --config), and modify rights on the streams folder of state_dir when it exists: it does not inherit the folder's rights; read access to collector.yaml, tags.csv and any file: secret; modify rights on every watched folder and its done and failed folders (files are moved); and the "Log on as a service" right (Local Security Policy, User Rights Assignment: sc.exe config does not grant it). The service starts automatically (delayed) and restarts itself after a failure, including a stop caused by an error.

Docker

The image is ghcr.io/javijur/kymoscope-collector. Its /data volume holds the configuration, the tag list and the state (certificates, buffers). It runs run --config /data/collector.yaml.

Shell
docker run -d --name kymoscope-collector --restart unless-stopped \
  -v /srv/kymoscope:/data \
  -e KYMOSCOPE_API_KEY=kymoscope_... \
  -e TZ=Europe/Madrid \
  ghcr.io/javijur/kymoscope-collector

Put api_key: env:KYMOSCOPE_API_KEY and state_dir: /data/state in /srv/kymoscope/collector.yaml (/data/collector.yaml in the container) so state survives container upgrades.

Clock rules of cycles: (at: ["06:00"]) and split_every cuts use the machine's time zone. In Docker that is TZ (UTC when it is not set).

The container runs as user id 10001, so the mounted folder must be writable by it. A folder you create with mkdir belongs to root; give it to that user first, or start the container with --user set to the folder's owner. If /data is not writable the container stops at once and says so.

Shell
sudo mkdir -p /srv/kymoscope && sudo chown -R 10001:10001 /srv/kymoscope

Linux (systemd)

  1. Install: pip install kymoscope-collector (preferably into a virtual environment), with the extras of your source, for example pip install "kymoscope-collector[sql]".
  2. Create the service user: sudo useradd --system --no-create-home --shell /usr/sbin/nologin kymoscope.
  3. Copy the unit file to /etc/systemd/system/. It ships inside the package, at <site-packages>/kymoscope_collector/packaging/kymoscope-collector.service. Edit the paths to match your host.
  4. Put the configuration in /etc/kymoscope/collector.yaml with state_dir: /var/lib/kymoscope; the unit creates that folder for the service user.
  5. Run systemctl daemon-reload, then systemctl enable --now kymoscope-collector.

The unit uses ProtectSystem=strict: everything except the state folder is read-only for the service. A files source writes to its watched folder (processed files move to done), so list every such folder in the commented ReadWritePaths= line of the unit and uncomment it, and make sure the kymoscope user can write to those folders.

Updating

The disk buffer, certificates and stream identities live in state_dir and survive an update, so data collected meanwhile is sent afterwards.

Windows service

Stop the service first, or pip fails with WinError 32. From an administrator console, with the same Python or virtual environment the service was installed from:

Shell
kymoscope-collector service stop --config C:\ProgramData\Kymoscope\collector.yaml
pip install -U "kymoscope-collector[windows]"   # the extras you installed with (no history since 2.0)
kymoscope-collector service start --config C:\ProgramData\Kymoscope\collector.yaml

Docker

Shell
docker pull ghcr.io/javijur/kymoscope-collector
docker rm -f kymoscope-collector
docker run -d --name kymoscope-collector ...   # the same options as before

Linux (systemd)

Shell
sudo systemctl stop kymoscope-collector
sudo /opt/kymoscope/venv/bin/pip install -U kymoscope-collector   # the environment the unit runs
sudo systemctl start kymoscope-collector

collector.yaml reference

A complete example first, then the top-level keys. The file is read when the collector starts, so restart after changing it (tags.csv is the exception). A mistake stops the start with one sentence naming the key; so does a key the collector does not know (a typo), which also lists the valid ones.

collector.yaml
# collector.yaml. Relative paths resolve against this file's folder.
api_key: env:KYMOSCOPE_API_KEY
state_dir: C:/ProgramData/Kymoscope
buffer:
  max_mb: 10240
  min_free_mb: 1024
health:
  stream: Customer A health
  every_s: 5
streams:
  - name: Customer A
    mode: record                    # live | record (files recorded here, then uploaded)
    split_every: 1h                 # optional: a new file every hour, on the clock
    sources:
      - name: DCS                   # its channels are DCS/<tag>
        type: opcua
        url: opc.tcp://dcs-gw:4840
        security: Basic256Sha256
        mode: SignAndEncrypt        # OPC UA message security, not the stream's mode
        user: kymo-reader
        password: env:OPCUA_PASSWORD
        tags: tags.csv
      - name: Cycler drops
        type: files
        path: D:/cycler/export
        pattern: "*.csv"
  - name: Bench rig
    mode: live                      # watched as it comes, nothing kept
    stream_password: file:stream-password.txt
    sources:
      - name: Bench rig
        type: python
        module: random_walk.py
        class: RandomWalk
        options: {tags: 5, hz: 10}
        hz: 10                      # its samples a second, for the stream's declaration (default 1)

Top level

KeyMeaning and default
api_keyRequired. The Kymoscope API key; it decides where the streams go: a key created in a project’s API keys tab publishes into that project, a personal key publishes personal streams. Switching from a personal key to a project key starts new streams of the same names in that project; the old ones stay offline, and what their disk buffer still held is set aside, unsent, in a folder ending in -orphan-<stream id>. Write env:NAME to read an environment variable, file:PATH to read a file (relative to this file), or the key itself.
state_dirWhere the collector keeps its identity, certificates (pki/) and buffers. Default: state, next to this file. Keep it on a local disk with room.
buffer_max_mbDisk buffer limit per stream (also per stream, under streams:). Default 2048. The older buffer.max_mb still works.
buffer.min_free_mbFree-disk floor; below it the collector stops adding to the buffer. Default 1024.
buffer.memory_mbMemory queue per stream while it cannot send or register. Default 256. See Store-and-forward.
live.rate_hzLive messages per second for each stream, 1 to 100. Default 20. Limited by your plan. See Live rate.
health.streamName of the health stream. Omit it to publish no health stream.
health.every_sSeconds between health rows. Default 5.
log.librariesinfo (default) or debug: libraries’ debug lines in collector.log too, only while support asks for them (see Logs and support).
proxyOptional. HTTP proxy for every connection to Kymoscope, as http://host:port or http://user:password@host:port. env: and file: work as for api_key. See Proxy.
no_proxyOptional. Hosts that skip the proxy: a comma-separated string or a list.
proxy_authbasic (default), negotiate (Kerberos with NTLM fallback, as the account the collector runs as) or ntlm (DOMAIN\user and password in proxy). See Proxy.
tls_trustsystem (default): the operating system’s certificate store, where IT installs the root of a TLS-inspecting proxy; bundled: only the certificates that come with Python. See Proxy.
ca_bundleOptional. A PEM file (relative to this file) with extra root certificates to trust, for hosts where the inspection root is not in the system store (Docker, some Linux hosts). See Proxy.
cyclesOptional. Cut streams into cycles and phases on this machine, publish them as live channels and email alerts. See Cycles.
ruleson (default) or off: alerts set to run on the sending machine run here. See Alerts on this machine.
alertsOptional. Your own mail server and webhook for alerts with their values, and the cycle alerts. See Alerts on this machine.
streamsRequired. List of streams, each with its sources (below). A top-level sources: is refused since collector 1.0.

Every stream

A stream is what your plan counts, so one collector is usually one stream with all its sources. In a stream of more than one source every channel is named Source/Channel (DCS/FIC101), so equal tag names never collide; a stream of one source keeps its names. Each source goes in messages of its own, so a fast source and a slow one never inflate each other.

KeyMeaning and default
nameRequired. The stream name in Kymoscope, unique in the file.
modeRequired, no default. live: watched as it comes, nothing kept. record: also recorded, in files cut on this machine and uploaded to Kymoscope or the project's own storage. See Recording.
triggerOptional, with mode: record: {start, stop, start_after, stop_after} to record only from a start condition to a stop condition, each run a file of its own. See Record by trigger.
split_everyOptional, with mode: record: how often a file is cut, 1m to 24h, on the clock. Default: from the declared rate (files of about 150 MB).
buffer_max_mbOptional. Local space for this stream’s files not stored yet. Default: the top-level buffer_max_mb (2048).
storageOptional. The project's own storage, when it has one: {folder: <path>} or {s3: {endpoint, region, bucket, prefix, access_key_id, secret_access_key}}. See Record to your own server.
retention_daysOptional, own storage only: days Kymoscope lists each file. Default: kept.
stream_passwordA personal stream’s password: viewers type it to watch (12 characters or more, or the collector refuses the file; allow_short_password: true accepts a shorter one on purpose; file: or env: keeps it out of this file). Left out, the API key’s secret is used and the log asks for one. Not used by a project’s streams. See Who can watch a stream.
visibilityprivate (default): listed for every signed-in user, behind stream_password; open: anyone watches with nothing typed (not end-to-end encrypted; no stream_password).
live.rate_hzOptional. This stream’s live messages per second, in place of the top-level live.rate_hz.
sourcesRequired. The stream’s sources (below).
camerasOptional. Cameras published as channels of this stream, in its mode: each {name, input, quality, fps} plus format, input_options, copy and low. Needs ffmpeg (the Docker image has it). See Cameras from the collector.

Every source

KeyMeaning and default
nameRequired. Unique in the file; the prefix of its channels in a stream of several sources.
typeRequired. The source type (opcua, mqtt, modbus, files, python, ...).
hzOptional. Samples a second this source reads, for the stream’s declaration. The collector knows it for polled sources (the poll interval, OPC UA’s publishing_ms); a source that hands on whatever arrives (files, MQTT, Kafka, UDP, webhooks, python) is declared at 1 Hz unless you set it.
mark_tagOptional. A channel of this source whose rise (from 0 or below to above 0) marks the stream: its mark channel is 1 for that sample.

Proxy

If your network reaches the internet only through an HTTP proxy, name it in collector.yaml. The collector tunnels both the HTTPS calls to the Kymoscope service and the relay WebSocket through it (HTTP CONNECT), so the data stays end-to-end encrypted and the proxy sees only the host names.

collector.yaml
proxy: env:KYMOSCOPE_PROXY        # e.g. http://kymo:p%40ss@proxy.customer.local:8080
no_proxy: [historian.customer.local, .corp.local]
KeyWhen to use it
proxyThe proxy, as http://host:port. With Basic authentication the user and password go in the URL: http://user:password@host:port.
proxy_authHow the collector proves who it is to the proxy. basic (default): the user and password in proxy. negotiate: Kerberos, falling back to NTLM, as the account the collector runs as; no password anywhere. ntlm: a named account, http://DOMAIN%5Cuser:password@host:port in proxy.
no_proxyHosts reached directly, not through the proxy: your historian, a REST device on the LAN.
tls_trustsystem (default): trust what the operating system trusts (Windows certificate store, macOS keychain, the Linux system bundle), so a TLS-inspecting proxy works once IT has installed its root certificate there. bundled: trust only the certificates that ship with Python.
ca_bundleA PEM file with the inspection root certificate, trusted on top of either. For Docker and Linux hosts where the root is not in the system store.
collector.yaml (Windows service, Kerberos proxy, TLS inspection)
proxy: http://proxy.customer.local:8080
proxy_auth: negotiate             # as LocalSystem: the computer account DOMAIN\HOST$
collector.yaml (Docker, NTLM account, inspection root as a file)
proxy: file:proxy.txt             # proxy.txt holds http://CORP%5Ckymo:p%40ss@proxy.customer.local:8080
proxy_auth: ntlm
ca_bundle: corp-root.pem
  • Credentials go in the URL. Percent-encode special characters (@ is %40, : is %3A, \ is %5C).
  • Keep the password out of the file with env: or file:. The log shows the proxy host and port, never the credentials.
  • With negotiate or ntlm the collector authenticates through a local forwarder on 127.0.0.1 that only the collector itself can use. It carries HTTPS only: a plain http:// URL is refused with 501 Not Implemented; put such hosts in no_proxy or use https.
  • negotiate uses the account the collector runs as (LocalSystem is DOMAIN\HOST$, see Before installing). On Linux the account needs a Kerberos ticket (kinit or a keytab).
  • The first connection logs whether the proxy accepted it (a proxy that asks only for Basic gets the hint to use proxy_auth: basic), and a failed tunnel logs a line per attempt with the proxy's answers; tokens and passwords never appear. For more detail, add log: {libraries: debug}, restart and send a support bundle (see Logs and support).
  • The setting applies to the whole collector process. OPC UA connections never use it.
  • A Windows service does not see the proxy set in a user's Windows or browser settings, so set proxy even if a console run works without it.
  • The startup log says which certificates are trusted (TLS trust: ...).

Security notes

  • Outbound only. The collector listens on no port. Two conduits: control system to collector (the OPC UA port) and collector to Kymoscope (443).
  • Strong by default. OPC UA uses SignAndEncrypt with Basic256Sha256. Older SHA-1 policies are not offered. Using no security takes two deliberate settings (security: None and allow_insecure: true) and logs a warning at every connection.
  • Read-only. The collector only reads and subscribes; it never writes to the server. Give it a dedicated OPC UA user with read access only.
  • Encrypted before it leaves. Values are encrypted on the collector with AES-256-GCM using a key derived from your API key secret. The relay and Kymoscope servers carry ciphertext only.
  • The buffer on disk is ciphertext. What waits in state_dir/buffer during an outage is already encrypted, so a copied disk does not reveal your data. The API key (with its secret part) is the one secret on the host: keep it in an environment variable or a file with restricted permissions, not in a shared collector.yaml.
  • Secrets out of the YAML. api_key and password accept env: and file:, so the YAML can be reviewed and versioned without secrets.
  • Private key. state_dir/pki/own/key.pem identifies the collector to the OPC UA server. The collector creates it readable only by its owner (mode 0600 on Linux; on Windows only the current user, SYSTEM and Administrators).

Live data only while someone watches

The collector sends a stream's live data only while someone has it open in the app or a cloud recording of it is on. With nobody watching, it stays connected, reads the source as usual and sends nothing live; when someone opens the stream, live data starts within a fraction of a second. The SDK and the plugins work the same way. Nothing is lost:

  • Recordings (mode: record) get every value, watched or not.
  • Cycles and their alerts run on this machine and get every value, watched or not.
  • Saved progress (an OPC UA source's last time, a SQL watermark, a Kafka offset, a file ledger) moves on as usual, so a restart never reads the same values again.

In kymoscope-collector status, watched says whether anyone watches or records, relay_connected whether the stream is connected, and blocks_unwatched counts the blocks read while nobody watched, so a blocks_sent that stops growing is no stall.

Store-and-forward and the disk floor

If the network or Kymoscope is unavailable while someone watches or a cloud recording is on, acquisition continues and the blocks, already encrypted, fill the stream's disk buffer in state_dir/buffer (with nobody watching none are kept; recordings have them already). When the connection returns, live data goes first and the backlog follows, marked historical, while someone watches; otherwise it waits on disk until someone opens the stream. A restart keeps the buffer.

  • Size limit: buffer_max_mb per stream (default 2 GB).
  • Disk floor: buffer.min_free_mb (default 1 GB). When the disk has less free space, the collector stops adding to the buffer rather than fill the disk.
  • In both cases new blocks are dropped while the condition lasts, and they are counted in <source>.buffer_dropped. Alarm on that channel and on disk_free_gb.

While a stream cannot be registered (no network, a wrong key, or a project that waits for approval), its blocks wait in a memory queue bounded by buffer.memory_mb (default 256). When the queue is full the oldest blocks are dropped and counted in <source>.queue_dropped.

Live rate

The collector sends each stream as small messages, 20 a second by default, so live charts move smoothly. Each message holds every value read since the previous one, with its own time: nothing is averaged or dropped, and a source that reads less often sends only when it has something new.

Each stream declares its bandwidth when it starts (per source, its samples a second and channels) and is held to it; your plan sets how much may run at once. See Limits and usage. A source that reads more than it declared falls behind instead of losing data.

To send fewer messages (a slow link, a source that changes rarely), set a lower rate for all streams or for one stream:

collector.yaml
live:
  rate_hz: 10          # every stream: 10 messages a second (default 20, at most 100)
streams:
  - name: Customer A DCS
    mode: live
    live: {rate_hz: 5} # this one only
    sources:
      - {name: Customer A DCS, type: opcua, url: opc.tcp://dcs-gw:4840, tags: tags.csv}
  • Recordings get the same values whatever the rate.
  • An OPC UA source sends what its server reports every publishing_ms (default 500), so its live chart updates about twice a second. For faster updates, lower its publishing_ms (and default_sampling_ms); each step down asks more of the OPC UA server.

Health stream

With health.stream set, the collector publishes a row every health.every_s seconds as a normal stream that you chart and alert on like any other. Channels are named <source name>.<key>.

ChannelMeaning
<source>.values_per_sValues received per second (smoothed over about 5 s).
<source>.files_done, .files_failedFiles: files processed, and files that failed (see the failed folder).
<source>.buffer_mbSize of that stream’s disk buffer. Rises during an outage.
<source>.buffer_droppedBlocks the buffer refused (size limit or disk floor).
<source>.queue_droppedBlocks dropped from the memory queue while the stream could not register (oldest first).
<source>.duplicate_timesValues that share an exact time with another value of the same channel in the same batch.
<source>.waiting_for_approval1 while the stream waits for the project owner’s approval.
<source>.health_errorsErrors raised while collecting this source’s own health values.
<source>.shaper_droppedValues dropped because they are not numbers (text, arrays).
<source>.camerasWith cameras: on its stream: how many are publishing now (a camera whose ffmpeg stopped starts again after 10 s).
<source>.blocks_per_sBlocks handed to the sender per second: about live.rate_hz when data flows, fewer for a source that reads less often.
<source>.alerts.rulesAlerts running on this source.
<source>.alerts.waitingAlerts that wait for a channel none of the stream’s sources has.
<source>.alerts.rule_errorsErrors with alerts here: one that couldn’t be opened or built, or a failed check (the log says which).
<source>.alerts.eval_msMilliseconds spent checking alerts per second of data, over the last minute.
alerts.queuedRecords waiting on disk for Kymoscope: alert starts and ends, cycle flags, the minute’s check-in. Rises during an outage.
disk_free_gbFree space on the disk holding state_dir.
uptime_sSeconds since the collector started.

Each source type adds its own channels (listed on its page). A Python source adds whatever its own health() method returns, under the same naming.

Alerts on this machine

Alerts set to run on the sending machine run on the collector, on every value, watched or not; their starts and ends wait on disk under state_dir/alerts until Kymoscope has them. A tutorial: Alerts with nobody watching.

KeyMeaning and default
ruleson (default) or off. off: no alert runs on this machine.
alerts.emailOne address or a list (up to 20), mailed through alerts.smtp. Without smtp, the cycle alerts go through Kymoscope instead (see Cycles).
alerts.smtpYour own mail server: host, port, user, password, from, security (starttls, ssl or none; none sends the password unencrypted, and the collector says so in its log at start). Mails every alert start and end, with its values, to alerts.email.
alerts.webhook.urlYour own http:// or https:// endpoint, on your network. Every alert start and end, and every cycle flag, is posted there with its values. Kymoscope’s own addresses are refused.
alerts.webhook.secretOptional. Signs each post (X-Kymoscope-Signature). Write file:webhook-secret.txt or env:NAME.

The webhook gets one POST per alert change, with Content-Type: application/json, X-Kymoscope-Event (the body’s type), X-Kymoscope-Delivery (the body’s deliveryId: the same alert change always has the same id, so your endpoint can drop a repeat) and, with a secret, X-Kymoscope-Signature: t=<Unix time>,v1=<hex HMAC-SHA256 of "t.body">, checked as in Alert webhooks. type is alert.raised, alert.cleared, alert.lost (the alert was changed or turned off while raised) or cycle.flagged. Times are UTC; values holds the alert’s channels at that moment (null: no value). Each post is tried once, within 10 seconds, with no redirect; one that fails is logged and dropped.

Body
{
  "type": "alert.cleared",
  "rule": { "id": "6f0c1c1e-0000-4000-8000-000000000001", "name": "Oil temperature high" },
  "severity": "critical",
  "stream": { "id": "7d3c1f00-0000-4000-8000-0000000000c1", "name": "Press 2" },
  "raisedAt": "2026-11-17T03:12:07.250Z",
  "clearedAt": "2026-11-17T03:20:41.000Z",
  "peak": { "v": 127.4, "t": "2026-11-17T03:15:02.500Z" },
  "values": { "DCS/Oil_Temp": 117.9 },
  "deliveryId": "3f9a1c0e7b2d4e58a6c1f0b9d2e7a431"
}

Custom Python sources

For a bench or a vendor SDK, write a small class and point a source at it. The collector adds shaping, encryption, buffering and health.

Let your AI assistant do this: it writes the class, tests it and installs it.

random_walk.py
import asyncio
import random
import time

from kymoscope_collector import Adapter, TagInfo, Value


class RandomWalk(Adapter):
    def __init__(self, tags=5, hz=10):          # receives the source's "options"
        self.n, self.hz = int(tags), float(hz)

    async def discover(self):                   # the channels this source offers
        return [TagInfo(id=f"RW{i}", name=f"RW{i}") for i in range(1, self.n + 1)]

    async def start(self, emit):                # runs until the collector stops
        x = [0.0] * self.n
        while True:
            now = time.time()
            for i in range(self.n):
                x[i] += random.gauss(0, 1)
            emit([Value(f"RW{i + 1}", now, x[i]) for i in range(self.n)])
            await asyncio.sleep(1 / self.hz)
collector.yaml
streams:
  - name: Bench rig
    mode: live
    sources:
      - name: Bench rig
        type: python
        module: random_walk.py
        class: RandomWalk
        options: {tags: 5, hz: 10}
        hz: 10                # what the stream declares (default 1)
  • discover() returns the channels as TagInfo(id, name, unit, description).
  • start(emit) runs until cancelled and calls emit([Value(tag, t, v)]), with t in Unix seconds and tag equal to the TagInfo.id. An optional status is an OPC UA status code (0 is Good).
  • A source that reads many samples at once (a DAQ driver returning arrays, a vendor SDK's buffer) emits them as one block instead: emit([Samples(t, {"ch1": a1, "ch2": a2})]), with t the Unix times of the samples (ascending) and one array of the same length per TagInfo.id (NaN is a gap). Import it with from kymoscope_collector import Samples. A Value costs a Python object per reading, which tops out near a million values a second; a block goes through as arrays, several times faster. Blocks and Values can be mixed in one emit.
  • health() optionally returns a mapping of numbers that appear in the health stream.
  • If the class raises an error, the collector logs it and restarts the source after 5 seconds.
KeyMeaning and default
moduleRequired. Path to your .py file, relative to collector.yaml.
classRequired. The class in that file; it subclasses Adapter.
optionsOptional mapping passed to the class constructor as keyword arguments.

File watcher

A source of type: files watches a folder for files written by loggers, cyclers and DAQ software. A file is read once it has not been modified for min_age_s (default 10 seconds), and every row keeps its own timestamp.

The stream declares a files source at 1 Hz unless you set hz: on it, for example hz: 10 for a logger writing 10 rows a second. If it hands on more, the collector log says so once: "… is declared at 1: set hz: N on it".

Files are not live. A file is read only after it has been written and closed, so its rows arrive seconds to minutes late and never show in the live chart. For a live view, connect the system that writes the files through a protocol it offers (OPC UA, MQTT, Modbus, S7, a database). To look at the files themselves, no collector is needed:

  1. Open app.kymoscope.com and sign in.
  2. In the workspace, click Files in the left rail, then drop the files or folders on Drop files or folders, or click it to choose them.
  3. Each file opens as a dataset with its own time column; files written later are opened the same way.
FormatNotes
CSV (.csv)Delimiter comma, semicolon or tab, detected from the header. A decimal comma is accepted when the delimiter is not a comma. Built in.
Parquet (.parquet)One column per channel plus a time column. Needs the files extra.
TDMS (.tdms)Numeric channels with wf_start_time and wf_increment properties (a channel without them fails the file). Needs the files extra.
MF4 (.mf4, .mdf)Numeric channels; time is the file header start time plus each channel’s timestamps. Needs the files extra.
Shell
pip install "kymoscope-collector[files]"
  • By default every supported extension is picked up; set pattern (for example *.csv) to narrow it.
  • Never twice: the collector keeps a ledger of processed files in its state folder, so a file is never sent twice, even if it cannot be moved out of the watched folder (read-only folder, file locked by another program).
  • done: processed files move to done_dir (default: done inside the watched folder). A name that already exists there gets a numeric suffix. Files older than keep_done_days (default 30) are deleted from there.
  • failed: a file that cannot be read moves to failed inside the watched folder, next to a .error.txt file that says why. Fix the cause and move the file back to the watched folder to retry. files_failed in the health stream counts them.
  • The channels are the columns of the newest file present at start, so at least one sample file must be in the folder (or in done) when the collector starts. Columns that first appear later are picked up without a restart.
  • Each file is read completely and sent as one batch, in time order, so a very large file needs memory for all of it.
KeyMeaning and default
pathRequired. The folder to watch (not searched recursively).
patternFile name pattern. Default: every supported extension (.csv, .parquet, .tdms, .mf4, .mdf).
time_columnCSV and Parquet: the time column. Default: the first column named time, timestamp, t or datetime, else the first column.
time_formatauto (default), epoch or iso. auto reads numbers as epoch seconds (milliseconds when above 1e11) and text as ISO 8601; ISO times without a zone are read in the zone set by timezone.
scan_sSeconds between folder scans. Default 5.
done_dirWhere processed files move. Default: a folder named done inside the watched folder.
min_age_sA file is read only when it has not been modified for this many seconds. Default 10. Raise it for loggers that write slowly.
timezoneIANA zone name (for example Europe/Madrid) for times without a zone. Default: the host’s zone.
keep_done_daysDays processed files stay in done_dir before they are deleted. Default 30.
formatauto (default), or a battery cycler or HDF5 format: see Battery cyclers and HDF5.

Logs and support

The collector writes everything it does to collector.log in the logs folder of state_dir: C:\ProgramData\Kymoscope\logs\collector.log with the example above, or state\logs next to collector.yaml when state_dir is not set (/srv/kymoscope/state/logs on the host with the Docker example). The service, the console and Docker all write there.

  • Each start: the collector, Python and Windows or Linux versions, the account, the paths and every source with its options.
  • Every connection, disconnection and retry with its reason, every call to Kymoscope and the relay, and every stop with its reason.
  • A configuration error, and any unexpected error with its full traceback, even before the configuration is read.
  • The file holds detail the console doesn't show. It rotates at 10 MB and keeps the last 20 files.

When the Windows service fails to start, Event Viewer (Windows Logs, Application, source KymoscopeCollector) shows the error and where the log is.

Send us a support bundle

One command collects what support needs into a single zip: the logs, collector.yaml with its secrets masked, and the versions, account, service state and file list of state_dir. If any known secret were still in it, no zip is written.

Shell
kymoscope-collector support --config C:\ProgramData\Kymoscope\collector.yaml

It prints the path of kymoscope-support-<host>-<time>.zip (written in the current folder; --out picks another). Email that file to soporte@kymoscope.com (it opens a case), with a line on what happened. In Docker, run docker exec kymoscope-collector kymoscope-collector support --config /data/collector.yaml --out /data/support.zip and send /srv/kymoscope/support.zip.

If you already have a case open, add its number and the collector attaches the zip to it:

Shell
kymoscope-collector support --config C:\ProgramData\Kymoscope\collector.yaml --case KS-1042

It uses the configuration's API key (its account must be able to see the case), the configured proxy and TLS trust, and keeps the zip on disk. If it can't attach, it says why: email the zip to soporte@kymoscope.com instead.

If support asks for more detail from the libraries the collector uses (OPC UA, MQTT, HTTP), add log: {libraries: debug} to collector.yaml, restart, reproduce the problem, send a new bundle, and remove the line again: it makes the log much larger.

Troubleshooting

SymptomCause and fix
Anything not listed hereLook at collector.log and email a support bundle to soporte@kymoscope.com (see Logs and support).
Anything about the OPC UA server, certificates or tagsSee If something goes wrong on OPC UA to Kymoscope.
"environment variable X is not set"The service or container does not see the variable. Set it for the service account or the container (-e), or use file:.
A file source keeps restartingNo file matches pattern yet. Put a sample file in the folder.
"... approve this sender" staysA new collector waits until a project member's browser admits it. Open the project in Kymoscope on a browser that already opens it; it is admitted within seconds, with nothing to click. Once per stream.
"'history' was removed in collector 2.0" (or recording, segments, sinks)The file was written for an earlier collector. See Upgrading to 2.0 under Updating.
"stream ... cannot start" in the logThe collector cannot register the stream and retries. Check the API key and outbound access to the two hosts above.
"Permission denied" on pki/own/key.pemThe service runs under an account that did not create the private key. Grant it read access: icacls <state_dir>\pki\own\key.pem /grant <account>:R.
"WinError 32" from pip installThe service is running and holds the files open. Stop it, upgrade, start it again (see Updating).
"stream ... cannot start" mentions a proxyCheck proxy: the host and port, the credentials (percent-encoded), and that the proxy allows CONNECT to both hosts on port 443. With proxy_auth, the log line that starts with the proxy's host says whether authentication succeeded. A certificate error behind a TLS-inspecting proxy: keep tls_trust: system and install its root certificate, or name it in ca_bundle.
buffer_dropped risesThe outage outlasted buffer_max_mb, or the disk is below buffer.min_free_mb. Free disk space or raise the limits.