Each node exposes a management API, a Prometheus endpoint and a CLI that wraps the API. The API is per node. A cluster-wide view is your monitoring system's job: query both nodes, and expect the active one to hold the calls.
Management API
The API listens on a configurable address, which defaults to loopback. Expose it on a control network only. Requests carry a bearer token. The health and metrics endpoints need no token so that load balancers and Prometheus can read them. Every response carries the node name, and errors are JSON with the HTTP status.
| Area | What you can do |
|---|---|
| Status and health | Node summary, role, decision client state, media engine reachability, listeners |
| Calls | List live calls with filters, read one call with its plan, dialogs and media, hang one up |
| Peers | Read OPTIONS health and probe a peer now |
| Traces | Fetch the SIP trace of a call as JSON or text |
| Decision client | Read breaker and cache state, flush cached plans |
| Provisioning | Read the trunk list and revision in force |
| Security | Read counters and blocked sources, block or unblock an address |
| Cluster | Read HA status, trigger a planned step-down, read cluster configuration drift and push a cluster file |
| Telemetry | Read event and CDR delivery state, replay set-aside records |
| Audit | Read recent audited actions |
| WebRTC | Fetch STUN and TURN settings for a browser |
| Configuration | Reload the node file |
sbcctl wraps every endpoint. It reads its URL and token from the environment or from flags, and prints raw JSON with --json.
sbcctl status
sbcctl calls --state ESTABLISHED
sbcctl peers
sbcctl security block 192.0.2.99 10m
sbcctl config reload
Health
GET /v1/health always answers HTTP 200 and reports ok or degraded with a check for the engine role, decision API and media engine. Parse the body. A separate tracking variant exists for keepalived and answers 503 while a step-down is pending, so do not use it for monitoring.
Metrics
Prometheus metrics are served on the management listener and optionally on a dedicated address. They cover:
| Group | Examples |
|---|---|
| Calls | Active calls, calls by state, calls per second, started, answered, failed and ended by code and reason, setup time and duration histograms |
| SIP | Requests and responses by method and code, active transactions, retransmissions, timeouts, parse errors, drops, DNS lookups |
| Decision API | Request outcomes, latency, errors, timeouts, decisions by source (live or cache) |
| Egress | Destination attempts by outcome, peer status, round-trip time, probes |
| Media | Operations by result, active sessions, packets, loss, jitter |
| Security | Packets dropped, invites rejected by reason, sources blocked |
| HA | Role, replication lag, standby connected, peer alive |
| Delivery | Events and CDRs queued, sent and dropped, spool backlog, records set aside and held |
Alert on the things that change call outcomes: no active node, no connected standby, decision API error rate and latency, peers down, media engine errors, failure ratio, dropped events and any records your receivers refuse or hold. A rule set for these ships with the reference deployment.
Admission rejections produce metrics but no CDR and no event, so graph the rejection counters if you need to see them.
Configuration changes
- Reload. A reload, through the API or SIGHUP, re-reads the node file: trunk bootstrap, limits, peers, log level and TLS certificates. Established calls are not affected.
- Cluster file. Settings shared between nodes live in one cluster file. Pushing it through the API validates it, applies it to the standby and then the active node, and reports whether a restart is needed. A partial result and any drift between the nodes are reported.
- Policy changes. Routing policy lives in your decision service and needs no SBC change. Flush the decision cache if a change must apply before cache entries expire.
Logs
Logs are JSON lines with the node ID and, on call lines, the call UUID. The CDR file, event file and trace file are optional local mirrors of what is posted to your receivers.
Testing against a lab
The repository includes a decision mock and SIPp scenarios. A lab configuration runs the mock and a node without rtpengine so that you can send calls, inspect them with the CLI and read their traces before connecting your own service. The conformance checker covers the decision service itself. See The decision API.