Hamburger Cross Icon
Min Participants
+
PagerDuty Collector

Min Participants + PagerDuty Collector

Guardrail Collector Beta Operational Readiness

Enforce Min Participants using data collected by PagerDuty Collector. Automatically check operational readiness standards on every PR.

Guardrail: Ensures the on-call rotation has at least a minimum number of participants to avoid single-person burnout. Checks .oncall.schedule.participants against the configurable min_participants threshold (default: 2).
Data Source: Query the PagerDuty API to collect on-call schedule, escalation policy, and current responder data. Normalizes results into the .oncall category for tool-agnostic policy evaluation.

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.

1
PagerDuty Collector Gathers Data Collector
Extracts metadata from code, configs, and tool outputs
2
{ } Component JSON
Data centralized in structured format for evaluation
3
Min Participants Checks Guardrail
Pass/fail result with actionable feedback in PRs

Quick Start Configuration

Add both the collector and policy to your lunar-config.yml to enable this guardrail.

📄 lunar-config.yml
# 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.

Collector cron

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.

{ } component.json From PagerDuty Collector
{
  "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.

Works with any process
check AI agent rules & prompt files
check Post-mortem action items
check Security & compliance policies
check Testing & quality requirements
Automate Now
Paste your AGENTS.md or manual process doc and get guardrails in minutes
Book a Demo