Monitoring and alerting
FlowCatalyst exposes Prometheus metrics, a handful of health endpoints, a router dashboard with its own warnings, and structured logs. This page says where each is, what it really tells you, and which signals deserve an alert. The full list of metrics, with types and labels, is the generated metrics reference.
Health endpoints
Section titled “Health endpoints”| Endpoint | Where | What it checks |
|---|---|---|
GET /health |
API port (8080), every process | Only that the process serves HTTP. Always {"status":"UP","version":...}; it does not check the database. Use it for liveness |
GET /health, GET /ready |
Metrics port (9090) | The same; /ready lists which subsystems this process runs. Neither checks dependencies |
GET <prefix>/health/live |
Router (/router by default, API port) |
The router process is up |
GET <prefix>/health/ready |
Router | 503 NOT_READY when the router is degraded (unhealthy pools, all consumers stalled, critical warnings, or too many warnings) or any consumer that should poll is stalled |
GET <prefix>/health |
Router | Status plus active and critical warning counts |
GET /health/push |
Push gateway | 200 once the gateway follows the push log |
GET /healthz |
Function runner private port (8095) | 503 when too many calls are stuck past their deadline (the process should be replaced) |
GET /readyz |
Function runner private port | Not ready until the runner has loaded its desired state, and while unhealthy |
GET /health/live, /health/ready |
Ingestor (8091) | Ready fails while the platform has not answered a poll for three intervals, or refuses the runtime’s id as already in use |
Use the router’s readiness only for a router-only process. In a process that also serves the API, a degraded router would take the API out of the load balancer.
Where metrics are served
Section titled “Where metrics are served”| Port and path | Metrics |
|---|---|
Metrics port FC_METRICS_PORT (9090), /metrics |
Go runtime (go_*) and process (process_*) collectors; dispatch-job lifecycle (fc_dispatch_job_*); ingestion (fc_ingestion_*); secret references (fc_secret_reference_*); the dispatch scheduler (fc_scheduler_*) where it runs; the push gateway (fw_push_*, fc_push_*) where it runs |
API port, <router prefix>/metrics (default /router/metrics) |
Router (fc_circuit_breaker_*, fc_consumer_*, fc_messages_*, fc_pool_*, fc_queue_*, fc_rate_limit_*, fc_router_*) plus the Go and process collectors |
Function runner private port (8095), /metrics |
Function runner (fc_fn_*) |
The metrics port has no authentication; keep it on a private network. The router’s /metrics and
health paths are public even when router Basic auth is configured, and they share the API port,
so block /router/ at the public load balancer (see hardening).
The ingestor runtime exposes no Prometheus metrics: watch it through the platform (below) and its logs.
There are no HTTP request metrics; take request rates, latencies and status codes from your load balancer.
What to alert on
Section titled “What to alert on”The rules below are starting points. Tune thresholds to your traffic, and route the “page” ones to someone who can act.
Dispatch is falling behind
Section titled “Dispatch is falling behind”The single best signal: the age of the oldest due PENDING job.
- alert: DispatchBacklogAging expr: max(fc_scheduler_pending_oldest_age_seconds) > 300 for: 10m labels: { severity: page } annotations: summary: The oldest due dispatch job has waited over 5 minutes to be published
- alert: DispatchSchedulerNotPolling expr: time() - max(fc_scheduler_last_successful_poll_timestamp_seconds) > 120 for: 5m labels: { severity: page } annotations: summary: No dispatch scheduler has completed a poll for 2 minutes (no leader, or the database is failing)
- alert: DispatchPublishFailures expr: increase(fc_scheduler_jobs_unpublished_total[10m]) > 0 labels: { severity: warn }
- alert: DispatchStaleRecoveries expr: increase(fc_scheduler_stale_jobs_recovered_total[1h]) > 50 labels: { severity: warn } annotations: summary: Many jobs were stuck QUEUED or PROCESSING and recovered; check the router and the callbackTwo counters on the dispatch callbacks (/api/dispatch/process and /api/dispatch/settled, label
endpoint) tell you about the app key. fc_dispatch_job_auth_rejected_total counts job tokens that
verified under no configured key (answered 401); it should be zero, and a sustained rate means the tiers
disagree about FLOWCATALYST_APP_KEY. fc_dispatch_job_auth_previous_key_total counts tokens that
verified only under a previous key: during a rotation it shows how much still depends on the old key. See
Key rotation.
- alert: DispatchAuthRejected expr: increase(fc_dispatch_job_auth_rejected_total[10m]) > 0 labels: { severity: warn }max() across replicas matters: only the leader polls, so a standby’s timestamp stands still.
Runbook: stuck dispatch jobs.
The router
Section titled “The router”- alert: RouterCircuitOpen expr: max by (target) (fc_circuit_breaker_open) == 1 for: 10m labels: { severity: warn }
- alert: RouterQueueBacklog expr: max by (queue) (fc_queue_pending_messages) > 10000 for: 15m labels: { severity: warn }
- alert: RouterConsumerErrors expr: sum by (queue) (rate(fc_consumer_errors_total[5m])) > 0 for: 10m labels: { severity: warn }
- alert: RouterPanics expr: increase(fc_router_panics_recovered_total[15m]) > 0 labels: { severity: warn }Two things the router’s metrics cannot tell you:
- Consumer failures of platform dispatch jobs. The delivery callback records the outcome itself
and answers the router “acknowledged” either way, so
fc_messages_processed_total{success="false"}stays near zero even when consumers fail. Watch failed jobs in the platform instead (below). - A queue the router is not consuming at all. If a queue is missing from the router’s
configuration, no router metric moves. Alert on the broker’s own age of the oldest message (for
SQS, CloudWatch
ApproximateAgeOfOldestMessageper queue), which works whether or not a consumer exists.
Ingestion, secrets and functions
Section titled “Ingestion, secrets and functions”- alert: IngestionUnheld expr: max(fc_ingestion_unheld) > 0 for: 5m labels: { severity: page } annotations: summary: A live polled ingestion is running nowhere (no runtime has held its lease)
- alert: SecretReferenceErrors expr: sum by (code) (increase(fc_secret_reference_errors_total[15m])) > 0 labels: { severity: warn }
- alert: FunctionRunnerStuckCalls expr: max(fc_fn_stuck_calls) > 0 labels: { severity: warn }
- alert: FunctionErrors expr: | sum by (address) (rate(fc_fn_invocations_total{outcome=~"5xx|timeout|failed|malformed|load_failed|out_of_memory|no_memory|unavailable|FUNCTION_UNAVAILABLE"}[5m])) / sum by (address) (rate(fc_fn_invocations_total[5m])) > 0.05 for: 10m labels: { severity: warn }
- alert: FunctionMemoryPressure expr: fc_fn_memory_used_bytes / fc_fn_memory_budget_bytes > 0.9 for: 10m labels: { severity: warn }Runbooks: ingestion silent, function failing.
Processes
Section titled “Processes”Alert on scrape targets that disappear (up == 0), on resident memory near the container limit
(process_resident_memory_bytes), and on restarts from your orchestrator. A steadily growing
go_goroutines on a router is worth a look.
What has no metric, and how to see it
Section titled “What has no metric, and how to see it”| Question | Where to look |
|---|---|
| Are consumers failing? | The console’s dispatch-job list filtered to FAILED; or a scheduled query, for example SELECT count(*) FROM msg_dispatch_jobs WHERE status = 'FAILED' AND updated_at > now() - interval '1 hour' AND created_at > now() - interval '2 days' |
| Is fan-out keeping up? | SELECT count(*), min(created_at) FROM msg_events WHERE fanned_out_at IS NULL (cheap: a partial index) |
| Are the console lists up to date? | The same for projected_at IS NULL on msg_events and msg_dispatch_jobs |
| Is an ingestion actually polling? | The ingestion’s Activity page: polls, last poll, last exchange, failures per runtime |
| Is a scheduled job firing? | The scheduled job’s instances in the console |
| Is the outbox processor holding a group? | Its admin API, GET /outbox/holds and /outbox/groups/blocked, on 127.0.0.1:<FC_OUTBOX_ADMIN_PORT> |
A PostgreSQL exporter with custom queries turns any of these into a metric.
The router dashboard and warnings
Section titled “The router dashboard and warnings”The router serves an operator dashboard at <prefix>/monitoring/dashboard (by default
/router/monitoring/dashboard), behind router Basic auth: pools with workers, buffer and rate-limit
state, queues, circuit breakers, in-flight and mediating messages, message groups, and warnings. The
same data is JSON under <prefix>/monitoring/*; for example /monitoring/pools gives each pool’s
active_workers, concurrency, queue_size, queue_capacity, is_rate_limited,
oldest_mediating_ms and total_deferred.
The router also raises warnings (pool capacity, consumer health, routing and configuration
problems, stalled messages). They show on the dashboard and at <prefix>/warnings, count toward the
router’s health, and can be posted to a webhook:
| Variable | Effect |
|---|---|
FC_NOTIFY_WEBHOOK_URL |
Where warnings are posted; unset means log only |
FC_NOTIFY_MIN_SEVERITY |
The lowest severity sent (WARNING by default) |
FC_NOTIFY_BATCH_INTERVAL_SECONDS |
How long non-critical warnings are batched (300 s); a full batch of 20 or a critical warning is sent at once |
Every process logs JSON lines to standard error; ship them to your log store and index level,
msg, message_id, correlation_id and principal_id. Failures that repeat are paced and logged
once with a count, so a quiet log is not proof that nothing is failing; pair logs with the signals
above. The ingestor logs the same way.
For deep diagnosis, FC_DEBUG_ENDPOINTS_ENABLED=true mounts profiling and a goroutine dump at
<prefix>/debug/ (router Basic auth or an anchor principal required), and SIGQUIT writes the same
dump to standard error without stopping the process.
Read next
Section titled “Read next”- Metrics reference.
- Audit, traces and logs: traces for functions and ingestions, and failure pacing.
- Router and dispatch scheduler.