Skip to main content

Atlassian StatusPage.io Prometheus Exporter

Docker Image Version (latest by date) Docker Pulls Docker Image Size (latest by date) PyPI Coverage

Polls StatusPage.io summary APIs and exposes health, incidents, maintenance, and components as Prometheus metrics (and optional Slack alerts on incident open/resolve).

Table of Contents

Features

  • Service + component status, incidents, scheduled maintenance
  • Per-check API latency; probe success flag
  • On-disk cache when the API fails (fewer flaky alerts)
  • Optional Slack webhook: one post per incident opened / resolved

Metrics

Metric Labels Meaning
statuspage_service_status service_name 1 operational, 0 incident/degraded
statuspage_response_time_seconds service_name Summary API request duration
statuspage_incident_info service_name, incident_id, incident_name, impact, shortlink, started_at, affected_components 1 while incident active
statuspage_maintenance_info service_name, maintenance_id, … 1 while maintenance is active or scheduled
statuspage_component_status service_name, component_name 1 operational component, 0 degraded/outage
statuspage_component_timestamp service_name, component_name Ms epoch; refreshed each successful poll
statuspage_probe_check service_name 1 if this run used a live response or cache fallback
statuspage_application_timestamp service_name Ms epoch; refreshed each successful poll

Caching

The exporter writes the last successful summary per service to disk. If a request fails, metrics can still be driven from that snapshot so Prometheus doesn’t clear and re-fire alerts on transient errors.

Gauges are updated every check so series stay “fresh” in Grafana. For incidents and maintenance, labels for an existing ID are kept aligned with the cached snapshot so the same time series continues; new IDs get labels from the API. Meaningful changes (status, incident/maintenance IDs, component status) trigger cache writes; response time is not cached.

If you run this container on Kubernetes (or any orchestrator that replaces pods/containers), mount /app/statuspage-exporter/cache to persistent storage (PVC/PV). Keeping cache files across restarts avoids re-notifying already-known active incidents as newly opened after redeploys.

Run with Docker

Use the image from Docker Hub: add services.json, mount it, then set env vars if you need non-defaults.

1. Create services.json

The image includes services.json.example as a template.

{
  "service_key": {
    "url": "https://status.example.com/api/v2/summary.json",
    "name": "Example Service"
  }
}
Field Description
url Summary endpoint, usually …/api/v2/summary.json
name service_name label in metrics

2. Run the container (minimum)

Mount services.json to the path below, or set SERVICES_JSON_PATH to match your mount. Metrics listen on 9001 unless you change METRICS_PORT.

docker run -d \
  --name statuspage-exporter \
  -p 9001:9001 \
  -v /path/to/your/services.json:/app/statuspage-exporter/services.json \
  mcarvin8/statuspage-prometheus-exporter:latest

3. Optional environment variables

Variable Default Purpose
RUN_MODE daemon daemon runs continuously on a schedule; once runs a single pass and exits (see One-Time Run Mode)
METRICS_PORT 9001 Metrics HTTP port (daemon mode only)
SERVICES_JSON_PATH /app/statuspage-exporter/services.json Path to config inside the container
CHECK_INTERVAL_MINUTES 20 Poll interval (daemon mode only)
METRICS_TEXTFILE_PATH metrics/statuspage.prom Output path for the Prometheus textfile (RUN_MODE=once only)
DEBUG off true → debug logs
CLEAR_CACHE off true → wipe cache on startup
SLACK_WEBHOOK_URL (unset) Slack webhook: one message per new / resolved incident

4. Example with common options

docker run -d \
  --name statuspage-exporter \
  -p 9001:9001 \
  -v /path/to/your/services.json:/app/statuspage-exporter/services.json \
  -e CHECK_INTERVAL_MINUTES=10 \
  -e DEBUG=true \
  -e SLACK_WEBHOOK_URL='https://hooks.slack.com/services/T000/B000/XXXX' \
  mcarvin8/statuspage-prometheus-exporter:latest

Run as a Python Package (pip)

Prefer running on bare metal/a VM instead of Docker? The exporter is also published to PyPI:

pip install statuspage-prometheus-exporter

Run it from a directory containing your services.json (the console script looks for ./services.json by default, same as the Docker image looks in its WORKDIR — set SERVICES_JSON_PATH to point elsewhere):

statuspage-prometheus-exporter

This runs the same always-on daemon as the Docker image, using the same environment variables (METRICS_PORT, CHECK_INTERVAL_MINUTES, DEBUG, CLEAR_CACHE, SLACK_WEBHOOK_URL, etc.). The cache directory (./cache) is also created relative to the directory you run it from.

If no services.json is found and SERVICES_JSON_PATH isn't set, it falls back to the bundled services.json.example (a demo service) and logs a warning — useful for a first smoke-test, not for real monitoring.

One-Time Run Mode (Cron)

If you'd rather trigger checks on your own schedule (e.g. host Cron, a Kubernetes CronJob) instead of running this as a long-lived daemon, set RUN_MODE=once. The exporter runs a single pass over all services, writes the results to a Prometheus textfile, then exits — no HTTP server is started, so METRICS_PORT and CHECK_INTERVAL_MINUTES don't apply.

