DR Documentation Collector
Parse disaster recovery plan and exercise documentation to extract RTO/RPO targets, exercise dates, review timestamps, and section headings. Verify that teams document and regularly practice recovery procedures.
dr-docs to your lunar-config.yml:uses: github://earthly/lunar-lib/collectors/dr-docs@v1.0.0
What This Integration Collects
This integration includes 2 collectors that gather metadata from your systems.
dr-plan
Collects the disaster recovery plan document (default: docs/dr-plan.md).
Expects YAML frontmatter with recovery objectives (rto_minutes, rpo_minutes),
review metadata (last_reviewed, approver), and a Markdown body with sections
covering recovery procedures.
dr-exercise
Collects DR exercise records from a directory (default: docs/dr-exercises/).
Each exercise is a date-prefixed Markdown file (e.g., 2025-11-15.md or
2025-11-15-database-failover.md) with optional YAML frontmatter for
exercise type and body sections documenting the scenario and outcomes.
Provides full exercise history and summary metrics.
How Collectors Fit into Lunar
Lunar watches your code and CI/CD systems to collect SDLC data from config files, test results, IaC, deployment configurations, security scans, and more.
Collectors are the automatic data-gathering layer. They extract structured metadata from your repositories and pipelines, feeding it into Lunar's centralized database where guardrails evaluate it to enforce your engineering standards.
Learn How Lunar Works →Example Collected Data
This collector writes structured metadata to the Component JSON. Here's an example of the data it produces:
{
"oncall": {
"disaster_recovery": {
"plan": {
"exists": true,
"path": "docs/dr-plan.md",
"rto_defined": true,
"rto_minutes": 60,
"rpo_defined": true,
"rpo_minutes": 15,
"last_reviewed": "2025-12-01",
"approver": "jane.doe@company.com",
"sections": [
"Overview",
"Recovery Steps",
"Contact List",
"Dependencies"
]
},
"exercises": [
{
"date": "2025-11-15",
"path": "docs/dr-exercises/2025-11-15.md",
"exercise_type": "tabletop",
"sections": [
"Scenario",
"Recovery Steps Tested",
"Participants",
"Action Items",
"Lessons Learned"
]
},
{
"date": "2025-05-20",
"path": "docs/dr-exercises/2025-05-20.md",
"exercise_type": "failover",
"sections": [
"Scenario",
"Recovery Steps Tested",
"Participants"
]
}
],
"latest_exercise_date": "2025-11-15",
"exercise_count": 2
}
}
}
Configuration
Configure this collector in your lunar-config.yml.
Inputs
| Input | Required | Default | Description |
|---|---|---|---|
plan_paths
|
Optional |
docs/dr-plan.md
|
Comma-separated list of candidate paths to the DR plan document (first match wins) |
exercise_dir_paths
|
Optional |
docs/dr-exercises
|
Comma-separated list of candidate directories for DR exercise records (first match wins) |
Documentation
View on GitHubDR Documentation Collector
Collects disaster recovery plan and exercise documentation including RTO/RPO targets, exercise history, and document structure.
Overview
This collector parses two types of disaster recovery documentation: a DR plan and a directory of exercise records. The plan is a single Markdown file with YAML frontmatter for recovery objectives and review metadata. Exercises are date-named Markdown files (YYYY-MM-DD.md) in a directory, each documenting a tabletop exercise, failover test, or full recovery drill.
Collected Data
The DR plan sub-collector expects a single file (default: docs/dr-plan.md):
---
rto_minutes: 60
rpo_minutes: 15
last_reviewed: 2025-12-01
approver: jane.doe@company.com
---
# Disaster Recovery Plan
## Overview
...
## Recovery Steps
...
## Contact List
...
The DR exercise sub-collector scans a directory (default: docs/dr-exercises/) for date-named files:
docs/dr-exercises/
├── 2025-11-15.md # Most recent tabletop
├── 2025-05-20.md # Failover test
└── 2024-11-01.md # Previous year's exercise
Each exercise file is a Markdown file with optional frontmatter:
---
exercise_type: tabletop
---
# DR Exercise
## Scenario
Simulated complete loss of the primary database...
## Recovery Steps Tested
1. Detected outage via PagerDuty alert...
## Participants
- Jane Doe (Engineering Manager)
...
This collector writes to the following Component JSON paths:
| Path | Type | Description |
|---|---|---|
.oncall.disaster_recovery.plan.exists |
boolean | Whether a DR plan document exists |
.oncall.disaster_recovery.plan.path |
string | Path to the DR plan document |
.oncall.disaster_recovery.plan.rto_defined |
boolean | Whether RTO is documented |
.oncall.disaster_recovery.plan.rto_minutes |
number | Recovery Time Objective in minutes |
.oncall.disaster_recovery.plan.rpo_defined |
boolean | Whether RPO is documented |
.oncall.disaster_recovery.plan.rpo_minutes |
number | Recovery Point Objective in minutes |
.oncall.disaster_recovery.plan.last_reviewed |
string | ISO 8601 date of last plan review |
.oncall.disaster_recovery.plan.approver |
string | Email of the plan approver |
.oncall.disaster_recovery.plan.sections |
array | Section headings found in the plan |
.oncall.disaster_recovery.exercises[] |
array | All exercise records, newest first |
.oncall.disaster_recovery.exercises[].date |
string | Exercise date (from filename or frontmatter) |
.oncall.disaster_recovery.exercises[].path |
string | Path to the exercise file |
.oncall.disaster_recovery.exercises[].exercise_type |
string | Type of exercise (tabletop, failover, full) |
.oncall.disaster_recovery.exercises[].sections |
array | Section headings found in the exercise |
.oncall.disaster_recovery.latest_exercise_date |
string | Date of the most recent exercise |
.oncall.disaster_recovery.exercise_count |
number | Total number of exercise records |
Collectors
This integration provides the following collectors (use include to select a subset):
| Collector | Description |
|---|---|
dr-plan |
Parses DR plan document for recovery objectives and review metadata |
dr-exercise |
Scans directory of date-named exercise records for exercise history |
Installation
Add to your lunar-config.yml:
collectors:
- uses: github://earthly/lunar-lib/collectors/dr-docs@v1.0.0
on: ["domain:your-domain"] # Or use tags like [backend, production]
# with:
# plan_path: "docs/dr-plan.md"
# exercise_dir: "docs/dr-exercises"
Open Source
This collector is open source and available on GitHub. Contribute improvements, report issues, or fork it for your own use.
Common Use Cases
Explore guardrails that use data from DR Documentation Collector.
Ready to Automate Your Standards?
See how Lunar can turn your engineering wiki, compliance docs, or postmortem action items into automated guardrails with our 100+ built-in guardrails.