---
title: Notifications & Metrics
product: trilio-site-recovery-for-openstack
doc_type: guide
version: master
source: git2docs (code-derived, validation-filtered)
canonical: https://git2docs.com/mark-reid/docs/trilio-site-recovery-for-openstack/trilio-site-recovery-for-openstack/notifications
---

# Notifications & Metrics

_oslo.messaging notifications and any exposed metrics_

## Overview

Trilio Site Recovery for OpenStack does not publish oslo.messaging notifications. There are no event topics, no lifecycle events, and no consumer examples to write — the `get_notifier()` helper exists in the codebase but has no caller, so not a single event is ever published.

Observability is instead **polled**: you read replication health, audit results, recovery points, and operation records on demand through the CLI and REST API. This page documents those polling surfaces — what each command returns, how frequently to call it, and how to interpret the fields that matter for DR readiness and incident diagnosis. If you are building failover alerting, poll these endpoints; do not subscribe to a notification bus.

## Prerequisites

Before using the monitoring and observability surfaces described on this page:

- **Trilio Site Recovery deployed** on both sites (Juju, Kolla-Ansible, or OpenShift).
- **`python3-triliositerecovery` installed** on any machine running the CLI. Install it from the Trilio apt repository at `https://apt.fury.io/trilio-os-site-recovery-master/`:
  ```bash
  sudo apt-get install python3-triliositerecovery
  ```
- **OpenStack credentials sourced** (a `clouds.yaml` or RC file for a user holding the `dr_operator` or `dr_site_admin` role, depending on the command).
- **Both sites registered** (`openstack dr site list` returns both entries).
- **Protection groups created** before replication health or recovery-point commands are meaningful.
- **Pure Storage driver** (if using async or active_dr replication) — health metrics come from the FlashArray REST API; the mock driver returns simulated values.

## Installation

No separate installation step is required beyond the base service deployment. The observability CLI commands are part of the `python3-triliositerecovery` package that is installed as part of every deployment path.

**Juju** — the charm installs the package automatically. After an upgrade, update the CLI separately on any machine that runs `openstack dr` but is not managed by the charm:

```bash
sudo apt-get install --only-upgrade python3-triliositerecovery
```

**Kolla-Ansible / bare-metal** — install from the Trilio apt repository:

```bash
# Add the Trilio repository if not already present
echo 'deb [trusted=yes] https://apt.fury.io/trilio-os-site-recovery-master/ /' \
  | sudo tee /etc/apt/sources.list.d/trilio-site-recovery.list
sudo apt-get update
sudo apt-get install python3-triliositerecovery
```

**OpenShift (RHOSO18)** — the CLI is used from an external controller node. Install it with the same `apt-get` command above on an Ubuntu Jammy or Noble host that has network access to the protector API on port 8788.

## Usage

All observability commands follow the `openstack dr` subcommand pattern from the `python3-triliositerecovery` package. There are no push notifications — poll these commands as needed, or integrate them into a monitoring script.

---

### Replication health

`openstack dr replication health <protection_group>` returns the current replication state for a protection group, including link status, sync state, lag, RPO compliance, and failover readiness. This is your primary pre-failover check.

The `--probe` flag asks the **recovery site** whether the group's networks, security groups, and flavors resolve there as the project it recovers into. It does **not** check the storage backend or replication lag. Run it before a maintenance failover window to catch missing network mappings before you need them. It is slower than the plain command because it queries the peer site's Neutron and Nova through the same trust-scoped session a real recovery would use — that project-scoping is the whole value.

```bash
# Basic replication health check
openstack dr replication health <protection-group-id>

# With recovery-site resource probe (recommended before planned failover)
openstack dr replication health <protection-group-id> --probe
```

Key fields in the response:

| Field | Meaning |
|---|---|
| `failover_ready` | `true` if all checks pass and a failover can proceed. |
| `failover_ready_reason` | Human-readable explanation — why it is or is not ready. |
| `link.status` | `healthy`, `degraded`, `broken`, or `unknown`. `unknown` means the state could not be determined (e.g., no replication policy, storage group missing, or array unreachable) — not the same as `broken`. |
| `link.determined` | `false` when the link state could not be established at all. A partially-created protection group whose setup failed mid-way may show `determined: false`; this does not mean the arrays cannot see each other. |
| `lag.rpo_compliant` | Whether current lag is within the configured `default_rpo_seconds` target. |
| `lag.lag_seconds` | Current replication lag in seconds. |
| `lag.rpo_violation_duration` | How long the RPO has been violated, in seconds. `null` if compliant. |
| `data_at_risk_seconds` | Estimated data loss if the primary fails right now. For async replication this is the age of the newest replicated snapshot; for active_dr it is the current lag. |
| `recovery_points.newest_replicated` | The most recent recovery point confirmed on the target site. `null` means no replicated point exists — failover is blocked. |
| `recovery_points.missed_snapshots_24h` | Number of scheduled snapshots missed in the last 24 hours. A non-zero value is a warning; it does not block failover on its own. |

