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:
ServiceStateChangedpublished and the service state board served, ascontracts/isefixes 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¶
- A platform unit may hold a Java service made from the service template (ADR-HIS-044), beside the configuration of the products it runs.
platform/observabilityis the Gradle build of the unitise-observability(domain codeise, modulemod-ise-008, databaseise_observability, imagehis/observability).- Beside it sit
collector/,grafana/,backends/andrunbooks/. - The pipeline already builds a
platform/folder withsettings.gradle.ktsas a Java unit. - 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 ofplatform/event-backbone. - Grafana evaluates the rules, and the unit owns the alert lifecycle.
- 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.
- 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.
- 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
servicelabel. - 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.
- Grafana's notification policies route nothing else: the one route they carry is the independent path of decision 4.
- One replica runs a cycle at a time, under a PostgreSQL advisory lock.
- Service state comes from alerts.
- A rule that sets the state labels its alerts
his_state=Degradedorhis_state=Unavailable. The board takes the worst state among the service's open alerts. - Each change is published through the kit's outbox in the same transaction.
- The path depends on the unit, its database and the backbone, not on the monitored service.
- Self-monitoring both ways, each side watching the other.
- 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 raisesMonitoringPipelineDegradeditself and pages SRE directly. - The unit sets a heartbeat,
his_observability_cycle_completed_seconds, at the end of every monitoring cycle that completes. Grafana's ruleObservabilityUnitSilentfires when the heartbeat is more than 3 minutes old or missing. That covers a crash, a lost database, or a cycle that keeps failing. - That rule's alerts carry
route=independent. Grafana sends them through one notification route straight to the SRE webhook (contact pointhis-sre-independent), without going through the unit.bin/grafana-applysets the route and contact point fromHIS_SRE_WEBHOOK_URL, and leaves the root policy as it is. - The end-to-end check stops the unit and sees Grafana page SRE.
- The collector does three things before storage:
- it puts the correlation identifier under one name per signal:
his.correlation_idon spans andcorrelationIdon log records, the names the template's kit uses; - it redacts secrets and national identity numbers, marks the record, and the rule
SecretInTelemetryraises a defect ticket for the source; - it counts telemetry per source (the
countconnector), which is the heartbeat of the "no data" rule. - 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. - The unit's operator API for alerts (list, read, acknowledge) is the unit's own, written in
api/alerts.v1.openapi.yamlwith the conventions ofcontracts/common. - No other domain calls it, and no screen of RC-1 uses it, so it is not in
contracts/ise. - The ISE contract session of the slice that builds UI-ISE-005 moves it there.
- 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_secondsandhis_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.