YepMsg is one binary with one YAML configuration. This page covers the admin surface, what to monitor and how to investigate a delivery problem.
Configuration
Values of the form ${VAR|default} expand from the environment before parsing, so secrets stay out of the file. Unknown keys are errors. A validation mode checks a file without starting the gateway, and the deployment script validates a new binary against the live configuration before it touches the running service, so a bad deploy leaves the old gateway up.
Admin API
The admin API listens on its own address and is meant for a private network. Use loopback, a management network or an SSH tunnel, and never publish it. Liveness and metrics are unauthenticated for load balancers and Prometheus. Everything else requires the admin password, and a gateway configured without one disables the admin verbs.
| Endpoint | Purpose |
|---|---|
| Health | Liveness probe |
| Metrics | Prometheus exposition |
| Status | Connector states, bound sessions per account, store depth, pending receipts, record queue depth, provisioning and firewall state, counters |
| Unbind account | Close every bound session of an account without removing it |
| Refresh registry | Reload accounts and carriers now instead of at the next poll |
| Wire and pcap | Search and carve the flight recorder |
Status counters are monotonic since process start and reset on restart. Use the metrics endpoint for rates.
What to watch
| Signal | Why it matters |
|---|---|
| Connector state | A carrier that is not active carries no traffic |
| Store depth | Messages waiting for a carrier. A growing value means a carrier or window problem |
| Pending receipts | Correlations awaiting a carrier receipt |
| Record queue depth, per sink | A growing queue means the file or control-plane sink is behind |
| Sessions per account | Detects accounts that stopped binding |
| Rejected, throttled and quota counters | Customer-visible refusals |
| Control-plane failures | Notification and routing errors |
| Firewall state | When the screen last answered, how many messages passed unscreened and how many are held |
| Provisioning age | When the control plane last answered |
Flight recorder
When enabled, every carrier and customer SMPP session is captured to hourly pcap files, with synthesised TCP framing, so that no packet capture library and no root privileges are needed. A wire log indexes every PDU as a JSON line: time, role, session, direction, command, sequence, status, addresses, message ID and a truncated body or receipt text.
Two admin endpoints serve it.
- Wire searches the index by time, role, command, session or any substring, such as a number or message ID. It returns lines in time order.
- Pcap returns a Wireshark-ready capture for the sessions that match a search, with a margin around the matched events so the surrounding binds and responses are included.
The usual use is a dispute with a carrier. Search by the destination number, download the capture for that message and attach it. Bind passwords are masked in captures, and the wire log never records them. Retention is configurable and old files are pruned. Data begins when the recorder was first enabled, and the recorder is off unless configured.
Protect the capture directory like any store of message content, since PDU bodies appear in it.
CDR files
CDRs are append-only JSON Lines, one file per UTC day, synced per record. They are never rewritten. The optional HTTP sink delivers each record to the control plane from its own queue, so an unavailable endpoint cannot stall the files. Collect the files with your usual log shipper if you also need them off the node. See Routing through the control plane.
Changing accounts and carriers
With provisioning, accounts and carriers change at the control plane and the gateway picks the change up at the next poll or immediately after a refresh request. Removing an account stops new binds and leaves existing sessions open until you close them with the unbind verb.
Deployment
The deployment script cross-compiles a static binary, installs it with a hardened systemd unit, creates a configuration from the example on first install and never overwrites an existing one. Containers are supported as well. The reference production layout is a pair of nodes behind a stable address, PostgreSQL for state, and your control plane. See High availability and durability.