---

### Replication audit

`openstack dr replication audit` checks all protection groups across all tenants (requires `dr_site_admin`) and returns a summary of replication health. Use it for a site-wide readiness assessment before a planned failover or during routine DR validation.

```bash
openstack dr replication audit
```

---

### Recovery points

Recovery points are the snapshots available for point-in-time recovery. List them to understand your recovery options before a failover, or to verify that scheduled snapshots are being created.

```bash
# List the 20 most recent recovery points (default)
openstack dr recovery point list <protection-group-id>

# List the 50 most recent
openstack dr recovery point list <protection-group-id> --limit 50

# Create a manual recovery point (useful before a planned maintenance window)
openstack dr recovery point create <protection-group-id>
openstack dr recovery point create <protection-group-id> --suffix pre-upgrade
```

Key fields per recovery point:

| Field | Meaning |
|---|---|
| `created_at` | When the snapshot was taken (ISO 8601). |
| `age_seconds` | How old this recovery point is at query time. |
| `is_replicated` | Whether this point has been replicated to the target site. Only replicated points are available for failover. |
| `is_consistent` | Whether this was a consistency-group-level snapshot covering all volumes atomically. |

---

### Operation records

Every DR operation (failover, failback, test failover, reconcile, etc.) is recorded in `dr_operations` and queryable through the CLI. Operation records are your audit log and your primary tool for diagnosing a failed or stalled DR workflow.

```bash
# List all operations
openstack dr operation list

# Filter by protection group
openstack dr operation list --protection-group <pg-id>

# Filter by status
openstack dr operation list --status failed

# Filter by type
openstack dr operation list --operation-type failover

# Show full detail of a specific operation
openstack dr operation show <operation-id>
```

Key fields in operation show:

| Field | Meaning |
|---|---|
| `status` | `pending`, `running`, `completed`, `partial_success`, or `failed`. |
| `progress` | Integer 0–100. The engine updates this as the operation proceeds. |
| `source_site` | The site name the operation ran from (falls back to site ID if the name cannot be resolved). |
| `target_site` | The site name the operation targeted (falls back to site ID). |
| `error_message` | Set when status is `failed`; describes what went wrong. |
| `result_data` | JSON blob with phase-level detail — which phase was executing when the operation stopped, and what changed. |

Note: operations do **not** carry an estimated completion time. The `progress` field (0–100) is the only forward indicator.

For site-level operations (failover of all protection groups at once):

```bash
openstack dr site operation list
openstack dr site operation list --status running
openstack dr site operation show <operation-id>
```

---

### Metadata sync status

Check whether protection group metadata is synchronized between sites:

```bash
# REST: GET /v1/{tenant_id}/protection-groups/{pg_id}/metadata/status
# CLI: use sync with --dry-run to preview what would change
openstack dr protection group sync <protection-group-id> --dry-run
```

## Troubleshooting

### Replication health shows `link.determined: false`

**Symptom:** `openstack dr replication health` returns `failover_ready: false` and `link.determined: false` with a message like "replication state could not be determined".

**Likely causes:**
- The protection group was created but storage setup failed partway (no replication policy or consistency group was created on the array).
- The FlashArray is unreachable from the engine node.
- The `python3-pure-client` package is missing on the engine node.

**Fix:** Check `protector-engine` logs at `/var/log/protector/` (Juju/Kolla) or via `oc logs` (OpenShift) for the error that occurred during protection group creation. Do not interpret `determined: false` as "arrays cannot see each other" — that is a different condition (`link.connected: false`). Re-run member add or delete and re-add the protection group if storage setup is incomplete.

---

### Replication health shows RPO violation

**Symptom:** `rpo_compliant: false` and `rpo_violation_duration` is non-zero.

**Likely causes:**
- Network congestion or degraded connectivity between FlashArrays.
- Write rate on the source is exceeding the replication throughput (`transfer.replication_keeping_up: false`).
- The `snapshot_interval_seconds` or `default_rpo_seconds` is misconfigured.

