Configure Quantus Network services to send logs to Graylog.
Add logging to your existing docker-compose.yml:
services:
quantus-node:
image: ghcr.io/quantus-network/quantus-node:v0.4.2
container_name: quantus-node
restart: unless-stopped
command: >
--validator
--base-path /var/lib/quantus
--chain dirac
--node-key-file /var/lib/quantus/node_key
--rewards-address qznYQKUeV5un22rXh7CCQB7Bsac74jynVDs2qbHk1hpPMjocB
--name a1_dirac
--execution native-else-wasm
--wasm-execution compiled
--db-cache 2048
--unsafe-rpc-external
--rpc-cors all
--in-peers 256
--out-peers 256
--prometheus-external
volumes:
- ./quantus_node_data:/var/lib/quantus:z
ports:
- "30333:30333"
- "9944:9944"
- "9615:9615"
# GELF logging:
logging:
driver: gelf
options:
gelf-address: "udp://localhost:12201"
tag: "quantus-${NODE_NAME:-a1_dirac}"
labels: "node_type,chain,region,environment,server"
gelf-compression-type: "gzip"
mode: "non-blocking"
max-buffer-size: "4m"
# Labels (visible in Graylog):
labels:
node_type: "validator"
chain: "dirac"
region: "europe"
environment: "production"
server: "server-01"
environment:
- NODE_NAME=a1_dirac
networks:
- default
- graylog_network
networks:
graylog_network:
external: true
name: logs_graylogWhat changed:
- Added
loggingsection with GELF driver - Added
labelsfor filtering in Graylog - Added
networksto connect to Graylog
Use this when containers run on a different host than Graylog (e.g. Subsquid on DigitalOcean, Graylog on Hostinger). Ship GELF over Tailscale — do not join the logs_graylog Docker network.
- Tailscale up on the Graylog host (same tailnet as fleet hosts)
- Set
GRAYLOG_GELF_BIND_TAILSCALEin.envto this host’s Tailscale IPv4 (tailscale ip -4). Existing.envfiles created before this variable existed must add it; Compose fails closed if it is missing or empty. - Compose publishes GELF UDP on localhost + Tailscale only (not
0.0.0.0/ publiceth0) - Firewall: allow UDP/12201 from Tailscale (
100.64.0.0/10or interfacetailscale0) - Verify:
ss -ulnp | grep 12201shows127.0.0.1and100.x…, not0.0.0.0 - Probe from a non-Tailscale host to the public IP — message must not appear in Graylog
Point gelf-address at the Graylog Tailscale IP or MagicDNS name. Keep mode: non-blocking so a Graylog outage does not stall apps.
services:
example:
# ... image, ports, volumes ...
logging:
driver: gelf
options:
gelf-address: "udp://<graylog-tailscale-ip-or-magicdns>:12201"
tag: "subsquid-processor-blue"
labels: "project,service,color"
gelf-compression-type: "gzip"
mode: "non-blocking"
max-buffer-size: "4m"
labels:
project: "subsquid"
service: "processor"
color: "blue"Filter by fleet host with Graylog source: (Docker GELF host = OS hostname, which matches inventory names). Do not ship a Docker label named host — Graylog maps GELF host → source and drops an additional _host field.
No logs_graylog external network.
echo '{"version":"1.1","host":"probe","short_message":"gelf-ok","level":1}' \
| nc -u -w1 <graylog-tailscale-ip> 12201Confirm gelf-ok appears in the Graylog UI before enabling fleet-wide shipping.
Fleet wiring for Subsquid is in the IaC Ansible project (graylog_gelf_address in the project vault; graylog_logging_enabled per project).
docker compose up -dCheck logs in Graylog: http://localhost:9000 → Search for tag:quantus-*
# All nodes
tag:quantus-*
# Errors
tag:quantus-* AND (level:3 OR message:/ERROR|WARN/i)
# Block finalization
tag:quantus-* AND message:/Finalized|Imported/
# Consensus
tag:quantus-* AND message:/grandpa|babe/i
# Network
tag:quantus-* AND message:/peer|connection/i
# By region
region:europe
# By server
server:server-01
# Remote fleets (IaC labels + OS hostname → source)
project:subsquid
service:processor
service:hasura
source:subsquid-proc-1
# Check Docker logging config
docker inspect quantus-node | grep -A 15 LogConfig
# Same-host: shared Docker network
docker network inspect logs_graylog | grep quantus-node
# Same-host GELF probe
echo '{"version":"1.1","host":"test","short_message":"Test","level":1}' | nc -u localhost 12201
# Remote: Tailscale + firewall on Graylog host; probe from fleet host (see above)# Start Graylog first
cd /path/to/graylog
docker compose up -d
# Then start node
cd /path/to/your/node
docker compose up -dSee GRAYLOG_SETUP.md for Graylog management.