The textfile is written in the Prometheus text exposition format, for pickup by node_exporter's --collector.textfile.directory (or any tool that scrapes .prom files). Works with either distribution:

# Docker
docker run --rm \
  -v /path/to/your/services.json:/app/statuspage-exporter/services.json \
  -v /path/to/textfile-collector:/app/statuspage-exporter/metrics \
  -e RUN_MODE=once \
  mcarvin8/statuspage-prometheus-exporter:latest

# pip install
cd /path/to/your/project  # contains services.json
RUN_MODE=once METRICS_TEXTFILE_PATH=/path/to/textfile-collector/statuspage.prom \
  statuspage-prometheus-exporter
Variable Default Purpose
RUN_MODE daemon Set to once for a single pass
METRICS_TEXTFILE_PATH metrics/statuspage.prom Where the .prom file is written inside the container; point it at your mounted textfile-collector directory

Mount the same cache directory as in the daemon example if you want cache-based fallback across runs. The container's HEALTHCHECK targets the metrics HTTP endpoint and doesn't apply in this mode — it's harmless since the process exits right after the run.

Example crontab entry

*/20 * * * * docker run --rm \
  -v /path/to/your/services.json:/app/statuspage-exporter/services.json \
  -v /path/to/textfile-collector:/app/statuspage-exporter/metrics \
  -e RUN_MODE=once \
  mcarvin8/statuspage-prometheus-exporter:latest

Kubernetes Example

If you run this in Kubernetes, keep two mounts:

  • /app/statuspage-exporter/cache on a PVC so incident cache survives pod restarts
  • /app/statuspage-exporter/services.json from a ConfigMap (or other config source)

Store SLACK_WEBHOOK_URL in a Secret, not inline YAML.

1. Deployment (trimmed)

apiVersion: apps/v1
kind: Deployment
metadata:
  name: statuspage-exporter
spec:
  replicas: 1
  selector:
    matchLabels:
      app: statuspage-exporter
  template:
    metadata:
      labels:
        app: statuspage-exporter
    spec:
      containers:
        - name: exporter
          image: mcarvin8/statuspage-prometheus-exporter:latest
          ports:
            - containerPort: 9001
              name: web
          env:
            - name: SLACK_WEBHOOK_URL
              valueFrom:
                secretKeyRef:
                  name: statuspage-exporter-secrets
                  key: slack_webhook_url
          volumeMounts:
            - name: cache
              mountPath: /app/statuspage-exporter/cache
            - name: config
              mountPath: /app/statuspage-exporter/services.json
              subPath: services.json
              readOnly: true
      volumes:
        - name: cache
          persistentVolumeClaim:
            claimName: statuspage-exporter-cache
        - name: config
          configMap:
            name: statuspage-exporter-config

2. PersistentVolumeClaim (trimmed)

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: statuspage-exporter-cache
spec:
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 100Mi

3. ConfigMap for services.json (trimmed)

apiVersion: v1
kind: ConfigMap
metadata:
  name: statuspage-exporter-config
data:
  services.json: |
    {
      "conga": {
        "url": "https://status.conga.com/api/v2/summary.json",
        "name": "Conga"
      },
      "gong": {
        "url": "https://status.gong.io/api/v2/summary.json",
        "name": "Gong"
      }
    }

Tip: keep CLEAR_CACHE unset (default) in normal production operation so cache continuity prevents duplicate "incident opened" notifications after redeploys.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

statuspage_prometheus_exporter-2.5.0.tar.gz (27.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

statuspage_prometheus_exporter-2.5.0-py3-none-any.whl (27.3 kB view details)

Uploaded Python 3

File details

Details for the file statuspage_prometheus_exporter-2.5.0.tar.gz.

File metadata

File hashes

Hashes for statuspage_prometheus_exporter-2.5.0.tar.gz
Algorithm Hash digest
SHA256 beba59b2f1fb176d5071fcfcff691d588cc958abaf0521a4e375f3bf8f30ad52
MD5 7556a5085628acad0103cb2e9d30f4b0
BLAKE2b-256 7e7210a9ede094bb46486c4456e73869b4640e275ec82219818d8f6398cb3106

See more details on using hashes here.

Provenance

The following attestation bundles were made for statuspage_prometheus_exporter-2.5.0.tar.gz:

Publisher: release-please.yml on mcarvin8/statuspage-prometheus-exporter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file statuspage_prometheus_exporter-2.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for statuspage_prometheus_exporter-2.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4755f230d68ec3818e1ba5ac2e639a20aa4c59151a08675a6acb8650038cd97b
MD5 3b3c6587f2a7fbed52d397570e68bb82
BLAKE2b-256 bb528e17f3c2ebf51de76def7bfc51c9002b50ff7b05422b706fccfa51296aa7

See more details on using hashes here.

Provenance

The following attestation bundles were made for statuspage_prometheus_exporter-2.5.0-py3-none-any.whl:

Publisher: release-please.yml on mcarvin8/statuspage-prometheus-exporter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page