How to Integrate Prometheus Alertmanager with Pingzo
Prometheus is the core metrics collection engine for Kubernetes clusters and containerized applications. While Prometheus gathers rich performance data and Alertmanager evaluates alerting rules, delivering these notifications to the right chat platforms can be difficult. By connecting Prometheus Alertmanager to Pingzo, you can route container alerts to developer chat channels instantly.
This guide details how to configure Alertmanager to send alert payloads to Pingzo's webhook gateway.
Why Route Prometheus Alerts to Pingzo?
- Native WhatsApp Support: Deliver server, memory, and database alerts directly to developers' phones using official WhatsApp notifications.
- Intelligent Alert Grouping: Pingzo groups related Prometheus alerts to prevent notification storms when a Kubernetes node drops.
- Simple Setup: Bypasses complex Alertmanager configuration rules for chat integrations, utilizing Pingzo's managed webhook routes.
- Unified Monitoring Board: Centralize internal container alerts alongside external public status page monitoring checks.
Configuration Steps
Follow these steps to establish a connection between Prometheus Alertmanager and Pingzo:
Step 1: Generate a Custom Webhook in Pingzo
- Log in to your Pingzo Dashboard and open the Alert Channels page.
- Click Add Channel and choose Custom Webhook from the list.
- Assign the channel a name (e.g., "Prometheus Alertmanager Gateway").
- Copy the generated Webhook Endpoint URL.
- Click Save.
Step 2: Configure Prometheus Alertmanager config.yml
Update your Alertmanager configuration file to register Pingzo as a webhook receiver:
- Open your
alertmanager.ymlconfiguration file. - Under the
receiverssection, add a new webhook receiver:
Replace the URL with the Webhook Endpoint URL you copied in Step 1.receivers: - name: 'pingzo-webhook' webhook_configs: - url: 'https://api.pingzoapp.com/v1/webhooks/your-custom-webhook-id' send_resolved: true - Under the
routesection, map your alerts to this receiver:route: group_by: ['alertname', 'cluster', 'service'] group_wait: 30s group_interval: 5m repeat_interval: 4h receiver: 'pingzo-webhook' - Save the configuration file.
Step 3: Apply and Restart Alertmanager
Apply the updated configuration by reloading Alertmanager:
- If running in a Docker or Kubernetes environment, reload the config configmap or run an HTTP reload command:
curl -X POST http://localhost:9093/-/reload - If running Alertmanager as a systemd service, restart it:
sudo systemctl restart alertmanager
Verify Alert Delivery
To verify that Alertmanager is correctly forwarding alerts to Pingzo:
- Simulate a system alert using Prometheus Alertmanager's CLI tool (
amtool) or trigger a mock rule (like setting CPU load threshold low). - Check your connected Pingzo endpoints (such as WhatsApp, Discord, or Telegram) to verify that the alert arrives.
- Check that the incident details (such as alert name, description, and severity) are formatted cleanly.
- Confirm that Alertmanager dispatches a recovery payload when the trigger condition resolves, automatically clearing the incident.