Skip to main content

Monitoring and alerts

What navin-manager watches​

ScopeDefinitionCondition (default thresholds warning / critical)
Hosthost_heartbeat_lostNo heartbeat for 60 / 120 seconds. Resolved as soon as the agent sends a heartbeat again.
Hosthost_disk_usageFullest filesystem among the root and the Navin directories (/etc/navin, /opt/navin, /var/lib/navin, /var/log/navin) at 80 / 90 percent. Other mounts stay visible in the host metrics.
Hosthost_memory_usageUsed memory at 85 / 95 percent.
Hosthost_loadLoad over 5 minutes divided by the CPU count at 1.5 / 3.
Hosthost_preflight_failedA preflight check of the host failed.
Hostagent_version_mismatchThe agent version differs from the server version.
Componentcomponent_downA component that must run is not running.
Componentcomponent_healthThe health checks of a running component fail.
Componentconfig_staleThe configuration changed and the component still runs the previous one.
Clustercertificate_expiryA certificate issued by the manager expires within 30 / 7 days.
Clusteroperation_failedAn operation of the cluster failed during the last 24 hours.
Managermanager_engine_lagLast pass of the operations engine 30 / 120 seconds ago.
Managermanager_databaseRound trip to the manager database of 200 / 1000 milliseconds.

Every definition can be disabled, and its thresholds and interval changed, in Alerts, Definitions. An alert keeps its history (state changes with the measured value), can be acknowledged with a note, and resolves by itself when the condition clears. Hosts in maintenance raise no alert.

Notifications​

Alerts, Notification targets sends the alerts that reach the minimum severity of a target:

KindDetails
EmailSMTP of Administration, Settings (STARTTLS and authentication supported).
WebhookHTTPS POST with the header X-NM-Signature: t=<unix>,v1=<hex>, where v1 is the HMAC-SHA256 of <t>.<body> with the secret of the target. Reject a timestamp older than 5 minutes.
SyslogRFC 5424 messages over UDP, TCP or TLS to the syslog of Administration, Settings (the SIEM of the bank).

Failed deliveries are retried, then marked failed after 5 attempts. Test sends a test notification.

Self monitoring of the manager​

System shows the health of the manager: database latency, delay of the operations engine, queued tasks, agents online and lost, last run and last error of each periodic job. The same data is served by GET /api/v1/system/health (permission system:read).

GET /metrics serves Prometheus metrics. It requires Authorization: Bearer <NM_METRICS_TOKEN>; in production the token is mandatory.

MetricLabelsMeaning
nm_build_infoversionVersion of the manager.
nm_hostscluster, stateHosts per cluster and state.
nm_host_componentsstateComponent instances per state.
nm_operationsstatusOperations per status.
nm_tasks_queuedTasks waiting for an agent.
nm_alertsseverityOpen alerts per severity.
nm_engine_lag_secondsSeconds since the last pass of the operations engine.
nm_database_latency_msRound trip to the manager database.
nm_scheduler_job_errorsjob1 when the last run of a periodic job failed.
nm_agents_onlineAgents that sent a heartbeat during the last minute.

The readiness of the process is GET /readyz (database reachable) and its liveness GET /healthz.

Monitoring of the managed platform​

The catalog holds a complete observability stack that navin-manager installs like any other service: Prometheus, Alertmanager, OpenSearch, OpenSearch Dashboards, Jaeger, Opik, Alloy, the OpenTelemetry Collector and the exporters (node, Redis, PostgreSQL, blackbox). The platform ships no dashboard server (ADR-0169): machines and services are followed in the manager itself (service monitoring tab with its history in the database, host metrics, telemetry export to ClickHouse), logs in OpenSearch Dashboards, traces in Jaeger and Opik, metrics and alerts in Prometheus and Alertmanager, whose alert and recording rules stay. A Grafana already run by the client can still be connected to these sources; the platform never deploys it (AGPL licence, ADR-0101).

Prometheus discovers the components to scrape from the manager: GET /api/v1/clusters/<cluster id>/sd/prometheus returns one target group per component instance that exposes metrics, with the labels nm_cluster, nm_service, nm_component and nm_host. The Prometheus service of the catalog configures this discovery with an API token stored in a file of mode 0640: create a token restricted to cluster:read in Profile, API tokens and give it to the parameter of the Prometheus service.

Alloy ships the journal of the navin-* units and the files of /var/log/navin as OTLP to the OpenTelemetry Collector, which writes them to OpenSearch, where OpenSearch Dashboards reads them.