Keptn is a cloud-native lifecycle orchestration platform that automates delivery sequences, evaluates SLOs during deployments, and triggers auto-remediation when quality gates fail. But Keptn itself is a critical piece of your delivery pipeline — if the Keptn API, Bridge UI, or distributor components go down, your automated deployments stall silently and no one knows until a release misses its window.
In this tutorial you'll set up comprehensive uptime monitoring for your Keptn installation using Vigilmon — free tier, no credit card required.
Why Keptn needs external monitoring
Keptn orchestrates your pipeline, but who orchestrates Keptn? Without external monitoring, these failure modes go undetected:
- Keptn API server unavailable — delivery sequences can't be triggered; CI/CD integrations queue up indefinitely or fail with connection errors that look like pipeline bugs
- Bridge UI down — operators lose visibility into sequence execution history; SLO evaluation results are inaccessible
- Distributor pod crash — event routing between Keptn core and integrations (Prometheus, Dynatrace, Argo) breaks; sequences appear to start but never progress
- MongoDB backend failure — Keptn loses sequence state; in-flight sequences appear stuck at the current task with no error surfaced to the API
- SLO evaluation timeouts — the SLI provider (e.g., Prometheus integration) becomes unreachable; quality gates time out and either fail-open or fail-closed depending on your config, both incorrect
- Remediation trigger loop — a misconfigured remediation sequence loops without bound; only visible if you're monitoring event throughput
External monitoring catches component failures that Keptn's own UI can't surface when the UI is the thing that's down.
What you'll need
- A running Keptn installation (Kubernetes-based, version 0.17+)
- Keptn API endpoint accessible externally (or via VPN/bastion)
- A free Vigilmon account (sign up takes 30 seconds)
Step 1: Find your Keptn API and Bridge endpoints
# Get the Keptn API URL
kubectl get svc -n keptn keptn-api-gateway-nginx -o jsonpath='{.status.loadBalancer.ingress[0].ip}'
# Or via ingress
kubectl get ingress -n keptn
# Get the Keptn API token
kubectl get secret -n keptn keptn-api-token -o jsonpath='{.data.keptn-api-token}' | base64 -d
Verify the API is responding:
curl -H "x-token: <your-api-token>" https://<keptn-endpoint>/keptn/v1/metadata
# Returns: {"namespace":"keptn","keptnversion":"0.19.3","keptnlabel":"keptn",...}
Step 2: Add a health endpoint check for the Keptn API
Keptn exposes a /health route on its API gateway. Add this as your primary HTTP monitor.
In Vigilmon, navigate to Monitors → Add Monitor:
| Field | Value |
|-------|-------|
| Monitor type | HTTP |
| Name | Keptn API Gateway |
| URL | https://<keptn-endpoint>/keptn/health |
| HTTP method | GET |
| Expected status | 200 |
| Check interval | 1 minute |
| Regions | Select 3+ globally distributed regions |
For authenticated endpoints, use the metadata route with an auth header:
| Field | Value |
|-------|-------|
| Monitor type | HTTP |
| Name | Keptn API (authenticated) |
| URL | https://<keptn-endpoint>/keptn/v1/metadata |
| HTTP method | GET |
| Request header | x-token: <your-api-token> |
| Expected status | 200 |
| Response must contain | keptnversion |
Step 3: Monitor the Keptn Bridge UI
The Bridge is Keptn's web interface for visualizing sequence execution and SLO evaluations. Monitor it separately from the API — they can fail independently.
# Bridge URL is typically at the root or /bridge path
curl https://<keptn-endpoint>/bridge
Add a Vigilmon monitor:
| Field | Value |
|-------|-------|
| Monitor type | HTTP |
| Name | Keptn Bridge UI |
| URL | https://<keptn-endpoint>/bridge |
| HTTP method | GET |
| Expected status | 200 |
| Response must contain | Keptn |
| Check interval | 2 minutes |
Step 4: Expose distributor and integration health
Create a health aggregator that checks Keptn's internal component pods and exposes the result as an HTTP endpoint Vigilmon can poll:
# keptn-health-exporter/app.py
from flask import Flask, jsonify
import subprocess
import json
app = Flask(__name__)
KEPTN_COMPONENTS = [
'keptn-api-gateway-nginx',
'keptn-distributor',
'mongodb',
'statistics-service',
]
@app.route('/health/keptn')
def keptn_health():
issues = []
for component in KEPTN_COMPONENTS:
result = subprocess.run(
['kubectl', 'get', 'pods', '-n', 'keptn',
'-l', f'app.kubernetes.io/name={component}',
'-o', 'json'],
capture_output=True, text=True
)
if result.returncode != 0:
issues.append(f'{component}: kubectl error')
continue
pods = json.loads(result.stdout).get('items', [])
if not pods:
issues.append(f'{component}: no pods found')
continue
running = [p for p in pods
if p.get('status', {}).get('phase') == 'Running']
if not running:
issues.append(f'{component}: no running pods')
if issues:
return jsonify({'status': 'degraded', 'issues': issues}), 503
return jsonify({'status': 'ok', 'components': KEPTN_COMPONENTS})
if __name__ == '__main__':
app.run(host='0.0.0.0', port=9091)
Deploy this exporter in your cluster and expose it, then add a Vigilmon monitor:
| Field | Value |
|-------|-------|
| Monitor type | HTTP |
| Name | Keptn Component Health |
| URL | http://<exporter-ip>:9091/health/keptn |
| Expected status | 200 |
| Response must contain | "status":"ok" |
Step 5: Monitor delivery sequence health via Keptn API
Keptn's API lets you query for stuck or failed sequences. Build a small probe that alerts when sequences stall:
// sequence-health-probe/index.js
const axios = require('axios');
const express = require('express');
const app = express();
const KEPTN_URL = process.env.KEPTN_URL;
const KEPTN_TOKEN = process.env.KEPTN_TOKEN;
const STALE_THRESHOLD_MINUTES = 30;
app.get('/health/sequences', async (req, res) => {
try {
const { data } = await axios.get(
`${KEPTN_URL}/keptn/v1/sequence/<your-project>/control`,
{ headers: { 'x-token': KEPTN_TOKEN } }
);
const sequences = data.sequences || [];
const now = Date.now();
const stale = sequences.filter(seq => {
if (seq.state === 'started') {
const lastUpdated = new Date(seq.lastEventContext?.eventTimestamp).getTime();
const ageMinutes = (now - lastUpdated) / 60000;
return ageMinutes > STALE_THRESHOLD_MINUTES;
}
return false;
});
if (stale.length > 0) {
return res.status(503).json({
status: 'degraded',
stale_sequences: stale.length,
details: stale.map(s => ({ name: s.name, stage: s.stages?.[0]?.name })),
});
}
res.json({ status: 'ok', active_sequences: sequences.length });
} catch (err) {
res.status(503).json({ status: 'error', message: err.message });
}
});
app.listen(9092);
Add a Vigilmon monitor:
| Field | Value |
|-------|-------|
| Monitor type | HTTP |
| Name | Keptn Sequence Health |
| URL | http://<probe-ip>:9092/health/sequences |
| Expected status | 200 |
| Response must contain | "status":"ok" |
| Check interval | 2 minutes |
Step 6: Track SLO evaluation metrics
Keptn evaluates SLOs through SLI providers (Prometheus, Dynatrace, Datadog). If the SLI provider becomes unreachable, evaluations silently fail or return empty data. Monitor the SLI provider alongside Keptn:
# For Prometheus-based SLI provider
kubectl get svc -n keptn prometheus-service
# Check that the Prometheus integration pod is healthy
kubectl get pods -n keptn -l app=prometheus-service
Add a TCP monitor for Prometheus itself (if running in-cluster):
| Field | Value |
|-------|-------|
| Monitor type | TCP |
| Name | Keptn SLI Provider (Prometheus) |
| Host | <prometheus-external-ip> |
| Port | 9090 |
| Check interval | 1 minute |
Step 7: Monitor remediation trigger availability
Auto-remediation sequences need the remediation service to be reachable. Build a liveness check:
# Check remediation service
kubectl get pods -n keptn -l app=remediation-service
# The remediation service exposes a health port
kubectl port-forward -n keptn svc/remediation-service 8080:8080
curl http://localhost:8080/health
Expose it via a NodePort or LoadBalancer and add a Vigilmon HTTP monitor:
| Field | Value |
|-------|-------|
| Monitor type | HTTP |
| Name | Keptn Remediation Service |
| URL | http://<remediation-svc-ip>:8080/health |
| Expected status | 200 |
| Check interval | 1 minute |
Step 8: Configure alerts
Navigate to Alerts → Alert Channels in Vigilmon and set up your notification channels.
Recommended alert policy for Keptn monitors:
| Setting | Recommended value | |---------|-------------------| | Alert after | 2 consecutive failures | | Recovery alert | Enabled | | Alert channel | Your DevOps/platform on-call channel |
For the API and Bridge monitors, alert immediately on the first failure — if Keptn is down, your deployment pipeline is blind. For the component health and sequence probes, use 2 failures to absorb brief restart cycles.
Step 9: Create a Keptn status page
If multiple teams depend on Keptn for their delivery pipelines, a shared status page reduces alert noise:
- In Vigilmon, go to Status Pages → Create Status Page
- Group monitors as:
- Core Platform: API Gateway, Bridge UI
- Pipeline Health: Component Health, Sequence Health
- Integrations: SLI Provider (Prometheus), Remediation Service
- Share the URL with all teams using Keptn
What you're monitoring now
| Monitor | What it detects | |---------|-----------------| | Keptn API Gateway HTTP | API server down; CI/CD integrations can't trigger sequences | | Keptn Bridge UI HTTP | Operator dashboard unavailable | | Keptn Component Health | Distributor crash, MongoDB failure, pod OOM | | Sequence Health probe | Stuck or stalled delivery sequences | | SLI Provider TCP | Prometheus unreachable; SLO evaluations silently returning empty data | | Remediation Service HTTP | Auto-remediation triggers would silently fail |
Conclusion
Keptn is the automation layer that makes your delivery pipeline reliable — but only if Keptn itself is reliable. External uptime monitoring from Vigilmon gives you an independent view of Keptn's API, Bridge UI, distributor health, and integration connectivity, catching failures that Keptn's own dashboards can't show you when they're the thing that's broken.
Sign up for a free Vigilmon account and protect your delivery pipeline today.