Skip to content

Monitoring

MXHook exposes Prometheus-compatible metrics for monitoring your deployment.

Prometheus Metrics

Key metrics to monitor:

MetricTypeDescription
mxhook_messages_received_totalCounterTotal emails received by SMTP server
mxhook_messages_delivered_totalCounterTotal successful webhook deliveries
mxhook_messages_failed_totalCounterTotal failed webhook deliveries
mxhook_dlq_sizeGaugeCurrent number of entries in the dead letter queue
mxhook_webhook_duration_secondsHistogramWebhook delivery latency
mxhook_smtp_connections_activeGaugeCurrent active SMTP connections

Grafana Dashboard

MXHook includes a Grafana dashboard in the deploy/ directory. Import it into your Grafana instance for a pre-built overview of:

  • Message throughput (received, delivered, failed)
  • Webhook delivery latency (p50, p95, p99)
  • DLQ depth over time
  • SMTP connection activity
  • Error rates

Health Check

The /health endpoint returns the service status:

bash
curl http://localhost:8080/health
json
{"status": "ok"}

Use this for load balancer health checks and container orchestration liveness probes.

Alerting Recommendations

ConditionThresholdSeverity
DLQ size growing> 10 entriesWarning
Webhook error rate> 5% over 5 minutesCritical
Delivery latency p95> 800msWarning
SMTP connection errors> 0 sustainedWarning

Released under the Apache 2.0 License.