Skip to main content

Status Cake Exporter

status-cake-exporter

🚨 Container images have moved to ghcr.io/chelnak/status-cake-exporter

Status Cake Exporter is a Prometheus exporter for StatusCake.

Metrics are exposed on port 8000 when using the provided examples/manifest.yml](examples/manifest.yml) in Kubernetes, e.g.

http://status-cake-exporter.default.svc:8000

Requirements

  • Python 3.10+
  • Docker
  • Kubernetes (optional)
  • Helm 3 (optional)

Usage

Setting Required Default
HOST No https://api.statuscake.com/v1
API_KEY Yes Null
TAGS No Null
LOG_LEVEL No info
PORT No 8000
ITEMS_PER_PAGE No 25

Docker

The following will expose the exporter at localhost:8000:

export API_KEY=xxxxxxxx
docker run -d -p 8000:8000 --env API_KEY ghcr.io/chelnak/status-cake-exporter:latest

Kubernetes

To get up and running quickly, use examples/manifest.yml as an example. You will need to create a secret named status-cake-api-token containing your API_KEY first.

Otherwise, you can use the Helm Chart provided in chart/status-cake-exporter.

Grafana

To get up and running quickly, use examples/grafana-example.json as an example.

Terminal

Usage: status-cake-exporter [OPTIONS]

Options:
  --host TEXT            The host of the statuscake api.  [env var: HOST;
                         default: https://api.statuscake.com/v1]
  --api-key TEXT         API Key for the account.  [env var: API_KEY;
                         required]
  --tags TEXT            A comma separated list of tags used to filter tests
                         returned from the api  [env var: TAGS]
  --log-level TEXT       The log level of the application. Value can be one of
                         {debug, info, warn, error}  [env var: LOG_LEVEL;
                         default: info]
  --port INTEGER         [env var: PORT; default: 8000]
  --items-per-page TEXT  The number of items that the api will return on a
                         page. This is a global option.  [env var:
                         ITEMS_PER_PAGE; default: 25]
  --help                 Show this message and exit

Metrics

Name Type Description
status_cake_test_info Gauge A basic listing of the tests under the current account.
status_cake_test_uptime_percent Gauge Tests and their uptime percentage
status_cake_test_performance Gauge Tests and their performance percentage

Prometheus

Prometheus config needs to be updated to see the new exported. Use the following scrape config as an example:

scrape_configs:
    - job_name: status-cake-exporter
    honor_timestamps: true
    scrape_interval: 10m
    scrape_timeout: 1m
    metrics_path: /
    scheme: http
    static_configs:
    - targets:
        - status-cake-exporter.default.svc:8000

Grafana

Data collected by Prometheus can be easily surfaced in Grafana.

Using the Statusmap panel by flant you can create a basic status visualization based on uptime percentage:

grafana

PromQL

status_cake_test_info * on(test_id) group_right(test_name) status_cake_test_uptime_percent

Development

Tilt

This repository uses Tilt for rapid development on Kubernetes.

To use this, run:

cd chart/status-cake-exporter
tilt up

Tilt will reload your environment when it detects changes to your code.

Note: You will need to provide valid credentials for StatusCake in your Tiltfile for this to work.

Docker compose

You can use the provided docker-compose.yml to run the exporter locally.

docker-compose watch

This will start the exporter along with a mocked statuscake api server.

Metadata

Release files for status-cake-exporter 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for status-cake-exporter 1.1.0
File Size Uploaded Provenance Actions
status_cake_exporter-1.1.0.tar.gz 8.0 kB Without provenance Details for status_cake_exporter-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for status-cake-exporter 1.1.0
File Interpreter ABI Platform Actions
status_cake_exporter-1.1.0-py3-none-any.whl Python 3 none any Details for status_cake_exporter-1.1.0-py3-none-any.whl

Total release size: 17.8 kB

Release files / status_cake_exporter-1.1.0.tar.gz

Download URL status_cake_exporter-1.1.0.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c4a0fb2b2921db234f6ad5d14a913affe62a39622e59063c983ffad099095cbf
BLAKE2b-256 checksum
How to use checksums
c842747d17c7ef1ca240f50e30d98a981ffa064124f73c30d00628fd4547ea92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.10.11 Windows/10

Release files / status_cake_exporter-1.1.0-py3-none-any.whl

Download URL status_cake_exporter-1.1.0-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
65840c3f4b0c5a1d6506e87788321bdd933c399c94b20c40ab6e74e2a2cdf974
BLAKE2b-256 checksum
How to use checksums
77ff4f096f1e12da36327ee3ad8c64fae3693c7426ef9c5aaa06457f11e6827f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.10.11 Windows/10

Security for status-cake-exporter 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page