Operations manual

Integrate · 09

Observability and health

Observability starts with a small number of trustworthy signals: service state, readiness, logs, audit records and delivery logs. Add external monitoring only after those are reliable.

IntegrateMonitoringHealthReviewed November 2026

Health endpoints

EndpointMeaningUse
/health/General application response.Basic smoke test.
/health/live/The WSGI worker answered; no dependencies touched.Process supervision.
/health/ready/Database and cache round-trip succeeded.Release gate and uptime monitor.

Readiness returns 200 with checks.database=ok and checks.cache=ok, or 503 with the failing check. SECURE_REDIRECT_EXEMPT allows plain loopback probes.

Logs

Production settings log to stdout and to logs/django.log with a rotating file handler. systemd captures stdout in journald; logrotate bounds the file. The release script prints the service journal on a failed readiness check.

sudo journalctl -u perfumz -n 100 --no-pager
sudo journalctl -u perfumz-jobs -n 100 --no-pager
tail -n 100 /srv/perfumz/logs/django.log

Logs may contain customer email addresses and order numbers. Restrict access and redact before sharing an excerpt.

Audit and delivery records

The audit log records staff actions such as product changes, order status, refunds, payouts, settings, roles and content publishes. Email and webhook delivery logs record attempts and errors. The analytics workbench records first-party events and provider health.

RecordSurface
Staff audit/dashboard/audit/
Email delivery/dashboard/emails/
Webhook delivery/dashboard/webhooks/
Analytics/dashboard/analytics/

Production verification

.venv/bin/python manage.py check --deploy --settings config.settings_production
bash deploy/verify.sh
curl -fsS https://perfumz.com/health/ready/

deploy/verify.sh starts a temporary Gunicorn process with production settings, runs migrations and static collection on a temporary database, checks preview framing, and asserts the redirect and security headers.

External monitoring

  • Monitor /health/ready/ over HTTPS from outside the VPS.
  • Alert on a non-200 response for two consecutive checks.
  • Watch disk usage for media, logs and backups.
  • Watch PostgreSQL connections and slow queries.
  • Check the jobs timer after every reboot; backups are manual.
Perfumz Operations Manual · English reference · Reviewed November 2026