Skip to content

Architecture / Decision records / ADR-HIS-054

ADR-HIS-054 Observability platform unit: a service from the template beside the stack's configuration, alerts read from Grafana, routing and escalation in the unit

Status Accepted
Decided 2026-11-25 by session RC-1-S10
Record Drafted 2026-11-25; approved 2026-11-25 by the Enterprise Architecture Board
Where the rule lives platform/observability/ (its README.md, collector/, grafana/, bin/grafana-apply, mod-ise-008/, api/alerts.v1.openapi.yaml)

Context

RC-1-S10 builds MOD-ISE-008 for FR-ISE-OBS-001. It is the first build session on a platform unit, so it sets the shape that later platform sessions follow (RC-3-S09 on the same unit, and the other units of platform/). Technology stack row 15 selects the stack: OpenTelemetry collectors feeding Prometheus, Loki and Tempo, with Grafana for dashboards and alerting. The requirement needs more than the stack gives:

  • ServiceStateChanged published and the service state board served, as contracts/ise fixes them;
  • alerts routed by service tier and support model, and escalated when not acknowledged in time (behaviour 6, PR-OBS-001-2, CFG-ISE-023). Grafana's open-source alerting has neither acknowledgement nor escalation chains, and it does not know a service's tier;
  • an independent alert path when the monitoring pipeline itself fails (section 10);
  • correlation across hops, redaction of secrets, a "no data" alert per silent source, and the indicators of PRS Appendix B.

CLAUDE.md describes a platform folder as OpenTofu, Ansible, Kubernetes manifests and scripts. The card asks for service code and migrations.

Decision

  1. A platform unit may hold a Java service made from the service template (ADR-HIS-044), beside the configuration of the products it runs.
  2. platform/observability is the Gradle build of the unit ise-observability (domain code ise, module mod-ise-008, database ise_observability, image his/observability).
  3. Beside it sit collector/, grafana/, backends/ and runbooks/.
  4. The pipeline already builds a platform/ folder with settings.gradle.kts as a Java unit.
  5. Later platform sessions do the same when their requirement needs behaviour a product does not give: for example the catalogue API of platform/deployment-topology, and the event operations API of platform/event-backbone.
  6. Grafana evaluates the rules, and the unit owns the alert lifecycle.
  7. The unit reads the active alerts and silences from Grafana's Alertmanager API every cycle, with a Viewer service account. Grafana does not push them.
  8. Each poll reconciles the whole set: an alert not seen before is raised, one no longer active is resolved. A missed delivery cannot leave an alert open forever.
  9. The unit records alerts as DE-ISE-022 records (Firing, Acknowledged, Resolved) and takes the tier from the service catalogue entry of the alert's service label.
  10. It routes and escalates by the steps of CFG-ISE-023, through one webhook per support role, until the D10 notification service has a contract.
  11. Grafana's notification policies route nothing else: the one route they carry is the independent path of decision 4.
  12. One replica runs a cycle at a time, under a PostgreSQL advisory lock.
  13. Service state comes from alerts.
  14. A rule that sets the state labels its alerts his_state=Degraded or his_state=Unavailable. The board takes the worst state among the service's open alerts.
  15. Each change is published through the kit's outbox in the same transaction.
  16. The path depends on the unit, its database and the backbone, not on the monitored service.
  17. Self-monitoring both ways, each side watching the other.
  18. Grafana evaluates an always-firing rule, HisWatchdog. If the unit cannot read Grafana, or the watchdog is missing for longer than the grace (2 minutes), the unit raises MonitoringPipelineDegraded itself and pages SRE directly.
  19. The unit sets a heartbeat, his_observability_cycle_completed_seconds, at the end of every monitoring cycle that completes. Grafana's rule ObservabilityUnitSilent fires when the heartbeat is more than 3 minutes old or missing. That covers a crash, a lost database, or a cycle that keeps failing.
  20. That rule's alerts carry route=independent. Grafana sends them through one notification route straight to the SRE webhook (contact point his-sre-independent), without going through the unit. bin/grafana-apply sets the route and contact point from HIS_SRE_WEBHOOK_URL, and leaves the root policy as it is.
  21. The end-to-end check stops the unit and sees Grafana page SRE.
  22. The collector does three things before storage:
  23. it puts the correlation identifier under one name per signal: his.correlation_id on spans and correlationId on log records, the names the template's kit uses;
  24. it redacts secrets and national identity numbers, marks the record, and the rule SecretInTelemetry raises a defect ticket for the source;
  25. it counts telemetry per source (the count connector), which is the heartbeat of the "no data" rule.
  26. Grafana content is applied through the API by bin/grafana-apply, in every environment, rather than by file provisioning. The integration environment's Grafana belongs to FN-S02 and cannot take this unit's provisioning files. Rules applied through the API are read-only in the UI, so rules change only through a reviewed pull request (section 12). A deployment runs the same script as a post-sync job.
  27. The unit's operator API for alerts (list, read, acknowledge) is the unit's own, written in api/alerts.v1.openapi.yaml with the conventions of contracts/common.
  28. No other domain calls it, and no screen of RC-1 uses it, so it is not in contracts/ise.
  29. The ISE contract session of the slice that builds UI-ISE-005 moves it there.
  30. Indicator names. The unit fixes the Prometheus names of the Appendix B indicators whose producers come later, in its README, "Indicators". Examples are his_integration_acknowledgements_total, his_backup_last_success_timestamp_seconds and his_incidents_open. The dashboards query them now, and the producing sessions emit them under these names.

Consequences

  • One place routes every alert, with the tier from the catalogue. Changing the escalation of CFG-ISE-023 is a setting of this unit.
  • Alert latency is at most one rule interval (20 s) plus one poll (15 s), well inside the 5-minute acknowledgement of Tier 1.
  • Without Grafana no rule is evaluated: the unit then pages SRE, but cannot say what else is wrong. Without the unit nothing is routed: Grafana then pages SRE. Only both failing together leaves no page. The platform reliability dashboard shows it as "Monitoring pipeline".
  • A platform folder may now carry both kinds of build. A platform session reads this record before choosing between a service and product configuration alone.
  • The webhook pager is replaced by the D10 notification service once IF-ESS-009 is contracted. The roles stay the same.
  • The Kubernetes manifests for Argo CD are not in this session; they need the deployment topology of RC-1-S20. The collector runs as a DaemonSet for pod logs, and as a gateway Deployment for OTLP.

Alternatives considered

  • Grafana notification policies for routing, and Grafana OnCall for escalation. OnCall is not in the technology stack, and its open-source edition is no longer developed. Routing by tier in Grafana would need the tier on every rule, copied from the catalogue.
  • Prometheus Alertmanager. It routes well, but it has no acknowledgement and no escalation either. It would also be a second rule engine beside Grafana's.
  • Alerts pushed by a Grafana webhook to the unit. Push is faster, but a lost delivery leaves the unit's view wrong until the next change. Grafana's webhook also takes only a static credential, where every other endpoint of the unit is under token validation. The poll is simpler and always reconciles.
  • A separate service for the state board. A second service would split one thing, the alert set, across two places.