Nova Uptime
Guideswebhooksautomationintegrations

Webhooks und Integrationen für Uptime-Monitoring: Eigene Workflows bauen

Verbinde Uptime-Monitoring per Webhooks mit deinen Systemen. Kompletter Guide zu Incident-Automatisierung, Custom-Benachrichtigungen und Workflow-Integration.

SN
Sumit Nova Uptime
27. Februar 2026 · 9 min read
Share:

Warum Webhooks fürs Monitoring entscheidend sind#

E-Mail-Alerts erreichen dich irgendwann. Slack-Alerts tauchen in einem Channel auf. Aber Webhooks lassen dich tatsächlich Dinge tun, wenn Incidents passieren.

Ohne Webhooks:

  • Alert wird ausgelöst → Du erstellst manuell ein Jira-Ticket → Du aktualisierst manuell die Status-Page → Du benachrichtigst manuell den On-Call-Engineer
  • Reaktionszeit: 5–10 Minuten

Mit Webhooks:

  • Alert wird ausgelöst → Webhook feuert → Erstellt automatisch ein Jira-Ticket → Aktualisiert die Status-Page → Benachrichtigt den On-Call-Engineer
  • Reaktionszeit: 10 Sekunden

Bei kritischer Infrastruktur verhindern diese 5 Minuten Unterschied Auswirkungen auf deine Kunden.

So funktionieren Webhooks#

Wenn deine Site ausfällt und das Monitoring es erkennt:

1. Nova Uptime monitoring service detects failure
2. Nova Uptime calls your webhook URL with incident data
3. Your server receives HTTP POST with:
   - Domain
   - Status
   - Time detected
   - Response time
   - Previous check result
4. Your system decides what to do
   - Create Jira ticket?
   - Page on-call?
   - Update status page?
   - Post to Slack?
5. Actions execute automatically

Webhooks einrichten#

Schritt 1: Einen Webhook-Receiver bauen#

Dein Webhook-Receiver ist ein einfacher HTTP-Endpunkt, der Incident-Daten empfängt.

Beispiel: Express.js Webhook-Receiver

const express = require('express');
const app = express();

app.use(express.json());

app.post('/webhooks/uptime-incident', async (req, res) => {
  const { domain, status, detectedAt, responseTime } = req.body;

  console.log(`Incident detected: ${domain} is ${status}`);

  // Handle the incident
  await handleIncident({
    domain,
    status,
    detectedAt,
    responseTime
  });

  // Respond with 200 OK to acknowledge receipt
  res.json({ success: true });
});

app.listen(3000, () => {
  console.log('Webhook receiver listening on port 3000');
});

Schritt 2: Webhook in Nova Uptime konfigurieren#

  1. Logge dich auf go.novauptime.com ein
  2. Domain-Einstellungen → Webhooks
  3. Klicke auf "Webhook hinzufügen"
  4. Trage deine Endpoint-URL ein: https://yourdomain.com/webhooks/uptime-incident
  5. Wähle die auslösenden Events:
    • ✅ Site down
    • ✅ Site recovered
    • ✅ Response-Time-Warnung
  6. Speichern

Schritt 3: Den Webhook testen#

Die meisten Tools haben einen "Webhook testen"-Button:

  1. Klicke in den Webhook-Einstellungen auf "Testen"
  2. Dein Endpoint empfängt Testdaten
  3. Prüfe, ob dein System mit 200 OK antwortet

Webhook-Patterns aus der Praxis#

Pattern 1: Incident-Tickets automatisch erstellen#

Wenn die Site ausfällt, automatisch ein Jira-Ticket anlegen.

async function handleIncident({ domain, status, detectedAt }) {
  if (status === 'down') {
    // Create Jira ticket
    const ticket = await createJiraTicket({
      project: 'OPS',
      issueType: 'Incident',
      summary: `Production Incident: ${domain} is down`,
      description: `
        Domain: ${domain}
        Detected: ${detectedAt}
        Status: DOWN

        Actions:
        1. Check server status
        2. Review recent deployments
        3. Check error logs
      `,
      priority: 'Critical',
      labels: ['incident', 'production']
    });

    console.log(`Created ticket: ${ticket.key}`);
  }
}

Pattern 2: Status-Page aktualisieren#

Wenn ein Incident eintritt, automatisch deine öffentliche Status-Page aktualisieren.

async function handleIncident({ domain, status, detectedAt }) {
  if (status === 'down') {
    // Create incident on status page
    await createStatusPageIncident({
      name: `${domain} is Down`,
      status: 'investigating',
      body: `We're investigating an issue with ${domain}. More info coming soon.`,
      affectedComponents: [domain]
    });
  } else if (status === 'up') {
    // Resolve incident on status page
    await updateStatusPageIncident({
      status: 'resolved',
      body: `${domain} is now back online. We apologize for the inconvenience.`
    });
  }
}

Pattern 3: On-Call-Engineer benachrichtigen#

Bei kritischen Incidents sofort eine SMS an die Person im Bereitschaftsdienst senden.

