Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Monitoring

DIGIT's observability stack is built on three open-source pillars: Prometheus for metrics, Loki for log aggregation, and Jaeger for distributed tracing. All three are deployed via Helmfile and visualised through Grafana. Together, they give operations teams full visibility into infrastructure health, service performance, and request flows.

Monitoring Stack Overview

TOOL
ROLE
ACCESS

Prometheus

Time-series metrics database. Scrapes metrics from Kubernetes nodes, pods, services, and backbone components using a pull model. Stores data with timestamps and labels.

Internal; exposed via Grafana data source

Grafana

Visualisation layer. Connects to Prometheus and Loki. Pre-built dashboards for Kubernetes, Nginx Ingress, pods, nodes, PVCs, Redis, and Loki logs.

<domain>/monitoring — e.g. https://unified-dev.digit.org/monitoring/

Loki

Log aggregation system inspired by Prometheus. Collects, stores, and indexes logs from all pods using label-based indexing. Queried using LogQL via Grafana.

Via Grafana Loki data source

Alertmanager

Receives alerts from Prometheus. Groups, deduplicates, and routes them to notification channels (Slack, email, PagerDuty). Manages silences and inhibition rules.

kubectl port-forward port 9093 or via Grafana

Jaeger

Distributed tracing. Tracks API requests across microservices. Provides end-to-end latency analysis and dependency mapping for debugging performance issues.

<domain>/tracing

Blackbox Exporter

Probes HTTP endpoints to verify availability. Tracks SSL expiry, DNS lookup time, probe duration, and HTTP status codes from outside the cluster.

Via Grafana Blackbox Exporter dashboard

Deploying The Monitoring Stack

All monitoring tools are deployed together from the DIGIT-2.9LTS-monitoring branch using Helmfile:

git checkout DIGIT-2.9LTS-monitoring
cd deploy-as-code/charts/monitoring

# Preview manifests
helmfile -e <env> -f monitoring-helmfile.yaml template

# Review changes
helmfile -e <env> -f monitoring-helmfile.yaml diff

# Deploy all monitoring tools
helmfile -e <env> -f monitoring-helmfile.yaml apply

After deployment, retrieve Grafana admin credentials:

Enable nginx-ingress serviceMonitor so Prometheus can scrape ingress metrics. Add the following to your env.yaml, then redeploy nginx-ingress:

Grafana Dashboards

DIGIT ships with nine pre-built Grafana dashboards covering all layers of the stack. Dashboard JSON files are stored in the configs repository under monitoring-dashboards/ and auto-loaded via a Grafana init container (git-sync).

DASHBOARD
KEY METRICS & PURPOSE

Blackbox Exporter

Endpoint availability (UP/DOWN), HTTP response codes, SSL certificate expiry countdown, probe duration, DNS lookup time. Use to detect outages before users report them.

Kubernetes Overview

Cluster-wide CPU and memory utilisation, requested vs limit allocations, active node/namespace/pod counts, service and PVC object counts. Capacity planning and baseline health.

Namespaces Overview

Per-namespace CPU and memory usage as a percentage of cluster capacity, pod counts, configmap and secret counts. Identifies namespaces consuming disproportionate resources.

Nodes Overview

Per-node CPU, RAM, and pod count with uptime. Use to detect overloaded nodes or nodes approaching eviction thresholds.

Pods Overview

Per-pod CPU/memory requests vs limits with real-time gauges. Container-level breakdown inside each pod. Identifies over-provisioned or OOMKilling containers.

Nginx Ingress

Total HTTP request volume, success rate, HTTP status code distribution (2xx/3xx/4xx/5xx), latency percentiles, active connections. Monitors API gateway health.

PV / PVC Dashboard

Persistent Volume Claim utilisation, available storage, and bound/pending/lost status. Fires alerts when PVCs approach capacity.

Loki Dashboard

Log stream frequency over time, error/fatal log filtering by namespace and pod, query performance. Incident analysis and log-based SLIs.

Redis Monitoring

Uptime, client connections, memory utilisation %, commands per second, cache hit/miss rate, network I/O, expiring vs non-expiring key counts.

To add a custom panel to an existing dashboard: log in to Grafana, click Add Panel, configure PromQL queries, save the dashboard, export the JSON, then commit the updated JSON file to the configs repo monitoring-dashboards/ folder.

Log Aggregation With ECK & LOKI

APPROACH
COMPONENTS & NOTES

ECK Stack

Elastic Cloud on Kubernetes (ECK) Operator manages Elasticsearch (3-node cluster, 100 Gi persistent storage per node), Kibana (single instance), and Filebeat (DaemonSet — one pod per node, collects /var/log/containers logs). Deploy via: helm install elastic-operator elastic/eck-operator -n monitoring

Loki Stack

Lighter-weight alternative to ECK. Label-based log indexing (no full-text indexing of all fields). Queried using LogQL in Grafana. Lower storage cost than Elasticsearch. Recommended for new deployments on DIGIT 2.9 LTS.

Log retention

Set retention_period: 168h (7 days) in Loki config. For Elasticsearch, use ES-Curator to automatically delete indices older than a configurable threshold to prevent disk exhaustion.

Access Kibana logs after ECK deployment:

Distributed Tracing With JAEGER

Jaeger is used to track requests across DIGIT microservices. When a citizen submits an application, the request traverses the API Gateway, User Service, the relevant domain service, Persister, and notification services. Jaeger records the latency at each hop, enabling rapid pinpointing of bottlenecks.

FEATURE
DETAIL

Access URL

<domain>/tracing — e.g. https://qa.digit.org/tracing/search

Use for

Identifying which microservice is slow, diagnosing cascading failures, measuring end-to-end API latency per service type

Core services

Use tracing to monitor all core service API call chains — especially Workflow Engine, Persister, and User Service which are in the critical path of every transaction

Setup

Deploy via Helmfile (jaeger chart). Configure each Spring Boot service to emit OpenTelemetry spans to the Jaeger collector endpoint.

What To Monitor Per Infrastructure Layer

LAYER
KEY METRICS TO WATCH
TOOLS

Infrastructure

Node CPU/RAM utilisation, disk IOPS, network throughput, PVC fill rate, node count vs pod scheduling pressure

Grafana Nodes/PVC dashboards, Prometheus node-exporter

Backbone Services

Kafka consumer lag, ElasticSearch cluster health (green/yellow/red), ZooKeeper quorum, Redis memory %, PostgreSQL connections and replication lag

Grafana, prometheus-kafka-exporter, ES health API

Core Services

API response time per service, error rate (5xx %) per endpoint, Kafka topic publish/consume rate, Persister queue depth

Jaeger tracing, Grafana Nginx Ingress, Prometheus

DIGIT Apps

Citizen/employee portal availability (Blackbox Exporter), application-specific KPIs in DSS dashboard, workflow completion rates

Blackbox Exporter, DSS dashboard, Grafana

Last updated

Was this helpful?