Min Participants + OpsGenie Collector
Enforce Min Participants using data collected by OpsGenie Collector. Automatically check operational readiness standards on every PR.
How OpsGenie Collector Powers This Guardrail
The OpsGenie Collector gathers metadata from your incident management 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 OpsGenie Collector
collectors:
- uses: github://earthly/lunar-lib/collectors/opsgenie@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 OpsGenie Collector Collects
This collector gathers the following data that the Min Participants guardrail evaluates.
oncall
Queries the OpsGenie REST API for the component's team. Discovers the
team ID from the component's opsgenie/team-id meta annotation
(typically set by a company-specific cataloger via lunar catalog component --meta opsgenie/team-id <id>), or falls back to the
explicit team_id input for static org-wide cases. Fetches team
details, the team's first on-call schedule (with rotation
participants), and its escalation policy. Writes normalized data to
.oncall.service, .oncall.schedule, .oncall.escalation, and
.oncall.summary. Stores raw API responses under
.oncall.native.opsgenie.
Example Data Flow
Here's an example of the data that OpsGenie Collector writes to the Component JSON, which Min Participants then evaluates.
{
"oncall": {
"source": {
"tool": "opsgenie",
"integration": "api"
},
"service": {
"id": "4513b7ea-3b91-438f-b7e4-e3e54af9147c",
"name": "Payments Team",
"status": "active"
},
"schedule": {
"exists": true,
"participants": 4,
"rotation": "weekly"
},
"escalation": {
"exists": true,
"levels": 3,
"policy_name": "Payments Escalation"
},
"summary": {
"has_oncall": true,
"has_escalation": true,
"min_participants": 4
},
"native": {
"opsgenie": { "...full OpsGenie API response..." }
}
}
}
Configuration Options
OpsGenie Collector Inputs
| Input | Required | Default | Description |
|---|---|---|---|
team_id |
Required | — | OpsGenie team ID (UUID) to query. Optional if the component has an `opsgenie/team-id` meta annotation set by a cataloger. |
opsgenie_base_url |
Optional |
https://api.opsgenie.com
|
OpsGenie API base URL. Use `https://api.eu.opsgenie.com` for the EU instance. |
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 200+ built-in guardrails.