async function handleIncident({ domain, status, detectedAt }) {
  if (status === 'down') {
    // Get current on-call engineer from PagerDuty
    const oncall = await getOnCallEngineer();

    // Send SMS
    await sendSMS({
      to: oncall.phone,
      message: `CRITICAL: ${domain} is down. Incident ticket: JIRA-123`
    });

    // Also post to #incidents Slack channel
    await postToSlack({
      channel: '#incidents',
      text: `@${oncall.slackHandle}: ${domain} is down. See JIRA-123`
    });
  }
}

Pattern 4: Incident-Historie speichern#

Alle Incidents für Analytics in deiner Datenbank protokollieren.

async function handleIncident({ domain, status, detectedAt, responseTime }) {
  // Store in database
  const incident = await Incident.create({
    domain,
    status,
    detectedAt,
    responseTime,
    createdAt: new Date(),
    handledAt: new Date(),
    ticketCreated: false,
    statusPageUpdated: false
  });

  console.log(`Stored incident: ${incident._id}`);

  // Later: calculate MTTR, uptime %, etc.
  await updateIncidentMetrics(domain);
}

Pattern 5: Multi-Service-Orchestrierung#

Wenn ein Service ausfällt, Aktionen über mehrere Plattformen hinweg auslösen.

async function handleIncident({ domain, status, detectedAt }) {
  if (status === 'down') {
    // Parallel actions: Don't wait for each to finish
    await Promise.all([
      createJiraTicket({ domain, status }),
      createStatusPageIncident({ domain }),
      pageOnCallEngineer({ domain }),
      postSlackAlert({ domain }),
      storeIncidentHistory({ domain, detectedAt }),
      triggerPostmortemWorkflow({ domain })
    ]);
  }
}

Fortgeschrittene Patterns#

Pattern 6: Bedingte Logik nach Schweregrad#

Unterschiedliche Aktionen je nach Severity-Level.

async function handleIncident({ domain, status, severity }) {
  if (severity === 'critical') {
    // Critical: Page everyone
    await pageOnCall({ priority: 'high' });
    await updateStatusPage({ status: 'major_outage' });
    await createJiraTicket({ priority: 'Critical' });
  } else if (severity === 'warning') {
    // Warning: Slack + Jira, no SMS
    await postSlackAlert({ channel: '#alerts' });
    await createJiraTicket({ priority: 'Medium' });
  } else if (severity === 'info') {
    // Info: Log only, no alert
    await storeIncidentHistory({ domain });
  }
}

Pattern 7: Deduplizierung#

Doppelte Tickets/Alerts verhindern, wenn dieselbe Domain mehrfach ausfällt.

async function handleIncident({ domain, status }) {
  if (status === 'down') {
    // Check if active incident already exists
    const activeIncident = await Incident.findOne({
      domain,
      status: 'active',
      createdAfter: new Date(Date.now() - 15 * 60 * 1000) // Last 15 mins
    });

    if (activeIncident) {
      // Incident already reported, just update
      activeIncident.lastSeen = new Date();
      await activeIncident.save();
      console.log(`Updated existing incident: ${activeIncident._id}`);
    } else {
      // New incident, create everything
      await createJiraTicket({ domain });
      await pageOnCall({ domain });
      // ... etc
    }
  }
}

Pattern 8: Fehlgeschlagene Webhooks erneut versuchen#

Wenn dein Webhook-Receiver ausfällt, sollte Nova Uptime den Versand wiederholen.

Nova-Uptime-Konfiguration:

  1. Domain-Einstellungen → Webhooks
  2. Webhook anklicken
  3. Erweiterte Einstellungen → Retry Policy
  4. Aktivieren: "Retry on failure"
  5. Maximale Wiederholungen: 3
  6. Retry-Verzögerung: Exponentiell (5s, 10s, 20s)

Dein Webhook-Receiver sollte idempotent sein (mehrfacher Aufruf darf gefahrlos möglich sein):

// Good: Idempotent
async function handleIncident({ domain, status, eventId }) {
  // Check if already processed
  const processed = await ProcessedEvents.findOne({ eventId });
  if (processed) {
    return res.json({ success: true, cached: true });
  }

  // Process incident
  await doActualWork();

  // Record as processed
  await ProcessedEvents.create({ eventId, processedAt: new Date() });

  res.json({ success: true });
}

Beispiele für Webhook-Integrationen#

Integration 1: Zapier#

Wenn du keine eigenen Webhooks bauen willst, nutze Zapier:

  1. Nova Uptime → Zapier → Slack/Jira/E-Mail/etc.
  2. Kein Code nötig
  3. Einschränkungen: weniger Kontrolle, zusätzliche Latenz

Integration 2: GitHub Actions#

Bei einem Incident eine GitHub Action auslösen (z. B. Auto-Scaling, Rollback):

async function handleIncident({ domain, status }) {
  if (status === 'down') {
    // Trigger GitHub Actions workflow
    await triggerGitHubAction({
      repo: 'mycompany/infrastructure',
      workflow: 'incident-response.yml',
      inputs: {
        domain,
        action: 'scale-up'
      }
    });
  }
}

Integration 3: AWS Lambda#

