Skip to main content
Effective monitoring ensures your Grantex deployment is healthy, performant, and secure. This guide covers the native Prometheus metrics endpoint, Grafana dashboard templates, alert thresholds, and logging best practices.

Prometheus Metrics Endpoint

The auth service exposes a GET /metrics endpoint in Prometheus exposition format:
This endpoint is unauthenticated (no API key required) and rate-limited to 10 requests/minute per IP.

Counters

Histograms

Gauges

Environment Variables

Grafana Dashboards

Pre-built Grafana dashboards are available at deploy/grafana/:

Import Instructions

  1. In Grafana, go to Dashboards > Import
  2. Upload the JSON file or paste its contents
  3. Select your Prometheus data source when prompted (${DS_PROMETHEUS})
  4. Click Import

Health Check Endpoint

The auth service exposes a GET /health endpoint that returns the service status:
Use this endpoint for:
  • Load balancer health checks — poll /health every 10–30 seconds
  • Uptime monitoring — UptimeRobot, Pingdom, Cloud Monitoring
  • Kubernetes liveness probeslivenessProbe.httpGet.path: /health

Alerting Thresholds

Recommended thresholds for production alerting:

Alertmanager Rules

Logging

Structured Logging

The auth service uses Pino for JSON-structured logging:

What to Log

Webhook-Based Monitoring

Subscribe to webhook events for real-time alerting without polling:
Last modified on March 1, 2026