Trading Session Gateway
Overview Copied
Trading Session Gateway (TR Gateway) is a high-performance collector for trading-session data such as TCP session health, order flow, execution reports, and related protocol traffic. It is a standalone Geneos component — it is not the Geneos Gateway process, and not a Netprobe plugin. It runs as its own process and acts as a Netprobe so Geneos Gateway can connect and display metrics.
With TR Gateway, you can:
- Ingest trading session data over gRPC from the file streamer, or tail log files directly from disk.
- Parse binary-format trade protocol families.
- Track session connectivity, sequence state, and order lifecycle metrics.
- Publish self-monitoring and per-protocol dataviews to Geneos.
- Search retained trade messages from Active Console.
Use TR Gateway when you need Geneos monitoring for trading connectivity and order flow across trading protocols.
How TR Gateway works Copied
Trading data flows into TR Gateway over one of two ingestion lanes. TR Gateway parses and correlates that data, then publishes metrics to Geneos Gateway, which connects to TR Gateway as a standard probe. Geneos Gateway applies rules and shows the results in Active Console.
Streaming lane File lane
Trading logs Trading logs
│ │
▼ │
file streamer │
(File Streamer Collection Agent plugin │
+ gRPC reporter) │
│ gRPC │ top-level data-dir
▼ ▼
┌──────────────────────────────────────────────┐
│ TR Gateway │
└──────────────────────┬───────────────────────┘
│ EMF2 probe listen
▼
Geneos Gateway
│
▼
Active Console
Inside TR Gateway, data moves through these stages:
- Ingest — accept trading session data from the file streamer over gRPC (streaming lane), or ingest and tail log files from the top-level
data-dir(file lane). See Ingestion lanes. - Journal — buffer streaming records in a per-channel journal for intra-day recovery and replay.
- Decode — detect protocol family, apply the configured dialect (or built-in raw parser), and update session state.
- Correlate — track order lifecycle and related message groups where the dialect path supports it.
- Publish — export self-monitoring and trading dataviews to Geneos. Search and the diagnostic Status UI are optional.
Ingestion lanes Copied
TR Gateway has two ways to receive trading data. You can use either lane or both.
| Lane | How data arrives | Configure with | Typical use |
|---|---|---|---|
| Streaming | The file streamer tails the trading logs and streams records to a channel gRPC port. The channel journals each batch. | channels |
Production monitoring of live trading logs. |
| File | TR Gateway ingests and tails the log files under a local directory itself. The file streamer is not involved. | Top-level data-dir and tail-interval-ms |
Offline analysis. The offline instance runs without the file streamer. |
The two lanes share the same decode, correlate, and publish stages. The journal settings apply to the streaming lane only. For data-dir, see Top-level configuration.
Supported protocols Copied
TR Gateway monitors these protocol families. Streaming ingestion uses the same channel and journal shape for each family. Dialect plugins select the wire format.
| Family | Typical use | Dialect | Payload encoding on gRPC |
|---|---|---|---|
| FIX | Order entry and execution (tag-value text) | Built-in FIX (no dialect entry required) | base64 |
| OUCH | Binary order entry | Value supplied by ITRS. Needed to use the dialect plugin. | base64 |
| SQF | Quote / specialized quote interfaces | Value supplied by ITRS. Needed to use the dialect plugin. | base64 |
| DROP | Drop-copy / reference streams | Value supplied by ITRS. Needed to use the dialect plugin. | base64 |
Note
Contact your ITRS account manager for which protocol families you can run and for the dialect value to set for each family inprotocol-dialects. The shipped configuration template lists the values for the families it is built for. Theallpackage covers more than one set of families, so ask your ITRS account manager which template and dialect values to use for your feeds. See Protocol dialects. TR Gateway can monitor FIX and the other protocol families when you have the matching licenses and dialects.
Key concepts Copied
Sessions Copied
A session is keyed by the pair (protocol and id). The same ID reused across protocols is distinct.
- For FIX, the ID is the sorted
SenderCompIDandTargetCompIDpair. Traffic in both directions is treated as one session. - For OUCH, SQF, and DROP on the streaming lane, the ID comes from the file streamer
sessionproperty. If that property is missing, TR Gateway uses the channeldefault-<family>-session-id. If that is also missing, it uses the bare protocol name (for example,OUCH). On thedata-dirlane, the session is the base-name text before the capture group. When the name has no group, or nothing before the group, the session is the text before the first_. Seecapture-group-pattern.
FIX drop copy sessions Copied
TR Gateway classifies a FIX session as FIX-DC when any of the following apply:
- The channel that owns the session sets
session-class: drop-copy. - A
SenderSubIDorTargetSubIDon a message matches the configuredfix-dc.subid-pattern. - Drop-copy traffic evidence appears, and
fix-dc.classify-by-trafficis enabled.
Classification is one-way. After TR Gateway classifies a session, the session keeps that label for its lifetime.
If one CompID pair carries both order-entry and drop-copy traffic under different SubIDs, enable fix-sessions.subid-split so TR Gateway resolves them to separate sessions. For more information, see FIX sessions and drop copy.
Channels and journals Copied
Each entry under channels is a named streaming-ingestion endpoint. The file streamer sends batches to the channel’s gRPC port. The channel journals those batches before routing them into the session registry.
Important
Journals roll by trading-day directory (rollover-timeandrollover-timezone), replay only the current trading day on restart, and can delete older day directories when retention is enabled.
Silent-correctness Copied
Important
The following settings can be wrong or missing with no error. TR Gateway still starts and still ingests, but it stores or labels data differently. Get these settings wrong and monitoring looks healthy while the data is not what you intended. For more information, see Silent-correctness settings.
Protocol dialects Copied
For every non-FIX family you stream, protocol-dialects selects which dialect plugin decodes and normalizes that family. If you omit a family that is licensed and streaming, TR Gateway still starts and still journals. It uses the built-in raw family parser, which decodes one fixed venue layout. A feed from another venue is misparsed. That path does not produce the same Geneos dataviews or FIX-normalized search rows as a dialect plugin.
Local CompID prefixes Copied
local-comp-id-prefixes tells TR Gateway which FIX CompIDs are local (self). TR Gateway uses the list when the file streamer has not already supplied a direction for the message. A direction from the file streamer, including the QuickFIX/J incoming or outgoing marker in a text log line, always takes precedence. Without one, TR Gateway checks the CompIDs: if the SenderCompID matches, the message is outbound, and if the TargetCompID matches, it is inbound. If neither matches, or the list is empty, TR Gateway infers direction from the FIX message type and the perspective setting, with no error. Wrong direction can break per-session sequence tracking. The data-dir file lane does not use this list. See Local CompID prefixes.
Message search Copied
Message search copies trade messages into an embedded QuestDB store so you can look them up later by time range and key. It is active only when search.data-dir is set. The shipped tr-gateway.yaml sets it. For more information, see Search Messages.
Diagnostic Status UI Copied
To run live diagnostics, enable the optional built-in Status/Search UI and JSON API. Use Geneos dataviews, rules, and Active Console for operational monitoring. For more information, see Status UI.
Prerequisites Copied
Before you install TR Gateway, confirm that your environment meets these requirements.
Supported operating systems Copied
TR Gateway supports the following 64-bit platforms:
| Operating system | Supported versions | Architecture |
|---|---|---|
| Linux | RHEL 7 or later, SLES 15 or later, Ubuntu 20.04 or later | x86-64 (glibc) |
| Windows | Desktop 10 or later, Server 2019 or later | x64 |
Java runtime Copied
The TR Gateway bundle includes a Java 25 Temurin JRE (a runtime, not a JDK) under jdk/ in the install directory. You do not need to install a system Java. The launcher sets JAVA_HOME to this directory, so TR Gateway never uses a Java that is installed on the host. The exact build can change between releases. To get the version for a security review, run jdk/bin/java -version (Linux) or jdk\bin\java.exe -version (Windows) in the install directory. The notices for the bundled runtime are under jdk/legal/.
Host sizing Copied
Size the host for peak concurrent live (non-terminal) orders, journal write rate, and optional search.
| Deployment | Memory guidance |
|---|---|
| High-throughput FIX | Raise heap to roughly 4–16 GB depending on session count and retained working set. |
| Large live-order peaks | Size heap to peak concurrent live orders (rough guide: Xmx ≥ maxConcurrentLiveOrders × ~3–4 KB × (1 + headroom) + QuestDB/buffers + baseline). Multi-million live-order sessions can warrant 32–64 GB with G1 (-XX:+UseG1GC). |
| Journal storage | Fast local disk (NVMe SSD recommended). Each channel journal holds at most capacity records per trading day (default 100 million). When a channel reaches capacity in one trading day, TR Gateway refuses further appends on that channel until the next rollover, so ingestion on that channel stops for the rest of the day. Raising capacity and restarting clears that refusal. The day’s records are kept. At startup, TR Gateway warns if capacity is below 50 million records. Size capacity for your busiest day, not for an average day. Orders and records are not the same, so do not size from order counts alone. To size the disk, measure a representative trading day in a test environment. At the end of the day, read the record count from the Journal Status dataview and check the size of the channel’s journal directory. Multiply that size by the number of trading days that TR Gateway keeps (retention-days plus the current day), and add journal.min-free-disk-mb. Keep at least journal.min-free-disk-mb (default 1024 MB) free. |
| Search enabled | QuestDB uses native memory outside the Java heap. Size the host with additional headroom beyond -Xmx. Search also needs disk: keep at least search.min-free-disk-mb (default 4 GiB) free, plus room for search.retention-days (default 30 days) of retained messages. Rewriting out-of-order partitions briefly needs extra space, so on busy deployments size search.min-free-disk-mb to the largest day partition. On a shared volume, keep it above journal.min-free-disk-mb. |
For a starting estimate before you measure a representative day, use:
(retention-days + 1) × records per day × (average payload + about 50 bytes) + journal.min-free-disk-mb + one max-file-length segment per channel
journal.min-free-disk-mb is in MB. Each record adds about 50 bytes to the payload. Of that, 37 bytes are fixed: a 9-byte journal header and a 28-byte store entry header. The session string and the capture-group bytes make up the rest. Count the payload at its raw wire size. TR Gateway decodes base64 before it appends the record. A typical FIX payload is 200 to 400 bytes.
Important
Place journals and the search store on fast local disk. Do not treat-Xmxas the total host memory requirement when search is enabled.
Network requirements Copied
| Port or connection | Purpose |
|---|---|
8080 (configurable) |
Status/Search UI HTTP server |
9500 (example; set it per channel with grpc-port.) |
gRPC ingestion from the file streamer |
Geneos listen port (example 7035) |
Netprobe-compatible listener for Geneos Gateway |
Licence Daemon (licd, default 7041) |
Licensing |
Licensing Copied
TR Gateway licenses each protocol family independently through the Licence Daemon. Make sure the Licence Daemon is reachable on the configured host and port.
File streamer Copied
The file streamer is the producer for the streaming lane. It is the File Streamer Collection Agent plugin together with the gRPC reporter. ITRS ships it as the file-streamer container image and the file-streamer-k8s bundle.
Important
The gRPC reporter is required. Without it, no records reach TR Gateway.
Install and configure the file streamer separately. It continuously reads new entries from trading log files as they are written and streams records to TR Gateway over gRPC (for example, on port 9500). You do not need the file streamer if you only use the file lane.
Make sure the file streamer does all of the following:
- Tails the correct source directories and file patterns.
- Uses framing that matches the feed (for example,
fix-asciifor FIX text logs). - Points at this TR Gateway hostname and gRPC port.
- Sets
protocolon each OUCH, SQF, and DROP source:protocol: OUCH,protocol: SQF, orprotocol: DROP. The file streamer reads SQF as OUCH and stamps the event with that value. TR Gateway then decodes the records as OUCH, and the stream continues. A value stamped on the event overrides the channelprotocolhint intr-gateway.yaml. - Sets
read-from-beginning: true. - Sets
partitioner: direction-sessionon each OUCH, SQF, and DROP source. - Sets
batch-sizeequal tologs-batch.size. - Sets
logs-batch.maxRetries: -1, so that a full journal makes the reporter retry instead of dropping records.
Note
The file streamer stampsprotocolon every event it publishes. Set that stamp on the source, as the checklist describes. The channelprotocolhint applies only to a producer that leaves the event unstamped. See Channels.
Install and run TR Gateway Copied
Download the TR Gateway installation bundle for your platform, install and configure it, then use the start, verify, and JVM sections for first-run and ongoing control. For a shorter first-run path, see the Trading Session Gateway quickstart guide.
Choose the package Copied
TR Gateway is delivered as a bundle for each package. Bundle file names and extracted directory names include the package name, shown in this guide as <package>. Use the package name that ITRS supplies for your feeds. If you monitor more than one feed, choose the package that covers all of them. Replace <package> with that name in every path in this section. The protocol dialects that a package supports depend on the package and on your license. Your ITRS account manager confirms which ones apply to you.
The dialect values in protocol-dialects are also supplied by ITRS. See Protocol dialects.
Install on Linux Copied
-
Extract the installation bundle and move the extracted directory to
/opt/tr-gateway:tar xzf tr-gateway-<package>-*-linux-x64.tar.gz sudo mv tr-gateway-<package>-*-linux-x64 /opt/tr-gateway -
Create a service user and assign ownership of the installation directory to the user:
sudo useradd --system --home-dir /opt/tr-gateway --shell /sbin/nologin itrs sudo chown -R itrs:itrs /opt/tr-gateway -
Edit the configuration file:
sudo -u itrs vi /opt/tr-gateway/config/tr-gateway.yamlBefore you start, set at least:
- Licensing —
licdhost and port. - Channels —
type: streaming, an optionalprotocolhint, gRPC port, journal directory, and protocol session defaults for streaming ingestion. - Protocol dialects and Local CompID prefixes — recommended for correct decode and FIX direction. Set the dialect values from your ITRS account manager. For more information, see Silent-correctness settings.
- Geneos instrumentation — set
enabled: true,listen-port,probe-name,managed-entity, andsampler-name. These names must match the Geneos Gateway setup. The shipped template already enables Geneos publishing. - Optional Status server — Status/Search UI on port
8080by default when enabled. Setbind-address: 127.0.0.1, because the UI has no authentication or TLS. - Search — message search (requires extra host memory). The shipped template already turns on search and search commands.
- Optional Schedules — operational hours and holiday calendars. Every operational schedule needs a
timezone.
Keep secrets out of the file. Use
${env:VAR}or${env:VAR:default}substitution. See Credential handling.The shipped template reads the Licence Daemon host from
${env:TRG_LICD_HOST}. Set that environment variable before you start TR Gateway. The install steps below show how.The shipped template also lists the
protocol-dialectsvalues for the families it is built for. For theallpackage, ask your ITRS account manager which template and values to use. The example below replaces those values with${env:TRG_OUCH_DIALECT},${env:TRG_SQF_DIALECT}, and${env:TRG_DROP_DIALECT}. You can keep the template values, or set these variables to the values your ITRS account manager gives you. The dialects you can use depend on your package and license.Minimum streaming example. Remove the
sqfanddropentries if you do not run those families. Contact your ITRS account manager for which protocol families you can run and for the dialect value for each family.Important: If you use the
${env:...}variables, set one for every family you keep. An unset variable becomes an empty string, and a dialect that is not installed with your package stops TR Gateway at startup. Copying the example without setting these variables breaks the deployment.licensing: host: ${env:TRG_LICD_HOST} port: 7041 local-comp-id-prefixes: - "VENUE" protocol-dialects: ouch: ${env:TRG_OUCH_DIALECT} # dialect value from your ITRS account manager sqf: ${env:TRG_SQF_DIALECT} # remove if you do not run SQF drop: ${env:TRG_DROP_DIALECT} # remove if you do not run DROP channels: ca-grpc: type: streaming grpc-port: 9500 payload-encoding: base64 journal: directory: /opt/tr-gateway/journals rollover-time: "07:00" rollover-timezone: "America/New_York" retention-days: 5 instrumentation: geneos: enabled: true listen-port: 7035 probe-name: TRGatewayProbe managed-entity: tr-gateway sampler-name: TRGateway search-commands: enabled: true search: data-dir: data/search status-server: enabled: true port: 8080 bind-address: 127.0.0.1For complete field tables and examples, see Trading Session Gateway configuration reference.
- Licensing —
-
Install the systemd service:
sudo cp /opt/tr-gateway/service/tr-gateway.service /etc/systemd/system/ sudo systemctl daemon-reload -
Set the environment variables. The shipped template reads
host: ${env:TRG_LICD_HOST}, and the systemd unit does not set that variable. Add the variables in a drop-in:sudo systemctl edit tr-gateway[Service] Environment="TRG_LICD_HOST=licd.example.com" # Only if protocol-dialects uses these variables. Use the values from your ITRS account manager. Environment="TRG_OUCH_DIALECT=<ouch-dialect>" Environment="TRG_SQF_DIALECT=<sqf-dialect>" Environment="TRG_DROP_DIALECT=<drop-dialect>"Set only the dialect variables for the families that you keep in
protocol-dialects. Replace<ouch-dialect>,<sqf-dialect>, and<drop-dialect>with the values from your ITRS account manager, and omit the angle brackets. Copying a placeholder as written stops TR Gateway at startup. -
Enable and start the service (first run):
sudo systemctl enable tr-gateway sudo systemctl start tr-gatewayFor day-to-day control, see Start and stop. Confirm health with Verify the installation.
Install on Windows Copied
-
Extract the installation bundle. For example:
Expand-Archive tr-gateway-<package>-*-windows-x64.zip -DestinationPath C:\ -
Edit
C:\tr-gateway-<package>-<version>-windows-x64\config\tr-gateway.yamlfor your environment.Before you start, set at least:
- Licensing —
licdhost and port. - Channels —
type: streaming, an optionalprotocolhint, gRPC port, journal directory, and protocol session defaults for streaming ingestion. - Protocol dialects and Local CompID prefixes — recommended for correct decode and FIX direction. Set the dialect values from your ITRS account manager. For more information, see Silent-correctness settings.
- Geneos instrumentation — set
enabled: true,listen-port,probe-name,managed-entity, andsampler-name. These names must match the Geneos Gateway setup. The shipped template already enables Geneos publishing. - Optional Status server — Status/Search UI on port
8080by default when enabled. Setbind-address: 127.0.0.1, because the UI has no authentication or TLS. - Search — message search (requires extra host memory). The shipped template already turns on search and search commands.
- Optional Schedules — operational hours and holiday calendars. Every operational schedule needs a
timezone.
Keep secrets out of the file. Use
${env:VAR}or${env:VAR:default}substitution. See Credential handling.The shipped template reads the Licence Daemon host from
${env:TRG_LICD_HOST}. Set that environment variable before you start TR Gateway. The install steps below show how.The shipped template also lists the
protocol-dialectsvalues for the families it is built for. For theallpackage, ask your ITRS account manager which template and values to use. The example below replaces those values with${env:TRG_OUCH_DIALECT},${env:TRG_SQF_DIALECT}, and${env:TRG_DROP_DIALECT}. You can keep the template values, or set these variables to the values your ITRS account manager gives you. The dialects you can use depend on your package and license.Minimum streaming example. Remove the
sqfanddropentries if you do not run those families. Contact your ITRS account manager for which protocol families you can run and for the dialect value for each family.Important: If you use the
${env:...}variables, set one for every family you keep. An unset variable becomes an empty string, and a dialect that is not installed with your package stops TR Gateway at startup. Copying the example without setting these variables breaks the deployment.licensing: host: ${env:TRG_LICD_HOST} port: 7041 local-comp-id-prefixes: - "VENUE" protocol-dialects: ouch: ${env:TRG_OUCH_DIALECT} # dialect value from your ITRS account manager sqf: ${env:TRG_SQF_DIALECT} # remove if you do not run SQF drop: ${env:TRG_DROP_DIALECT} # remove if you do not run DROP channels: ca-grpc: type: streaming grpc-port: 9500 payload-encoding: base64 journal: directory: /opt/tr-gateway/journals rollover-time: "07:00" rollover-timezone: "America/New_York" retention-days: 5 instrumentation: geneos: enabled: true listen-port: 7035 probe-name: TRGatewayProbe managed-entity: tr-gateway sampler-name: TRGateway search-commands: enabled: true search: data-dir: data/search status-server: enabled: true port: 8080 bind-address: 127.0.0.1For complete field tables and examples, see Trading Session Gateway configuration reference.
- Licensing —
-
Set the environment variables and start TR Gateway from Command Prompt (first run). The shipped template reads
host: ${env:TRG_LICD_HOST}, so set the variables in the same window first. Set the dialect variables only ifprotocol-dialectsuses them, and only for the families that you keep:set TRG_LICD_HOST=licd.example.com set TRG_OUCH_DIALECT=<ouch-dialect> set TRG_SQF_DIALECT=<sqf-dialect> set TRG_DROP_DIALECT=<drop-dialect> cd /d C:\tr-gateway-<package>-<version>-windows-x64 bin\tr-gateway.bat config\tr-gateway.yamlReplace
<ouch-dialect>,<sqf-dialect>, and<drop-dialect>with the values from your ITRS account manager, and omit the angle brackets. The NSSM example below uses the same placeholders. Copying a placeholder as written stops TR Gateway at startup.Important
TR Gateway runs in the foreground. Keep the Command Prompt window open while it is running. Start it from the install directory, because the shipped template uses relative data paths. -
Optional: Register TR Gateway as a Windows service with NSSM. The installation bundle includes a launcher but does not include a native Windows service wrapper. Use NSSM rather than
sc.exe:sc.exeexpects a real service executable, and the.batlauncher is not one.For example, to register the launcher with NSSM:
nssm install TRGateway "C:\tr-gateway-<package>-<version>-windows-x64\bin\tr-gateway.bat" nssm set TRGateway AppParameters "C:\tr-gateway-<package>-<version>-windows-x64\config\tr-gateway.yaml" nssm set TRGateway AppDirectory "C:\tr-gateway-<package>-<version>-windows-x64" nssm set TRGateway AppEnvironmentExtra TRG_LICD_HOST=licd.example.com TRG_OUCH_DIALECT=<ouch-dialect> TRG_SQF_DIALECT=<sqf-dialect> TRG_DROP_DIALECT=<drop-dialect> nssm start TRGateway
Start and stop Copied
Use these commands after installation for day-to-day control. After a first start, confirm health with Verify the installation.
Run in the foreground Copied
Important
Run the command from the install directory, or set absolute paths intr-gateway.yaml. The shipped template uses relative paths such asdata/journals/...anddata/search, which resolve against the directory you start TR Gateway from. The packaged launchers do not change directory. The systemd unit sets the working directory to the install directory.
Linux:
cd /opt/tr-gateway
bin/tr-gateway.sh config/tr-gateway.yaml
Windows:
cd /d C:\tr-gateway-<package>-<version>-windows-x64
bin\tr-gateway.bat config\tr-gateway.yaml
Stop the foreground process with Ctrl+C.
Manage the Linux service Copied
sudo systemctl start tr-gateway
sudo systemctl stop tr-gateway
sudo systemctl restart tr-gateway
sudo systemctl status tr-gateway
Manage the Windows service Copied
If you registered TR Gateway with NSSM:
nssm start TRGateway
nssm stop TRGateway
You can also use the Windows Services application.
Verify the installation Copied
Confirm TR Gateway is healthy after a first start or restart. This section does not start the process. Use Start and stop if it is not running.
-
Confirm that TR Gateway is running. On Linux, run
systemctl status tr-gateway. On Windows, check the console window if you started it in the foreground, or check the Windows service status if you registered a service. -
If the Status UI is enabled, open the browser UI and check the JSON endpoints on the TR Gateway host. The recommended
bind-addressis127.0.0.1, so the UI is reachable only from that host. To reach it from another machine, use an SSH tunnel or a reverse proxy that adds authentication and TLS.http://localhost:8080curl -s http://localhost:8080/api/sessions | headWhen the file streamer is feeding data, session activity should appear in the UI and
/api/sessions. If search is enabled, also check/api/search/stats. -
Confirm that the file streamer can reach each configured gRPC port and is publishing records. If a channel sets
tls-config, the gRPC reporter must use TLS as well. -
When you are ready to publish dataviews into Geneos, confirm Geneos Gateway can reach
listen-port(example:7035), then continue with Configure the Gateway Setup Editor.
For ongoing checks, see Health checks.
Configure JVM options Copied
Set JAVA_OPTS before you start. The launcher applies these options to the bundled JRE.
Linux example:
export JAVA_OPTS="-Xms4g -Xmx4g -XX:+UseG1GC -XX:+AlwaysPreTouch -XX:+HeapDumpOnOutOfMemoryError"
cd /opt/tr-gateway
/opt/tr-gateway/bin/tr-gateway.sh
Change to the install directory before you start. Relative paths in tr-gateway.yaml, such as data/search, resolve from that directory. See Run in the foreground.
For a systemd install, always set a quoted JAVA_OPTS drop-in. The packaged unit sets JAVA_OPTS unquoted. systemd keeps only -Xms512m, and the service uses the JVM default maximum heap.
sudo systemctl edit tr-gateway
Example override:
[Service]
Environment="JAVA_OPTS=-Xms4g -Xmx4g -XX:+UseG1GC -XX:+AlwaysPreTouch -XX:+HeapDumpOnOutOfMemoryError"
Enclose the whole assignment in double quotes, as shown. systemd splits an unquoted value at each space, so only the first option is set.
Important
The packaged shell and batch launchers default to-Xms512m -Xmx512m -XX:+UseG1GC -XX:+AlwaysPreTouch -XX:-OmitStackTraceInFastThrow. SettingJAVA_OPTSreplaces these launcher defaults. Include the heap size and collector you want in the value. Size the heap for peak live orders and throughput. When search is enabled, reserve additional host memory for QuestDB native memory outside-Xmx. For guidance, see Host sizing.
Windows example:
cd /d C:\tr-gateway-<package>-<version>-windows-x64
set JAVA_OPTS=-Xms4g -Xmx4g -XX:+UseG1GC -XX:+AlwaysPreTouch -XX:+HeapDumpOnOutOfMemoryError
bin\tr-gateway.bat
Logging Copied
TR Gateway uses Logback. The launcher loads:
config/logback.xml
Note
By default, the only appender is a console appender at INFO. It writes to standard output only, not to standard error.
View logs under systemd Copied
journalctl -u tr-gateway -f
Adjust levels and appenders in config/logback.xml to match your site standards (for example, add a rolling file appender under a logs/ directory).
Health checks Copied
| Check | How |
|---|---|
| Process | systemctl status tr-gateway (Linux) or service / console status (Windows) |
| Startup log | The log shows Starting Trading Gateway <package> and, for each streaming channel, gRPC ingestion server started on port N. A missing gRPC ingestion server started line means the channel did not start. For example, its type is not streaming. |
| Version | The VERSION file in the installation directory shows the installed package and version. |
| Status UI | http://<host>:8080 when status-server.enabled is true |
| Sessions API | curl -s http://localhost:8080/api/sessions |
| Ingest status | curl -s http://localhost:8080/api/ingest/status. This endpoint reports the file lane only. |
| Journals | curl -s http://localhost:8080/api/journals, or the Journal Status dataview. Check the fill level of each channel journal. See Journal capacity and back-pressure. |
| Search stats | curl -s http://localhost:8080/api/search/stats when search is active |
| Search disk guard | The SearchFull, DiskFreeMb, and SearchRefused headlines on Search Monitoring. See Search Monitoring. |
| gRPC ingest | The file streamer is connected to the channel grpc-port, and the journal for each channel is growing. When the channel sets tls-config, the gRPC reporter must use TLS (and a client certificate for mTLS). A plaintext reporter cannot connect to a TLS port. |
| Geneos | Probe connected. Dataviews appear under the managed entity. The sampler is active. |
| Licensing | Protocol families decode only when family tokens are granted |
Healthy signs include recent session activity, non-zero message rates on live sessions, journals below their capacity, and Geneos samplingStatus of OK.
Journal capacity and back-pressure Copied
Each channel journal holds at most capacity records for each trading-day directory (default 100000000). TR Gateway logs a warning when a journal reaches 80% of that capacity. When a journal reaches capacity, TR Gateway refuses further appends and pushes back on the producer until the next rollover, so ingestion on that channel stops for the rest of the trading day. Raising capacity and restarting clears that refusal. The day’s records are kept. Check the Journal Status dataview or GET /api/journals regularly, and raise capacity if your daily volume can approach the limit. The Journal Full and Journal Used Percent rules in the sample Gateway setup raise an alert on these conditions. Appends are also refused, and the producer is pushed back, while the journal volume has less than min-free-disk-mb of free space. They resume when space frees. For the field, see Journal fields.
Configure the Gateway Setup Editor Copied
Configure Geneos so TR Gateway can publish trading and self-monitoring dataviews into your Geneos estate. Without a matching probe, managed entity, and sampler, Geneos cannot display that data in Active Console.
Add the probe Copied
In Gateway Setup Editor (GSE):
- Create a probe whose name matches
instrumentation.geneos.probe-name. - Set the hostname to the TR Gateway host.
- Set the port to
instrumentation.geneos.listen-port. - For TLS, mark the probe secure and configure Gateway SSL identity so it trusts the TR Gateway certificate. Gateway SSL identity is typically supplied with
-ssl-certificate,-ssl-certificate-key, and-ssl-certificate-chain. For plaintext, TLS, or mTLS on the TR Gateway side, see Geneos TLS configuration.
Example:
<probe name="TRGatewayProbe">
<hostname>tr-gateway-host</hostname>
<port>7035</port>
<!-- <secure>true</secure> when TLS is enabled on TR Gateway -->
</probe>
Add the managed entity and sampler Copied
- Create a managed entity whose name matches
instrumentation.geneos.managed-entity. - Attach it to the probe.
- Add a sampler whose name matches
instrumentation.geneos.sampler-name. - Use the API Streams plugin so Geneos can surface the dataviews TR Gateway publishes.
Example:
<managedEntity name="tr-gateway">
<probe ref="TRGatewayProbe"/>
<addTypes>
<type ref="TR Gateway Samplers"/>
</addTypes>
</managedEntity>
<type name="TR Gateway Samplers">
<sampler ref="TRGateway"/>
</type>
<sampler name="TRGateway">
<plugin>
<api-streams>
<streams/>
</api-streams>
</plugin>
</sampler>
Include rules Copied
Include a sampling-status rule (or your site-standard rules include) so operators can see whether the sampler is healthy. Example:
<rules>
<ruleGroup name="General">
<rule name="Sampling Status">
<targets>
<target>/geneos/gateway/directory/probe/managedEntity/sampler/dataview/headlines/cell[(@name="samplingStatus")]</target>
</targets>
<priority>1</priority>
<block>
<if>
<like>
<dataItem>
<property>@value</property>
</dataItem>
<string>OK</string>
</like>
<transaction>
<update>
<property>state/@severity</property>
<severity>ok</severity>
</update>
</transaction>
<transaction>
<update>
<property>state/@severity</property>
<severity>warning</severity>
</update>
</transaction>
</if>
</block>
</rule>
</ruleGroup>
</rules>
The rules in the following table come from the sample Gateway setup that ITRS provides for TR Gateway. The sample is not part of the installation bundle. Contact your ITRS account manager for a copy, or create the rules in Gateway Setup Editor from the table.
| Rule group | Rule | Watches | Severity |
|---|---|---|---|
| Feed Status | Feed Status | The feedStatus headline of every <LABEL>-Status dataview |
Warning for NO_DATA and STALE, otherwise OK |
| Journal | Journal Full | The JournalFull cell of Journal Status |
Critical while it is true |
| Journal | Journal Used Percent | The JournalUsedPercent cell of Journal Status |
Warning at 80, critical at 95 |
| Journal | Search Full | The SearchFull headline of Search Monitoring |
Critical while it is true |
| TradeErrors | TradeErrors Interval Volume | The ErrorsInLastInterval headline of each <LABEL>-TradeErrors-Recent dataview |
Warning above 0, critical at 10 or more |
| TradeErrors | TradeErrors Broker Recency | The LastErrorAgeSec column of each <LABEL>-TradeErrors-Brokers dataview |
Warning while a broker’s last error is less than 300 seconds old |
| Sequence Gaps | Sequence Gap Open | The AgeSeconds column of FIX-SequenceGaps and FIX-DC-SequenceGaps |
Warning for an open gap, critical when the gap has been open for more than 30 seconds |
| Sequence Gaps | Sequence Gap Unrecovered | The Status column of the same views |
Critical for Unrecovered |
The sample also contains a TradeErrors Severity rule that is commented out. One error row would keep the whole managed entity critical until 200 newer events displace it, so enable it only if you accept that.
Every sample rule except Sampling Status selects sampler[(@name="TRGateway")]. If instrumentation.geneos.sampler-name is a different name, edit that sampler name in each of those rule paths. The Feed Status, Journal Full, Journal Used Percent, and Search Full rules then select dataviews by name, so renaming groups leaves them in place. The TradeErrors and Sequence Gap rules also select each dataview by param("Group"), which holds the Geneos group (folder) name, and by its name. If you rename the groups with protocol-groups under instrumentation.geneos, edit the Group predicates in those rules to match the new names. Otherwise those rules stop matching and raise no alerts.
Published dataviews Copied
These dataviews are published under the configured managed entity. Dataviews materialize on demand when the relevant protocol traffic exists. Native-protocol KPI views appear when the matching family is licensed and decoded on the dialect path.
Dataviews sit in a Geneos group (folder) for each protocol, for example FIX, FIX-DC, OUCH, SQF, and DROP. The views in this section are shown under that group. Rules that target a view therefore select it by group as well as by name. See Include rules. For more dataviews that are not covered below, see Additional dataviews.
Self Monitoring Copied
JVM and process metrics in a pivoted metric and value layout (for example, heap, GC, threads, CPU, and file descriptors).
Includes the process-wide rollup:
| Row | Description |
|---|---|
orders.live.total |
Sum of live (non-terminal) orders across all sessions and protocols |
Search Monitoring Copied
Always published. With search off, it has no rows. With search on, it has one row per search-store table that holds data. A row appears only once its table holds a record. The row name is the key. Commands anchor on that name, for example the order_state row. The Table column is the display label.
| Row name | Table column |
|---|---|
FIX, OUCH, SQF, DROP |
The same name. These rows count messages stored in the fix table for that family. |
drop |
DROP (reference) |
sqf_quote_entry |
SQF (quote entries) |
ack_latency |
Ack latency |
sequence_gap |
Sequence gaps |
order_state |
Orders |
trade_side |
Trades |
activity_1s |
Activity (per second) |
activity_1m |
Activity (per minute) |
activity_1d |
Activity (per day) |
activity_match |
Activity (matches) |
| Column | Description |
|---|---|
Table |
Display label for the row. The row name is the key. |
Rows |
Retained row count |
OldestRetained |
Oldest retained timestamp |
CoverageDays |
Retention coverage in days |
Headlines:
| Headline | Description |
|---|---|
Dropped |
Messages dropped from the search ingest ring |
Lag |
Writer backlog from the ingest ring to the search store sink |
WalApplyLag |
Number of write-ahead log (WAL) transactions that are committed but not yet applied to the tables used for message search |
AckLatencyDropped |
Dropped order-acknowledgment latency samples |
OrderStateDropped |
Order rows dropped under load since start. TR Gateway replaces a dropped row with the order’s next change. |
OrderStateWriteFailures |
Store writes of order rows that failed since start. TR Gateway retries the rows at the next flush. |
TradeSideDropped |
Trade rows dropped since start |
TradeSideWriteFailures |
Store writes of trade rows that failed since start |
ActivityDropped |
Activity rows dropped since start. See activity queue-capacity. |
ActivityWriteFailures |
Failed writes of activity rows to the search store. The rows of that batch are lost. |
ActivityRollupFailures |
Failed activity rollups. TR Gateway retries them after a full interval. |
SearchFull |
Search disk guard state. See below. |
DiskFreeMb |
Free disk space on the search volume, in MB |
MinFreeDiskMb |
Free-disk threshold from search.min-free-disk-mb |
SuspendedTables |
Number of search-store tables whose writes are suspended |
SearchRefused |
Row writes the search disk guard refused. Each retry counts again. |
OrderStateRepairSkipped |
Runs of the order and trade segment repair that TR Gateway skipped while the disk guard had search writes paused. It runs the repair again later. |
Expect Dropped near zero at steady state. A climbing WalApplyLag value means apply throughput is behind the commit rate. Lag and WalApplyLag measure different stages. Do not treat them as the same signal. For related process checks, see Health checks.
Important
SearchFullmeans that the search disk guard has paused search writes: usable space on the search volume has fallen belowMinFreeDiskMb. While writes are paused, the ingest ring absorbs a burst, after which producers drop at the ring (Droppedrises). Live session and order state keep running. Writes resume by themselves when space frees, and the paused span is re-published from the journal at the next restart. To recover, free space on the volume. On a shared volume, keepsearch.min-free-disk-mbabove everyjournal.min-free-disk-mb, so that search pauses before the journal refuses appends. Add a Geneos rule on this headline. The Search Full rule in the sample Gateway setup does this.
If a full disk makes the search store suspend a table, SuspendedTables counts it. TR Gateway checks for suspended tables every 10 seconds and resumes them when space returns.
Files that the file lane ingested while search was paused are not re-read at the next restart if data-dir-ledger-file records them. Their search rows from the paused span are not re-published. Without a ledger file, TR Gateway reads every file again at restart, and nothing is lost.
FIX-KPIs Copied
One row per FIX session. Shows session and transport health.
| Column | Description |
|---|---|
Session |
Session display name (row ID) |
Connected |
Connection state based on heartbeat or activity |
InSchedule |
Whether the current time is within the session’s operational schedule (Yes when no schedule applies) |
SeqNum-In |
Last inbound sequence number |
SeqNum-Out |
Last outbound sequence number |
Messages |
Total message count (inbound and outbound) |
MessageRate |
Combined messages per second over the rate-window-seconds window |
SessionMsgs |
Session-level message count (Logon, Logout, Heartbeat, Reject, and similar) |
AppMsgs |
Application message count (Messages minus SessionMsgs) |
BizReject |
BusinessMessageReject count (FIX MsgType j, tag 35) |
SessReject |
Session-level Reject count (FIX MsgType 3, tag 35) |
The RateWindowSeconds headline shows the configured window size. The top-level rate-window-seconds key (default 60) sets this window. The same window is used for message-rate display in the Status/Search UI.
FIX-SingleOrders Copied
One row per FIX session that has carried single-order flow (NewOrderSingle, ExecutionReport, OrderCancelRequest, OrderCancelReplaceRequest, or OrderCancelReject). The view appears when the first such session carries an order, and a session stays in it for the rest of the trading day.
| Column | Description |
|---|---|
Session |
Session display name (row ID) |
New |
Execution reports with OrdStatus=New |
PartFilled |
Execution reports with OrdStatus=PartiallyFilled |
Filled |
Execution reports with OrdStatus=Filled |
Cancelled |
Execution reports with OrdStatus=Cancelled |
Replaced |
Execution reports with OrdStatus=Replaced |
Rejected |
Execution reports with OrdStatus=Rejected (application-level) |
LiveOrders |
Current non-terminal orders (gauge) |
TerminalOrders |
Cumulative orders that have reached a terminal state (never decremented) |
IllegalTransitions |
Execution reports received on orders that are already terminal, other than the corrections and replays counted in the next two columns |
PostTermCorrections |
Legitimate post-terminal corrections (ExecType=H or ExecType=G) applied to a previously terminal order |
PendingNew |
Orders with an outstanding new-order request that has not yet been acknowledged (gauge) |
PendingCancel |
Orders with an outstanding cancel request (gauge) |
PendingReplace |
Orders with an outstanding cancel/replace request (gauge) |
PendingStatusRequest |
Orders with an outstanding order status request (gauge) |
PostTermReplays |
Benign repeats on an order that has already ended: a fill report for an order that is already filled, or a cancel acknowledgment for an order that is already canceled. TR Gateway does not count them as IllegalTransitions. |
KeysTrimmed |
Identifiers that long-lived orders lost because they went past storage.correlation-key-history. Resets daily. |
TrimmedKeyMisses |
Messages that named only trimmed identifiers, and so started a new conversation. Resets daily. |
FIX-Quotes Copied
One row per FIX session that has carried quote flow (quote messages such as QuoteRequest, Quote, MassQuote, MassQuoteAck, QuoteCancel, QuoteStatusReport and QuoteRequestReject).
| Column | Description |
|---|---|
Session |
Session display name (row ID) |
QuoteRequests |
QuoteRequest message count |
Quotes |
Quote message count |
MassQuotes |
MassQuote message count |
MassQuoteAcks |
MassQuoteAck message count |
QuoteCancels |
QuoteCancel request count |
StatusReports |
QuoteStatusReport message count |
ReqRejects |
QuoteRequestReject count (rejects a request) |
Accepted |
Quotes with QuoteStatus Accepted |
Rejected |
Quotes with QuoteStatus Rejected. This rejects a quote, and it is distinct from ReqRejects. |
Expired |
Quotes with QuoteStatus Expired |
Canceled |
Quotes with QuoteStatus Canceled. This is a confirmation, and it is distinct from QuoteCancels. |
Flow counts combine both directions.
<LABEL>-SessionStatus Copied
One row per session, keyed on the session display name. It is published for every protocol as soon as the protocol has a session. It answers whether the session is up, what state its session layer is in, and what the venue last said about market phase. Throughput is in <LABEL>-KPIs.
| Column | FIX / FIX-DC | OUCH / SQF / DROP |
|---|---|---|
Session, Counterparty, Role |
Always | Always |
Connected |
Yes or No | Yes or No |
SessionState |
Not logged on, Logon pending, Established, or Logout pending | Blank |
Since |
Time of the last state change | Blank |
HeartBtInt |
Heartbeat interval from the Logon | Blank |
LastMessage |
Newest message, in either direction | Same |
LastSessionEvent |
Last Logon, Logout, Heartbeat, TestRequest, ResendRequest, SequenceReset, or Reject, with its direction | Blank |
LastPhaseEvent, LastPhaseTime |
Last trading-session phase message received (35=h or 35=f) |
SQF: last Order Book State. DROP: last SessionChange. OUCH: blank. |
EoBSeen, CopyCoverage, OpenDcSubscriptions |
FIX-DC view only | Not applicable |
Blank means the venue does not supply that information to that protocol. The FIX phase columns stay blank on venues whose FIX specification defines no trading-session status.
If TR Gateway sees only one direction of a FIX session, the session shows Logon pending until the daily reset.
Headlines: sessions, connected, and on FIX-family views established, logonPending, logoutPending, and notLoggedOn.
The Show Session Status History command attaches to this view’s rows. For a per-segment state history, see the search store.
Native-protocol KPI dataviews Copied
When a non-FIX family is listed in protocol-dialects and licensed, TR Gateway can publish the same on-demand KPI-style views as FIX, with names prefixed by the family label. Views without data never appear.
| Family | Example dataviews | When they appear |
|---|---|---|
| OUCH | OUCH-KPIs, OUCH-SingleOrders | The dialect is configured and licensed, and traffic exists for that view |
| SQF | SQF-KPIs, SQF-Quotes | The dialect is configured and licensed, and traffic exists for that view |
| DROP | DROP-KPIs | The dialect is configured and licensed, and traffic exists for that view |
The native <LABEL>-KPIs views have eight columns: Session, Connected, InSchedule, SeqNum-In, SeqNum-Out, Messages, MessageRate and AppMsgs. They have no SessionMsgs, BizReject or SessReject. For what the shared columns mean, see FIX-KPIs. The order and quote views follow the FIX counterparts, FIX-SingleOrders and FIX-Quotes. OUCH-SingleOrders is the order view for OUCH. SQF-Quotes is the quote view for SQF, and it is the view that Show SQF Conversation is anchored on.
If you omit a family from protocol-dialects but the family is still licensed and streaming, TR Gateway uses the built-in raw parser. That path does not publish these per-protocol Geneos KPI dataviews. On the raw path, OUCH can still update order tracking. SQF and DROP stay display-oriented for correlation, with no FIX-style order lifecycle.
Additional dataviews Copied
In the names below, <LABEL> is the protocol label, such as FIX, FIX-DC, OUCH, SQF, or DROP. The views that carry <LABEL> are published in the Geneos group for that protocol. Trading Performance Summary is in a group called Trading Performance. The deployment-wide views (Journal Status, Offline Ingest Status, Log Compare Files and Log Compare Results-*) are not in a protocol group. Most views appear only when they have data.
| Dataview | Description |
|---|---|
<LABEL>-Status |
Protocol status. Present when instrumentation.geneos.status.enabled is true (the default). |
| FIX-SequenceGaps, FIX-DC-SequenceGaps | Open and recent FIX sequence-number gaps. OUCH, SQF and DROP have no gap view. See Sequence gaps. |
<LABEL>-Latency |
Acknowledgement latency against the SLO set in storage. Present for FIX, and for SQF when its dialect plugin measures acknowledgment latency. FIX-DC, OUCH and DROP have no latency view. |
<LABEL>-TradingPerformance |
Trading performance measures for the protocol. Published while the activity counters are running and instrumentation.geneos.activity-views is true (the default). |
| Trading Performance Summary | Trading performance across protocols. Published under the same conditions. Created at startup with no rows, in the Trading Performance group. |
<LABEL>-TradeErrors-Recent, <LABEL>-TradeErrors-Brokers |
Recent broker errors and rejects, and per-broker counts. Published when error-alerting is on. |
<LABEL>-Lists, <LABEL>-MassActions, <LABEL>-IOI, <LABEL>-TradeCapture |
Message counts for list orders, mass actions, indications of interest, and trade capture |
| Journal Status | State and fill level of each channel journal. See Journal capacity and back-pressure. |
| Offline Ingest Status | Progress of file-lane ingestion. Created when the file lane is configured and instrumentation.geneos is enabled, even with no rows. See Ingestion lanes. |
Log Compare Files, Log Compare Results-* |
The files available to the Compare with file command, and one results view for each comparison. Each results view is named Log Compare Results- followed by a suffix you choose or an automatic number such as 001. Log Compare Files appears when offline-log-analysis.data-dir is set. Clear the results with Clear Compare Results. |
Search results dataviews Copied
Each time you run an Active Console search command, TR Gateway publishes the hits to a results view for that attempt. The view is named <PROTO>-Search-Results-NNN (for example, FIX-Search-Results-001) and sits inside the protocol group. FIX drop-copy searches publish to their own FIX-DC-Search-Results-NNN views. TR Gateway keeps max-result-views results views per slot (default 5). You can run the commands from any view in the protocol group, not only Search Monitoring. For more information, see Enable the search commands.
The message views (FIX-, OUCH-, SQF- and DROP-Search-Results-NNN) share an envelope prefix: row, timestamp, session, direction, sequence, and msgType. Protocol-specific columns follow. The FIX, OUCH, and SQF views end with conversationKey. The DROP view has no conversationKey column. The order, trade and latency views have their own columns, listed below.
| Dataview | Notable columns |
|---|---|
FIX-Search-Results-NNN |
Promoted FIX tags (clOrdId, origClOrdId, orderId, execId, symbol, marketSegment, side, ordStatus, execType, orderQty, price, errorCode, sessionClass), then an untruncated decoded residual |
OUCH-Search-Results-NNN |
orderToken, orderId, matchId, orderBookId, symbol, marketSegment, side, quantity, price, replacementOrderToken, previousOrderToken, rejectReason |
SQF-Search-Results-NNN |
quoteMessageId, orderId, matchId, orderBookId, side, symbol, marketSegment, isin, tradedQuantity, tradePrice |
DROP-Search-Results-NNN |
messageId, partitionId, orderId, clientOrderId, matchId, orderBookId, symbol, marketSegment, side, price, quantity, errorCode |
FIX-Orders-Search-Results-NNN, OUCH-Orders-Search-Results-NNN |
row, orderId, clOrdId, protocol, firm, user, symbol, marketSegment, side, orderStatus, price, quantity, balance, matchedQty, orderValue, entryTime, amendTime, lastUpdateTime, rejectReason, session, conversationKey, firstSeen |
All-Orders-Search-Results-NNN |
The same columns as the FIX and OUCH order views, from Search Orders |
Trades-Search-Results-NNN |
row, tradeNumber, symbol, marketSegment, price, quantity, value, tradeTime, buyFirm, sellFirm, buyOrderNo, sellOrderNo, status, cancelTime, tradeType |
Activity-Search-Results-NNN |
The activity counts for the period you choose in Review Activity |
Latency-Search-Results-NNN |
row, timestamp, session, broker, ackType, nativeProtocol, latencyMs, requestTime, responseTime, clOrdId, orderId, quoteId, symbol, side, sequence, conversationKey |
The FIX and OUCH order views sit in their protocol group. All-Orders-Search-Results-NNN, Trades-Search-Results-NNN, and Activity-Search-Results-NNN sit in the Trading Performance group. Latency-Search-Results-NNN stays in the default group, with no folder. Latency results are sorted slowest first.
The message, order and trade views have these headlines:
| Headline | Description |
|---|---|
query |
The query that produced the view |
status |
State of the search: running, complete, complete (truncated) when more records matched than the rows shown, or error |
resultCount |
Number of rows shown |
matchCount |
Number of records that matched, including any beyond the limit |
lastRun |
Time of the last run |
error |
Error text when the search fails |
A message view holds at most limit rows. An order view holds at most Row limit rows, oldest first by firstSeen. A trade view holds at most Row limit rows, earliest trade first. When more records match, each view holds the first ones, and matchCount gives the total.
Search messages Copied
Message search copies trade messages into an embedded QuestDB store so you can look them up later through Active Console or the Status/Search UI. It is active only when search.data-dir is set. The shipped tr-gateway.yaml sets it, so a stock installation has search. When inactive, message lists, /api/search, and Geneos search surfaces return empty.
Enable search Copied
The shipped tr-gateway.yaml already sets search.data-dir. Use this section to change the settings or to turn search back on after you removed it.
search:
data-dir: data/search
retention-days: 30
When search is enabled:
- Size host memory for QuestDB native (off-heap) usage beyond the Java heap.
- Geneos publishes Search Monitoring.
- The Status/Search UI exposes search screens and
GET /api/searchwhenstatus-serveris enabled. - You can enable the Active Console search commands.
For all search fields, see Search. For host memory guidance when search is enabled, see Host sizing and Configure JVM options.
Enable the search commands Copied
When search.data-dir is set and instrumentation.geneos.search-commands.enabled is true, the search commands appear in Active Console on their own. The shipped tr-gateway.yaml already sets both, so a stock installation has the search commands. Follow these steps only if you removed them.
search-commands.enabled turns on the whole family of search commands, not only the message searches. Each command still appears only when the condition in the command catalogue holds.
- Enable search in YAML (
search.data-dir). - Enable
instrumentation.geneos.search-commands.enabled: true.
Important
You do not define the commands in the Geneos Gateway setup. The probe publishes every command itself, and no handler is left for user-defined commands. A hand-written Gateway<command>block, for example one withrunLocation netprobe, shows in the menu, returns nothing, and sits next to the working command of the same name. Remove any such blocks left over from earlier configurations.
The shipped template already turns on search, search commands, and Geneos publishing, so a stock installation has these commands without further steps.
Important
When Gatewaycommands > restServiceis enabled, you can trigger the same commands withPOST /rest/runCommand.
<commands>
<restService>
<enabled>true</enabled>
<allowOnInsecureComms>true</allowOnInsecureComms>
</restService>
</commands>
For the runCommand request body, see Run commands in Gateway Commands.
Search command catalogue Copied
The search commands appear in the Active Console menus when search-commands.enabled is true and the search store is on. Each command is published by the probe. Command names are as they appear in the menu. The Run from column lists where you right-click to find the command. The Inputs column lists the prompts for each command.
| Command | Searches | Run from | Inputs | Availability |
|---|---|---|---|---|
| Search FIX Messages | FIX messages, on all FIX sessions including drop-copy | The FIX row of Search Monitoring, or any cell of a view in the FIX group |
session, type, orderId, clOrdId, conversationKey, side, symbol, broker, errorCode, sessionClass, from, to, limit |
Always |
| Search FIX-DC Messages | FIX drop-copy sessions only | The FIX row of Search Monitoring, or any cell of a view in the FIX-DC group |
session, type, orderId, clOrdId, conversationKey, side, symbol, broker, errorCode, from, to, limit |
fix-dc.subid-pattern is set, fix-dc.classify-by-traffic is true, or a channel sets session-class: drop-copy |
| Search OUCH Messages | OUCH messages | The OUCH row of Search Monitoring, or any cell of a view in the OUCH group |
session, type, orderId, orderToken, matchId, side, broker, errorCode, rejectReason, from, to, limit |
OUCH is in protocol-dialects |
| Search SQF Messages | SQF quote messages | The SQF row of Search Monitoring, or any cell of a view in the SQF group |
session, type, orderId, quoteMessageId, matchId, symbol, isin, side, broker, errorCode, from, to, limit |
SQF is in protocol-dialects |
| Search DROP Messages | DROP order and trade messages | The DROP row of Search Monitoring, or any cell of a view in the DROP group |
session, type, orderId, clientOrderId, matchId, side, broker, errorCode, from, to, limit |
DROP is in protocol-dialects |
| Search Latency | Slow order and quote acknowledgments | Any cell of FIX-Latency, or of SQF-Latency when the SQF dialect measures acknowledgment latency | session, broker, orderId, clOrdId, ackType, nativeProtocol, minLatencyMs, from, to, limit |
Always |
| Search FIX Orders, Search OUCH Orders | One row per order with its current state, on the FIX or OUCH group views | Search FIX Orders: any cell of a view in the FIX group. Search OUCH Orders: any cell of a view in the OUCH group | from, to, firm, user, symbol, segment, side, status, orderId (order ID or ClOrdID), limit |
activity.enabled is not false and search.data-dir is set. OUCH only when OUCH is configured |
| Search Orders | Rows in order_state for FIX, OUCH, or both, chosen with orderProtocol. Trading Performance Summary is a place to run the command |
Any cell of Trading Performance Summary, or the order_state row of Search Monitoring |
from, to, orderProtocol (FIX, OUCH, or both), firm, user, symbol, segment, side, status, orderId (order ID or ClOrdID), limit |
activity.enabled is not false and search.data-dir is set |
| Search Trades | Trades, with both sides, price and quantity | Any cell of Trading Performance Summary, of a FIX-TradingPerformance view (and OUCH-TradingPerformance or SQF-TradingPerformance when configured), or the trade_side row of Search Monitoring |
from, to, firm, symbol, segment, tradeNumber, orderNo, limit |
activity.enabled is not false and search.data-dir is set |
| Show FIX Conversation | The messages of one order conversation | Any cell of FIX-SingleOrders | OrderID (tag 37) or ClOrdID (tag 11) (at least one required), Entry date, Start index | With the search commands |
| Show OUCH Conversation | The messages of one order conversation | Any cell of OUCH-SingleOrders | orderId or orderToken (at least one required), Entry date, Start index | With the search commands. Also needs OUCH in protocol-dialects |
| Show SQF Conversation | The messages of one quote conversation | Any cell of SQF-Quotes | quoteMessageId (required), Entry date, Start index | With the search commands. Also needs SQF in protocol-dialects |
| Show Buy Order Conversation, Show Sell Order Conversation | The conversation of the buy order or the sell order of a trade | Any cell of a Trades-Search-Results-NNN view |
Start index | activity.enabled is not false and search.data-dir is set |
| Show Conversation | The conversation of the clicked row | Any cell of FIX-Search-Results-NNN, OUCH-Search-Results-NNN, or SQF-Search-Results-NNN. Also any cell of Latency-Search-Results-NNN, FIX-Orders-Search-Results-NNN, OUCH-Orders-Search-Results-NNN, or All-Orders-Search-Results-NNN |
Start index | With the search commands. The OUCH and SQF results commands are published only when that family is in protocol-dialects. Order results also need activity.enabled not false and search.data-dir set |
| Show Session Status History | The state history of one session | Any cell of a <PROTO>-SessionStatus view, or of a <PROTO>-Search-Results-NNN view |
Ignored messages, From, To, Start index | With the search commands |
| Show Message Detail | Every field of one message, as a tree | Any cell of a <PROTO>-Search-Results-NNN view, or the Left or Right column of a Log Compare Results-* view. It is not offered on latency, order, or trade results |
None | The search commands are enabled, or offline-log-analysis.data-dir is set |
| Compare Messages (Set as Left, Compare with Left) | Two messages | Any cell of a <PROTO>-Search-Results-NNN view |
Set as Left: none. Compare with Left: Left message (leave blank to use the most recent Set as Left), Ignore tags | With the search commands |
| Compare with file | Two log files | Any cell of Log Compare Files | Compare with file (required; name or path inside the log-comparison folders), Ignore tags, Dataview suffix, Keep only messages from SenderCompID | offline-log-analysis.data-dir is set |
| Show Message Differences | The differences between the records of two log files | Any cell of a Log Compare Results-* view |
None | offline-log-analysis.data-dir is set |
| Review Activity | Activity over a period | Any cell of Trading Performance Summary, or of a FIX-TradingPerformance view (and OUCH-TradingPerformance or SQF-TradingPerformance when configured) | From, To, Group (1s, 1m, 5m, 1h, or 1d, default 1m), Source (Sessions, DROP, or Both, default Both), Protocol, Segment, Firm, Connection, Suffix |
activity.enabled is not false, instrumentation.geneos.activity-views is true (the default), and the search commands are enabled |
| Search FIX Sequence Gaps, Search FIX-DC Sequence Gaps | Stored sequence-number gaps, including earlier days. See Search sequence gaps. | Any cell of FIX-SequenceGaps or FIX-DC-SequenceGaps, or the FIX row of Search Monitoring |
Connection (from the clicked row, or entered on the Search Monitoring row), From, To, Direction, Status, FilledBy, ResendRequested, DetectedBy, Min missing, Min recovery time, Row limit | sequence-gaps.history-enabled is true (the default) and search is active |
| Clear This Search Result | Removes one search results view | Any cell or headline of a search results view | None | With the search commands |
| Clear Search Results | Removes all search results views | Any cell of Search Monitoring | None | With the search commands |
| Clear This Compare Result | Removes one compare results view | Any cell or headline of a Log Compare Results-* view |
None | offline-log-analysis.data-dir is set |
| Clear Compare Results | Removes all compare results views | Any cell of Log Compare Files or a Log Compare Results-* view |
None | offline-log-analysis.data-dir is set |
Inputs are optional unless marked required. Row limit takes limit= on the message, latency, order, and trade commands. Entry date takes yyyy-MM-dd. From and To take the formats described in Use search commands. For Search OUCH Messages, Search SQF Messages, and Search DROP Messages, the dialog box shows some filters that TR Gateway rejects. Use search commands lists those filters.
The Show Conversation commands and Show Session Status History show long results a page at a time. A page holds 100 rows. The last line of the HTML output gives the Start index for the next page.
The FIX commands and Search Latency do not need a protocol dialect.
Use search commands Copied
After search commands are enabled:
- Open a dataview that carries the command, for example Search Monitoring.
- Right-click a data cell (not only the row name label).
- Choose the command.
- Set the inputs for the command. The list under the command catalogue gives the inputs for each command. The Row limit input is pre-filled with
limit=200. A larger value is reduced to1000. When the limit is reached, the command dialog box says so. - Review the dialog box summary and the matching
<PROTO>-Search-Results-NNNdataview.
These filters match the whole value. Search OUCH Messages, Search SQF Messages, and Search DROP Messages are available only when that protocol is listed in protocol-dialects. Use the filters in Filters that work. For OUCH, SQF, and DROP, leave the filters in Shown in the dialog box and rejected blank.
| Command | Filters that work | Shown in the dialog box and rejected |
|---|---|---|
| Search FIX Messages | orderId, clOrdId, conversationKey, side, symbol, broker, errorCode, sessionClass (DC for drop-copy sessions, !DC to exclude them) |
None |
| Search FIX-DC Messages | The same filters as Search FIX Messages, without sessionClass |
None |
| Search OUCH Messages | orderId, side, broker, errorCode |
orderToken, matchId, rejectReason |
| Search SQF Messages | orderId, symbol, side, broker, errorCode |
quoteMessageId, matchId, isin |
| Search DROP Messages | orderId, side, broker, errorCode |
clientOrderId, matchId |
Message commands also take session, type, from, to, and limit. On Search DROP Messages, errorCode matches Order, RejectedOrder, Trade, and OffExchangeTrade messages.
For every protocol, set side=1 for buy and side=2 for sell. TR Gateway stores these FIX tag 54 values. side=B and side=S match no rows, and the search reports no error.
If you fill in a rejected filter, the search stops. The dialog box reports that filtering on that field is not available for the protocol, because TR Gateway stores those messages in the FIX store and that store has no column for the field. Use orderId, side, or session.
broker matches the account on the order (FIX tag 1, Account). errorCode is the broker error or reject code. On DROP, the Broker column of the TradeErrors views shows the participant name.
from and to accept absolute ISO-8601 UTC (for example, 2026-07-10T01:30:00Z) or relative offsets such as 30m, 2h, or 1d.
Search sequence gaps Copied
The FIX-SequenceGaps and FIX-DC-SequenceGaps dataviews show the current trading day. TR Gateway also stores every gap in the search store, so you can search earlier days. Searching needs search to be active, the search commands to be enabled, and sequence-gaps.history-enabled to be true (the default). For the settings, see Sequence gaps.
The Search Monitoring view has a Sequence gaps row once the store holds a gap. It shows how many gaps are stored (Rows) and how far back the search reaches (OldestRetained and CoverageDays). It is hidden when FIX is not licensed.
Run Search FIX Sequence Gaps (or Search FIX-DC Sequence Gaps) from either of these places:
| From | Connection |
|---|---|
| Any cell of FIX-SequenceGaps or FIX-DC-SequenceGaps | Taken from the clicked row. TR Gateway does not ask for it. |
The FIX row of Search Monitoring |
You type it. Leave it blank for all connections of the lane. Either orientation finds the connection, so the session value that Search FIX Messages shows (LOCALID/PEERID) also finds PEERID/LOCALID. |
All inputs are optional. Choice inputs take comma-separated values in any case, for example Resend, GapFill.
| Input | Blank means |
|---|---|
From (ISO-8601, a wall time such as a DetectedAt cell, or relative, for example 1d) |
The start of the trading day |
| To | Now |
Direction: IN or OUT |
Both |
Status: Open, Recovered, Unrecovered or Interrupted |
All |
FilledBy: Resend, GapFill or Mixed |
All, including gaps that were never filled |
ResendRequested: Y or N |
Either |
DetectedBy: Jump, GapFill, LogonNextExpected, ResendRequest, LostAfterCapture or SequenceReset |
All |
Min missing, for example 10 |
No minimum |
Min recovery time, for example 500ms, 30s or 5m |
No minimum |
| Row limit | 200 |
A gap matches when it was open at any time between From and To, not only when it was detected in that window. An invalid input returns one line that names it, and creates no dataview.
The matches go to a new FIX-Gap-Search-Results-NNN (or FIX-DC-Gap-Search-Results-NNN) dataview in the protocol group, oldest first. It has the same columns as the live view. Unlike the live view, an Unrecovered row keeps its RemainingRanges, so you can see which numbers never arrived. Remove the views with Clear This Search Result or Clear Search Results.
| Headline | Description |
|---|---|
from, to |
The window searched. A blank From shows the actual start of the trading day. |
matchCount |
Gaps that match the filters, including any beyond the row limit |
gapsOpened |
Matching gaps detected inside the window |
recovered, unrecovered, stillOpen, interrupted |
Matching gaps by Status |
gapFilled |
Matching gaps that a GapFill filled, fully or partly: FilledBy is GapFill or Mixed |
Search from the Status/Search UI Copied
When status-server is enabled and search is active, use the Status/Search UI search screens, or call the JSON API:
curl -s 'http://localhost:8080/api/search?protocol=fix&limit=50'
curl -s http://localhost:8080/api/search/stats | head
Query parameters: protocol (fix, ouch, sqf, or drop), session, type, types (several message types), from and to (epoch nanoseconds), limit, and order=desc for newest first. Relative offsets such as 30m are not accepted for from and to. conversationKey applies to fix only. Column filters use the prefix eq., ne., ge., le., gt. or lt. followed by the column name, for example eq.orderId=ABC-0001. Unlike the Geneos commands, the API does not accept relative times or friendly column labels.
When the family is listed in protocol-dialects, TR Gateway stores OUCH messages and SQF messages in the fix table. Search them with protocol=fix and eq.nativeProtocol=OUCH or eq.nativeProtocol=SQF. SQF quote entries stay in sqf_quote_entry. Search them with protocol=sqf_quote_entry.
For DROP with the dialect configured, Order, RejectedOrder, Trade, and OffExchangeTrade go to the fix table. Search those with protocol=fix and eq.nativeProtocol=DROP. Reference, session, and market records stay in the drop table. Search those with protocol=drop.
protocol=ouch and protocol=sqf return rows when that family is not listed in protocol-dialects.
Status UI Copied
TR Gateway can serve a built-in HTTP Status/Search UI and JSON API for live diagnostics. The UI shows session lists, message timelines, and search screens from the same runtime state that feeds Geneos dataviews.
Important
The Status UI is for internal and diagnostic use. Prefer Geneos dataviews, rules, and Active Console for operational monitoring. The UI and API have no authentication and no TLS. Setbind-addressto127.0.0.1unless you need remote access.
Enable the Status UI Copied
status-server:
enabled: true
port: 8080
bind-address: 127.0.0.1
| Field | Type | Description |
|---|---|---|
enabled |
boolean | Enable the Status/Search UI HTTP server. Default: |
port |
int | HTTP listen port. Default: |
bind-address |
string | Address on which the HTTP server listens. Unset, it listens on every interface. Use 127.0.0.1 unless another host must reach the UI. The address must belong to this host, or TR Gateway fails at startup. |
Access the browser UI Copied
Open:
http://<tr-gateway-host>:8080
Note
Do not expose the Status UI on untrusted networks. It has no authentication and no TLS, and it is a diagnostic surface, not an authenticated operations console. If you setbind-addressto127.0.0.1, reach the UI from another host through an SSH tunnel.
JSON endpoints Copied
| Endpoint | Purpose |
|---|---|
GET /api/sessions |
Session list with rates, totals, and schedule state |
GET /api/sessions/{id}/messages |
Paginated per-session message list (only when search is enabled) |
GET /api/search |
Time-range and key search over retained messages (only when search is enabled) |
GET /api/search/stats |
Per-protocol row counts, retention coverage, and drop and lag counters |
GET /api/search/conversation |
The messages of one conversation. Requires conversationKey, session and at (epoch nanoseconds, the stored time of the row) |
GET /api/latency |
Acknowledgement latency |
GET /api/activity |
Activity history |
GET /api/activity/live |
Live activity |
GET /api/journals |
State and fill level of each channel journal |
GET /api/ingest/status |
File-lane status for each file under data-dir |
Example checks after install or restart:
curl -s http://localhost:8080/api/sessions | head
curl -s 'http://localhost:8080/api/search?protocol=fix&limit=50'
To confirm a healthy start after install or restart, see Verify the installation and Health checks.