Min Participants + PagerDuty Collector
Enforce Min Participants using data collected by PagerDuty Collector. Automatically check operational readiness standards on every PR.
How PagerDuty Collector Powers This Guardrail
The PagerDuty Collector gathers metadata from your service catalog systems. This data flows into Lunar's Component JSON, where the Min Participants guardrail evaluates it against your standards.
When enabled, this check runs automatically on every PR and in AI coding workflows, providing real-time enforcement with actionable feedback.
Quick Start Configuration
Add both the collector and policy to your lunar-config.yml to enable this guardrail.
# Step 1: Enable the PagerDuty Collector
collectors:
- uses: github://earthly/lunar-lib/collectors/pagerduty@v1.0.5
# with: ...
# Step 2: Enable the On-Call Guardrails
policies:
- uses: github://earthly/lunar-lib/policies/oncall@v1.0.5
include: [min-participants]
# with: ...
What PagerDuty Collector Collects
This collector gathers the following data that the Min Participants guardrail evaluates.
oncall
Queries the PagerDuty REST API for the component's service. Discovers
the service ID from the component's pagerduty/service-id meta
annotation (typically set by a company-specific cataloger via
lunar catalog component --meta pagerduty/service-id <id>), or falls
back to the explicit service_id input for static org-wide cases.
Fetches service details, on-call schedule participants, and escalation
policy. Writes normalized data to .oncall.service, .oncall.schedule,
.oncall.escalation, and .oncall.summary. Stores the raw API response
under .oncall.native.pagerduty.
Example Data Flow
Here's an example of the data that PagerDuty Collector writes to the Component JSON, which Min Participants then evaluates.
{
"oncall": {
"source": {
"tool": "pagerduty",
"integration": "api"
},
"service": {
"id": "PXXXXXX",
"name": "Payment API",
"status": "active"
},
"schedule": {
"exists": true,
"participants": 4,
"rotation": "weekly"
},
"escalation": {
"exists": true,
"levels": 3,
"policy_name": "Payment API Escalation"
},
"summary": {
"has_oncall": true,
"has_escalation": true,
"min_participants": 4
},
"native": {
"pagerduty": { "...full PagerDuty API response..." }
}
}
}
Configuration Options
PagerDuty Collector Inputs
| Input | Required | Default | Description |
|---|---|---|---|
service_id |
Required | — | PagerDuty service ID to query (e.g. PXXXXXX). Optional if the component has a `pagerduty/service-id` meta annotation set by a cataloger. |
pagerduty_base_url |
Optional |
https://api.pagerduty.com
|
PagerDuty API base URL |
On-Call Guardrails Inputs
| Input | Required | Default | Description |
|---|---|---|---|
min_participants |
Optional |
2
|
Minimum number of on-call rotation participants required |
Ready to Automate Your Standards?
See how Lunar can turn your AGENTS.md, engineering wiki, compliance docs, or postmortem action items into automated guardrails with our 100+ built-in guardrails.