Skip to content

Health checks and monitoring

Health checks

Path Meaning Answer
/healthz liveness: the process serves requests. No database check, so a database outage does not restart every instance 200 ok
/readyz readiness: database reachable, it holds the schema of this version, keys loaded, audit key current (not outdated by a command key rotation), notifications from other instances arrive, not shutting down 200 ready, or 503 with the reasons

Both answer on the console listener without sign in and regardless of the console network lists. On SIGTERM an instance fails /readyz for LIMDM_DRAIN_SECONDS, ends its remote shells and hands its background jobs to the other instances.

Monitoring

  • journalctl -u limdm-server / docker compose logs limdm: JSON logs.
  • GET /readyz for load balancers and uptime checks (health checks).
  • Prometheus metrics at <LIMDM_PUBLIC_URL>/metrics (see below).
  • Syslog forwarding of the audit log and device events to a SIEM (below).
  • The overview shows stale devices (no check in within the stale threshold).
  • Notification channels and the compliance webhook report events and non compliant devices (Notifications).

Prometheus metrics

GET /metrics on the console listener answers in the Prometheus text format. It needs an API token (Administration, API tokens) of the role metrics, admin or auditor; create a metrics token for the scraper, it can read nothing else. Tokens with scope tags and tokens of a tenant get no metrics. The console's network allow and block lists apply, as for every console path.

scrape_configs:
  - job_name: limdm
    scheme: https
    authorization:
      credentials_file: /etc/prometheus/limdm.token
    static_configs:
      - targets: ["mdm.example.com"]
Metric Labels Meaning
limdm_devices status Devices by status (compliant, in grace, non compliant, stale, pending, retired)
limdm_devices_last_checkin age Active devices by time since the last check in: lt_1h, lt_24h, lt_7d, lt_30d, ge_30d, never
limdm_compliance_failing_devices check Active devices failing a compliance check
limdm_commands_open status Commands waiting for the device (pending) or sent but not answered (sent)
limdm_agent_versions version Active devices by agent version
limdm_notifications_24h result Notification deliveries in the last 24 hours, ok or failed
limdm_audit_chain_intact 1 while the audit hash chain verifies, 0 after an entry was changed
limdm_audit_verified_timestamp_seconds Last audit chain verification
limdm_backup_last_success_timestamp_seconds Start of the last successful backup (Backup)
limdm_backup_last_size_bytes Size of the last successful archive
limdm_backup_last_run_failed 1 when the last backup run failed
limdm_backup_failures_total Failed backup runs of this instance since its start
limdm_http_requests_total listener, method, code Requests since the process started, console and agent listener; per instance, scrape every instance
limdm_http_request_duration_seconds listener, le Histogram of request durations (5 ms to 30 s buckets), console and agent listener; per instance

Useful alerts: limdm_audit_chain_intact == 0, increase(limdm_notifications_24h{result="failed"}[1h]) > 0, limdm_devices{status="stale"} > 0. Each scrape verifies the audit entries written since the last verification.

Syslog

With a syslog target in Settings, Operations (udp://host:514 or tcp://host:514; LIMDM_SYSLOG is the initial value) the server forwards every audit entry and device event as an RFC 5424 message (facility 13, log audit; TCP with octet counting framing, RFC 6587). Audit entries have the message ID audit and the structured data limdm@32473 with id, actor, action, target and hash; device events have the message ID event with id and device. A copy outside the database anchors the audit chain externally. Forwarding runs on one instance, retries unsent entries and continues from its stored position after a restart or leader change (Background jobs). Both streams are written one transaction at a time up to the commit, so ids become visible in order and the position (last sent id) cannot skip an entry that committed late.

tcp+tls://host:6514 sends over TLS (RFC 5425, octet counting, TLS 1.2 or newer); the collector's certificate is verified against the system roots, or against the CA certificate (PEM) in the same settings for a private CA (LIMDM_SYSLOG_CA names a file read once as the initial value). A changed target takes effect within seconds, without a restart.