simscope-tunnel.config
The Simscope Tunnel is configured via a text configuration file: simscope-tunnel.config
- If you change this file, you need to restart the Tunnel server process, to activate the new configuration.
Notes on RabbitMQ Topic-based exchanges
Simscope can run with either Direct RabbitMQ queues, which is a simpler routing mechanism, or can use Topic-based queues, which allow pattern matched message routing.
- With Direct queues (default), JSON messages are sent directly from the client to the Tunnel server.
- With Topic queues, JSON messages are sent to a topic, where RabbitMQ will route them to the Tunnel server, if the message key matches a key binding in the Tunnel server config.
Topic exchanges have one benefit that messages can be consumed by multiple clients, whereas with Direct exchanges, only one client can consume each message.
- Caveat: if you publish a message to a Topic exchange which does not match any topic key binding, the message will be discarded by RabbitMQ.
To use Topic exchanges with the Tunnel, you must have at least one [exchange]
declaration
in the config, and at least one key
bindings patterns to match.
Sample Tunnel configuration
→ Save this to a file called simscope-tunnel.config
Note: You can click the paper clipboard icon on the right corner → to copy this to your clipboard.
# Tunnel configuration file (simscope-tunnel.config)
# > https://admin-docs.simscope.com/tunnel/tunnel-config.html
[tunnel]
# RabbitMQ URL parameters:
# - RABBIT_USERNAME: shared account username
# - RABBIT_PASSWORD: shared shared password
# - RABBIT_HOSTNAME: the rabbit server host
rabbiturl = "amqp://RABBIT_USERNAME:RABBIT_PASSWORD@RABBIT_HOST:5672/"
# Alternative: if you are using amqps (ie SSL secured-amqp):
# rabbiturl = "amqps://RABBIT_USERNAME:RABBIT_PASSWORD@RABBIT_HOST:5671/"
# For running in environments like Docker or System Daemon, where you may need multiple attempts
# to connect to Rabbit MQ at startup, increase the number of startup attempts before giving up.
startupattempts = 10
retrytimeout = "5s"
autoflushafternjobs = 1000
autoflushtime = "30s"
# Use an alternative RabbitMQ exchange.
# exchange = "amq.topic"
# Input queue for Tunnel to read from (regressions will publish to this queue)
inputqueue = "tunnel-in"
# Tunnel output queue for Simscope: (this value should match [simscope.config] inputqueue)
outputqueue = "simscope-in"
# Send status heartbeat messages to Simscope
statusinterval = "1m"
# Debug: dump incoming Tunnel messages to a log file.
# Note: this log currently automatically stops after 100k messages.
# dumpmessagestofile = "/path/to/tunnel-messages.log"
durable = true
exclusive = false
autodelete = false
# Reply message expiration, for debugging (h=hour, m=minute)
#replyexpire = "24h"
# ────────────────────────────────────────────────────────────
# Advanced Tunnel options
# ────────────────────────────────────────────────────────────
#bucketizer = "custom"
# Componentize signatures (errors):
# > https://admin-docs.simscope.com/tunnel/componentize.html
#
# This lets you automatically split a common/shared signature into unique signatures prefixed
# by component name, so each component has a unique instance of the signature.
# For example, you can split a "wallclock timeout" signature into "[block1] wallclock timeout"
# NOTE: these are case-insensitive regular expressions
#
# componentize = "wallclock timeout"
# componentize = "cycle timeout"
# componentize = "missing logfile"
# componentize = "timeout.*system" # Regex example
# ────────────────────────────────────────────────────────────
# [metadata]
# Job Metadata Key/Value limits (note: this does not apply to Regression Metadata).
# Simscope will discard or truncate keys/values beyond these limits.
# > maxentries: # of unique keys per job
# maxentries = 50
# > maxkeybytes: maximum size of each metadata key, in bytes
# maxkeybytes = 50
# > maxvaluebytes: maximum size of each metadata value, in bytes
# maxvaluebytes = 300
# Exchange input bindings
# [exchange "exchange-dev"]
# key = "proj1.#"
# key = "proj3.#"
#
# [exchange "exchange-prod"]
# key = "proj2.#"
# ────────────────────────────────────────────────────────────
# If using RabbitMQ "topic" exchanges, declare Tunnel input and output bindings.
# Exchange queue input bindings (needed if using topic exchanges)
# [exchange "amq.topic"]
# key = "tunnel-in" # this should match your input queue name
# Exchange queue output bindings (needed if using topic exchanges)
# [outputexchange "amq.topic"]
# key = "simscope-in" # this should match your output queue name
# ────────────────────────────────────────────────────────────
# Auto-Signature classifications
# [classification "eot"]
# regex = "EOT"
# [classification "infra"]
# regex = "cycle timeout"
# regex = "wallclock timeout"
Config Field Reference
Field | Description |
---|---|
rabbiturl | URL and authentication for RabbitMQ exchange |
retrytimeout | Wait time between RabbitMQ reconnect attempts |
inputqueue | RabbitMQ Queue to be consumed by Tunnel |
outputqueue | RabbitMQ Queue to be produced by Tunnel Note: the Tunnel output queue will be tied to Simscope's input queue |
statusinterval | Send status heartbeat messages to Simscope (note: "15s" == 15 seconds) |
durable | Whether the input and output queues are durable (true is recommended) |
exclusive | advanced: Exclusive queue |
autodelete | advanced: Autodelete queue |