How to Connect PingBase to PagerDuty
PingBase detects downtime. PagerDuty manages on-call escalation. Together they cover the full incident response chain: detection → alert → escalate → notify the right person. Here's the setup.
PagerDuty doesn't do its own monitoring — it receives alerts from monitoring tools and routes them through on-call schedules, escalation policies, and notification rules. PingBase is the monitoring layer; PagerDuty is the escalation layer. The integration uses PingBase's webhook alert channel to send events to PagerDuty's Events API v2.
What you'll need
- A PingBase account (free tier works)
- A PagerDuty account with at least one service configured
- A PagerDuty Integration Key (from your service's integrations)
Step 1: Get your PagerDuty integration key
- In PagerDuty, go to Services → Service Directory and select the service you want alerts routed to (or create a new one)
- Click Integrations → Add an integration
- Select Events API v2 and click Add
- Copy the Integration Key — you'll need it in the next step
The Events API v2 endpoint is https://events.pagerduty.com/v2/enqueue. PagerDuty expects a JSON payload in a specific format, which is what the middleware script below produces.
Step 2: Deploy a webhook translator
PingBase sends a standard JSON webhook payload when a monitor goes down or recovers. PagerDuty expects its own Events API v2 format. You need a small translation layer between them.
The easiest approach: a Cloudflare Worker (free) or any serverless function that receives the PingBase webhook and re-sends it to PagerDuty in the right format.
# Cloudflare Worker — PingBase → PagerDuty translator
export default {
async fetch(request, env) {
if (request.method !== 'POST') {
return new Response('Method not allowed', { status: 405 });
}
const body = await request.json();
const { event, monitor } = body;
// Map PingBase events to PagerDuty event actions
const action = event === 'monitor.down' ? 'trigger'
: event === 'monitor.up' ? 'resolve'
: null;
if (!action) return new Response('Ignored', { status: 200 });
const pdPayload = {
routing_key: env.PD_INTEGRATION_KEY,
event_action: action,
dedup_key: monitor.id, // ensures down/up pair correctly
payload: {
summary: `${monitor.name} is ${action === 'trigger' ? 'DOWN' : 'UP'}`,
source: monitor.url,
severity: 'critical',
custom_details: {
monitor_id: monitor.id,
monitor_url: monitor.url,
group: monitor.group ?? null,
},
},
};
const res = await fetch('https://events.pagerduty.com/v2/enqueue', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(pdPayload),
});
return new Response(await res.text(), { status: res.status });
}
};
Deploy this Worker and set the PD_INTEGRATION_KEY environment variable to the integration key from Step 1. The Worker's URL will be something like https://pingbase-pd.yourworker.workers.dev.
Step 3: Add a webhook alert channel in PingBase
- In PingBase, go to Alert Channels → Add channel → Webhook
- Enter the URL of your translator Worker
- Click Test to send a test payload and confirm it reaches PagerDuty
- Save the channel
You can now add this webhook channel to individual monitors. When a monitor goes down, PingBase sends the webhook, the Worker translates it, and PagerDuty triggers an incident — routing through your on-call schedule and escalation policy.
Step 4: Configure PagerDuty escalation policy
In PagerDuty, your escalation policy determines who gets notified and when. For a typical small engineering team:
- Level 1: On-call engineer — notified immediately via phone push notification
- Level 2 (escalate after 15 min): Backup engineer or engineering lead
- Level 3 (escalate after 30 min): CTO / whole team
The dedup key in the Worker payload (monitor.id) ensures PagerDuty automatically resolves the incident when PingBase sends the recovery event — no manual resolution needed.
Which monitors to route to PagerDuty
Not every monitor needs PagerDuty escalation. Route to PagerDuty only the monitors where an incident at 3am requires someone to wake up and fix it immediately:
- Core API / app availability
- Payment / checkout flow
- Authentication endpoint
- Primary database health check
For lower-urgency monitors (marketing site, docs, SSL expiry), use Slack or email instead. PagerDuty escalation for a blog going down at 2am is alert fatigue, not incident response.
PingBase vs PagerDuty's native monitoring
PagerDuty offers its own synthetic monitoring product. For teams already on PagerDuty, the question is whether to use PagerDuty's monitoring or a dedicated tool like PingBase.
PagerDuty's monitoring starts at $17/monitor/month. PingBase Pro covers 10 monitors for $9/month total. For teams that need PagerDuty's escalation and on-call features but want cost-effective monitoring, the PingBase + PagerDuty webhook integration gives you both without paying PagerDuty's per-monitor pricing.
Monitor with PingBase, escalate with PagerDuty
PingBase's webhook alert channel connects to PagerDuty, OpsGenie, or any on-call system. Pro plan starts at $9/month for 10 monitors.
Start free →Related
Webhook Alerts: Connect PingBase to Anything
Full webhook alert channel reference — payload format and configuration.
Alert Fatigue: How to Set Up Smart Notifications
Which monitors warrant PagerDuty escalation and which don't.
PingBase Webhook Integration
Full webhook payload reference and setup guide.