> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nxtsight.com/llms.txt
> Use this file to discover all available pages before exploring further.

# nxtDR Monitoring

> Integrate nxtDR with nxtRadar to monitor replication health, RPO adherence, site availability, and DR readiness across all protection plans.

## Overview

Continuous monitoring of nxtDR replication is critical — a silent replication failure
discovered only during an actual disaster event can mean data loss far beyond the
configured RPO. Integrate nxtDR with nxtRadar to surface replication lag, site health,
and DR readiness metrics before they become incidents.

<Note>
  **Prerequisites**

  * nxtRadar deployed and agents active on both primary and DR sites
  * nxtDR controller API accessible from the nxtRadar collector
  * Protection plans in `ACTIVE` status
</Note>

***

## Key Metrics

| Metric                               | Description                         | Alert Threshold           |
| ------------------------------------ | ----------------------------------- | ------------------------- |
| `nxtDR_replication_lag_seconds`      | Current replication lag per plan    | > RPO target              |
| `nxtDR_site_health`                  | Site availability status            | `UNREACHABLE`             |
| `nxtDR_plan_status`                  | Plan replication state              | Not `ACTIVE`              |
| `nxtDR_last_test_age_days`           | Days since last DR test for a plan  | > 90 days                 |
| `nxtDR_recovery_point_count`         | Number of available recovery points | \< minimum configured     |
| `nxtDR_replication_throughput_bytes` | Replication throughput per link     | N/A (trending)            |
| `nxtDR_sync_progress_percent`        | Initial sync progress (0–100)       | \< 100 after 48h          |
| `nxtDR_link_latency_ms`              | Round-trip latency between sites    | > site-specific threshold |

***

## nxtRadar Dashboard

nxtDR includes a pre-built nxtRadar dashboard showing all protection plans and their
current replication status. Navigate to **Monitoring → Dashboards → nxtDR Overview**.

The dashboard provides:

* Per-plan replication lag (sparkline, 24h history)
* Site health indicator for all registered sites
* RPO compliance percentage per plan (7d rolling)
* Last DR test date and outcome per plan
* Active failover events (if any)

***

## Alert Rules

Configure nxtRadar alert rules to notify operations teams before replication problems
impact RPO compliance.

<AccordionGroup>
  <Accordion title="Replication lag approaching RPO" icon="clock">
    Alert before lag actually exceeds the RPO target — early warning allows
    investigation before data loss risk is realized.

    Navigate to **Monitoring → Alerting → Alert Rules → Create Rule**:

    ```
    Name: nxtDR Replication Lag Warning
    Condition: nxtDR_replication_lag_seconds > (nxtDR_rpo_target_seconds * 0.75)
    For: 5 minutes
    Severity: Warning
    Channel: ops-alerts
    ```

    ```
    Name: nxtDR Replication Lag Critical
    Condition: nxtDR_replication_lag_seconds > nxtDR_rpo_target_seconds
    For: 2 minutes
    Severity: Critical
    Channel: ops-pagerduty
    ```
  </Accordion>

  <Accordion title="Plan not active" icon="shield">
    Alert immediately if a protection plan transitions out of `ACTIVE` status —
    this means replication has stopped and the DR site data is not being updated.

    ```
    Name: nxtDR Plan Not Active
    Condition: nxtDR_plan_status != "ACTIVE"
    For: 1 minute
    Severity: Critical
    Channel: ops-pagerduty
    ```
  </Accordion>

  <Accordion title="Site unreachable" icon="server">
    Alert when a site becomes unreachable — could indicate the primary site has
    failed or network connectivity between sites has been lost.

    ```
    Name: nxtDR Site Unreachable
    Condition: nxtDR_site_health == "UNREACHABLE"
    For: 2 minutes
    Severity: Critical
    Channel: ops-pagerduty
    ```
  </Accordion>

  <Accordion title="DR test overdue" icon="flask-conical">
    Alert when a protection plan has not been tested within the configured interval.
    DR plans that are never tested cannot be relied upon during an actual disaster.

    ```
    Name: nxtDR Test Overdue
    Condition: nxtDR_last_test_age_days > 90
    For: immediate
    Severity: Warning
    Channel: ops-alerts
    ```

    Navigate to **Monitoring → Alerting → Alert Rules** and create a rule sourcing
    the `nxtDR_last_test_age_days` metric to ensure tests are not missed.
  </Accordion>
</AccordionGroup>

***

## Diagnostic Views

All diagnostic information is available through the nxtDR Dashboard:

| Diagnostic                       | Dashboard Location                                                                           |
| -------------------------------- | -------------------------------------------------------------------------------------------- |
| Replication lag across all plans | **Disaster Recovery → Protection Plans** — lag column in the plan list                       |
| Replication health history       | **Disaster Recovery → Protection Plans → \[Plan]** — replication lag sparkline (24h history) |
| Site health status               | **Disaster Recovery → Sites** — health indicator per site                                    |
| Link throughput statistics       | **Disaster Recovery → Sites → Replication Links → \[Link]** — throughput and latency metrics |

***

## Replication Health Thresholds

Use these thresholds when configuring nxtRadar alert rules:

| Metric                  | Healthy              | Warning               | Critical             |
| ----------------------- | -------------------- | --------------------- | -------------------- |
| Replication lag         | \< 50% of RPO target | 50–100% of RPO target | > RPO target         |
| Plan status             | `ACTIVE`             | `DEGRADED`            | `FAILED` / `STOPPED` |
| Site health             | `CONNECTED`          | `DEGRADED`            | `UNREACHABLE`        |
| Last recovery point age | \< RPO target        | RPO target to 2× RPO  | > 2× RPO target      |
| Sync progress (initial) | Increasing           | Stalled > 30 min      | No progress > 2h     |

***

## Log Collection

nxtDR agent and controller logs are forwarded to nxtRadar log analytics automatically
when agents are deployed via nxtDeploy. Query logs in **Monitoring → Log Explorer**:

| Log Source            | Query Pattern                                        |
| --------------------- | ---------------------------------------------------- |
| nxtDR controller      | `service: nxtDR-controller`                          |
| nxtDR agent (primary) | `service: nxtDR-agent AND site: primary-dc1`         |
| nxtDR agent (DR)      | `service: nxtDR-agent AND site: dr-site-a`           |
| Failover events       | `service: nxtDR-controller AND event_type: failover` |
| Runbook scripts       | `service: nxtDR-runbook AND plan: prod-database-dr`  |

***

## Next Steps

<CardGroup cols={2}>
  <Card title="nxtRadar Admin Guide — Alert Channels" href="/services/monitoring/admin-guide/alert-channels" color="#0b5ed7">
    Configure notification channels for nxtDR alerts
  </Card>

  <Card title="Compliance" href="/services/disaster-recovery/admin-guide/compliance" color="#0b5ed7">
    Generate RPO/RTO compliance reports from monitoring history
  </Card>

  <Card title="DR Automation" href="/services/disaster-recovery/admin-guide/dr-automation" color="#0b5ed7">
    Configure automatic failover on site health alerts
  </Card>

  <Card title="Troubleshooting" href="/services/disaster-recovery/admin-guide/troubleshooting" color="#0b5ed7">
    Diagnose replication lag and plan health issues
  </Card>
</CardGroup>