**Fix:** Check `transfer.throughput_bytes_per_sec` and `transfer.source_write_rate_bytes_per_sec` in the health response. If the write rate exceeds replication throughput, the RPO target may need to be relaxed or the replication link bandwidth increased. For configuration, adjust `default_rpo_seconds` in `[pure_storage]` or `snapshot_interval_seconds`.

---

### `recovery_points.newest_replicated` is `null`

**Symptom:** Replication health returns `failover_ready: false` with reason "No replicated recovery points available".

**Likely causes (async replication):**
- Protection group was created recently and the first scheduled snapshot has not yet replicated.
- Scheduled snapshots are disabled (`recovery_point_interval_minutes = 0`) and no manual recovery point has been created.
- The replication link was severed before any snapshot completed.

**Fix:** Create a manual recovery point:
```bash
openstack dr recovery point create <protection-group-id>
```
Then re-check health. If the problem persists, check the FlashArray replication link status directly.

---

### Operation stuck in `running` after engine restart

**Symptom:** `openstack dr operation list` shows an operation in `running` or `pending` state after the engine was restarted.

**Likely cause:** The engine marks orphaned operations as `FAILED` on startup and restores the protection group to the correct status based on the last checkpoint phase saved in `result_data`. If the engine did not complete this recovery step, the operation may remain stuck.

**Fix:** Restart `protector-engine`. On Juju:
```bash
juju ssh trilio-site-recovery/0 'sudo systemctl restart protector-engine'
```
On Kolla:
```bash
docker restart protector_engine
```
On OpenShift:
```bash
oc -n trilio-site-recovery rollout restart deployment/trilio-site-recovery-engine
```
If the operation remains stuck after restart, use `openstack dr operation cancel <operation-id>` and then `openstack dr protection group reconcile <protection-group-id>` to repair the protection group.

---

### Operation `source_site` and `target_site` columns are blank

**Symptom:** `openstack dr operation show` or `openstack dr operation list` shows empty values for the Source Site and Target Site columns.

**Likely cause:** This was a bug in earlier releases (fixed in b277167). If you are running an older version, the site name columns were structurally empty.

**Fix:** Upgrade to a release that includes b277167. The columns show the site **name**, falling back to the site ID if the name cannot be resolved.

---

### `--probe` returns resources as missing but they exist on the recovery site

**Symptom:** `openstack dr replication health <pg> --probe` reports a network or flavor as missing even though you can see it on the recovery site.

**Likely cause:** The `--probe` flag queries the recovery site as the **project the group recovers into** (via a trust-scoped session). A resource that exists under a different project on the recovery site will be correctly reported as missing for this group.

**Fix:** Verify that the network, security group, or flavor exists under the correct project on the recovery site, not just that it exists somewhere on the site. Add an explicit resource mapping if the resources have different names or IDs between sites:
```bash
openstack dr protection group mapping create <pg-id> \
  --resource-type network \
  --primary-resource-id <src-net-id> \
  --secondary-resource-id <dst-net-id>
```

---

### No replication events in oslo.messaging / notification bus

**Symptom:** A consumer subscribed to the RabbitMQ vhost `protector` on the topic `protector-notifications` receives nothing during failover, failback, or other DR operations.

**Cause:** This is by design. Trilio Site Recovery does **not** publish oslo.messaging notifications. The notification infrastructure exists in the codebase but `get_notifier()` has no caller and no event is ever published. Subscribing to the bus for DR lifecycle events will produce a consumer that connects, subscribes, and stays silent through a real failure — which looks identical to nothing being wrong.

**Fix:** Use the polled observability surface instead:
- `openstack dr replication health <pg> [--probe]` — replication and resource readiness
- `openstack dr replication audit` — site-wide health (requires `dr_site_admin`)
- `openstack dr recovery point list <pg>` — available recovery points
- `openstack dr operation list` / `openstack dr operation show` — operation status and progress

Build alerting by polling `GET /v1/{tenant_id}/protection-groups/{id}/replication-health` and `GET /v1/{tenant_id}/operations` on a schedule.

---

### Replication health shows a recently-created protection group as not ready

**Symptom:** A new protection group shows `failover_ready: false` immediately after creation.

**Likely cause:** For async replication, no replicated snapshot exists yet. For active_dr, the initial sync may still be in progress (`sync_status.in_sync: false`, `sync_status.sync_progress_pct` between 0 and 100).

**Fix:** Wait for the first snapshot to complete and replicate (async), or for the initial sync to finish (active_dr). Monitor progress:
```bash
watch -n 30 'openstack dr replication health <protection-group-id>'
```