Lambda für serverlose Webhook-Verarbeitung verwenden:

# AWS Lambda function
import json
import boto3

def lambda_handler(event, context):
    body = json.loads(event['body'])
    domain = body['domain']
    status = body['status']

    if status == 'down':
        # Auto-scale on AWS
        ec2 = boto3.client('ec2')
        ec2.start_instances(InstanceIds=['i-1234567890abcdef0'])

    return {
        'statusCode': 200,
        'body': json.dumps({'success': True})
    }

Webhook-Sicherheit#

Webhook-Signatur verifizieren#

Nova Uptime signiert jeden Webhook mit HMAC-SHA256. Verifiziere die Signatur, bevor du den Request verarbeitest:

const crypto = require('crypto');

app.post('/webhooks/uptime-incident', (req, res) => {
  const signature = req.headers['x-gum-signature'];
  const body = JSON.stringify(req.body);
  const secret = process.env.NOVAUPTIME_WEBHOOK_SECRET;

  // Compute expected signature
  const expected = crypto
    .createHmac('sha256', secret)
    .update(body)
    .digest('hex');

  if (signature !== expected) {
    console.error('Invalid webhook signature');
    return res.status(401).json({ error: 'Unauthorized' });
  }

  // Process webhook
  handleIncident(req.body);
  res.json({ success: true });
});

Rate Limiting#

Dein Webhook-Receiver sollte eingehende Requests rate-limiten:

const rateLimit = require('express-rate-limit');

const limiter = rateLimit({
  windowMs: 60 * 1000, // 1 minute
  max: 100 // max 100 requests per minute
});

app.post('/webhooks/uptime-incident', limiter, (req, res) => {
  // Handle webhook
});

Timeout-Handling#

Der Webhook-Receiver sollte schnell antworten:

app.post('/webhooks/uptime-incident', async (req, res) => {
  // Respond immediately
  res.json({ success: true });

  // Do real work in background
  setTimeout(async () => {
    await handleIncident(req.body);
  }, 0);
});

Webhooks testen#

Test-Methode 1: Lokal testen mit ngrok#

  1. Starte den lokalen Webhook-Receiver auf localhost:3000
  2. Starte ngrok: ngrok http 3000
  3. Hol dir die öffentliche URL: https://abc123.ngrok.io
  4. In Nova Uptime konfigurieren: https://abc123.ngrok.io/webhooks/uptime-incident
  5. In Nova Uptime auf "Testen" klicken → Du siehst den Request in deiner lokalen Konsole

Test-Methode 2: Webhook-Tester#

Nutze webhook.site für kostenloses Testen:

  1. Gehe auf webhook.site
  2. Kopiere deine eindeutige URL
  3. Trage sie in Nova Uptime als Webhook-Receiver ein
  4. Testen → Request erscheint im webhook.site-Dashboard

Webhooks überwachen#

Tracke die Gesundheit deiner Webhooks:

async function monitorWebhookHealth() {
  const stats = await WebhookEvent.aggregate([
    {
      $group: {
        _id: null,
        totalEvents: { $sum: 1 },
        successCount: { $sum: { $cond: ['$success', 1, 0] } },
        failureCount: { $sum: { $cond: ['$success', 0, 1] } },
        avgResponseTime: { $avg: '$responseTime' }
      }
    }
  ]);

  const successRate = stats[0].successCount / stats[0].totalEvents;

  if (successRate < 0.95) {
    // Alert: Webhook success rate below 95%
    await alertSlack(`
      Webhook health: ${(successRate * 100).toFixed(1)}% success rate
      Failed events: ${stats[0].failureCount}
    `);
  }
}

Zusammenfassung: Checkliste für Webhook-Integration#

  • ✅ Webhook-Receiver-Endpoint bauen
  • ✅ Webhook in den Nova-Uptime-Einstellungen konfigurieren
  • ✅ Webhook mit Beispieldaten testen
  • ✅ Webhook-Signatur verifizieren (HMAC-SHA256)
  • ✅ Retry-Logik und Idempotenz implementieren
  • ✅ Rate Limiting für den Webhook-Endpoint einrichten
  • ✅ Timeout-Handling für Antworten umsetzen
  • ✅ Incident-Workflow aufbauen (Jira + Status-Page + Slack)
  • ✅ Mit echtem Incident oder erzwungenem Failure testen
  • ✅ Webhook-Health und Erfolgsquote überwachen
  • ✅ Webhook-Endpoints fürs Team dokumentieren

Heute loslegen#

Webhooks verwandeln Monitoring von reinen Alerts in eine vollständig automatisierte Incident-Response.

Wenn du Nova Uptime nutzt, gehe in die Domain-Einstellungen und füge deinen ersten Webhook hinzu. Fang einfach an: Logge Incidents zunächst nur in deine Datenbank. Ergänze dann nach und nach weitere Integrationen.

Webhook-Dokumentation: Nova Uptime API-Dokumentation

Monitor Your Website Before It Goes Down

Get uptime monitoring, SSL tracking, domain expiry alerts, and email health checks. Free plan — no credit card required.

Start Monitoring Free

Verwandte Artikel