No project description provided
Project description
Status Cake Exporter
:rotating_light: 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 |
---|---|---|
API_KEY | Yes | Null |
TAGS | No | Null |
LOG_LEVEL | No | info |
PORT | No | 8000 |
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:
--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 |
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:
PromQL
status_cake_test_info * on(test_id) group_right(test_name) status_cake_test_uptime_percent
Development
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file status_cake_exporter-1.0.0.tar.gz
.
File metadata
- Download URL: status_cake_exporter-1.0.0.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.10.8 Linux/5.15.0-1023-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0998757729618df6ee068cf7a14e83b500dbed86ced7fb517a2409beda43bb15 |
|
MD5 | d00d4c820054203f973db5debe878163 |
|
BLAKE2b-256 | 6f3d49a20225f321f8f2edd3ff3ffc57dc371436205104c2c094c7b370ea3619 |
File details
Details for the file status_cake_exporter-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: status_cake_exporter-1.0.0-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.10.8 Linux/5.15.0-1023-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa34393b3684ceae3a03bab1bb17c9eb60b0fbde80b91d81be34e29936c028ed |
|
MD5 | d87edd4275265cbef0c4b9fb986a8b82 |
|
BLAKE2b-256 | fc37557ea6788e64bcd71681c28020e96c875848850dd8812b1a129255e5aed1 |