Status Cake Exporter is a Prometheus expoter for StatusCake.
Metrics are exposed on port 8080. E.g.
http://status-cake-exporter.default.svc:8080
Setting | Required | Default |
---|---|---|
USERNAME | Yes | Null |
API_KEY | Yes | Null |
TAGS | No | Null |
LOG_LEVEL | No | info |
export USERNAME=statuscakeuser
export API_KEY=xxxxxxxx
docker run --env USERNAME --env API_KEY chelnak/status-cake-exporter:latest
To get up and running quickly, use examples/manifest.yml as an example.
usage: app.py [-h] [--username USERNAME] [--api-key API_KEY]
[--tests.tags TAGS] [--logging.level {debug,info,warn,error}]
If an arg is specified in more than one place, then commandline values
override environment variables which override defaults.
optional arguments:
-h, --help show this help message and exit
--username USERNAME Username for the account [env var: USERNAME]
--api-key API_KEY API key for the account [env var: API_KEY]
--tests.tags TAGS A comma separated list of tags used to filter tests returned from the api [env var: TAGS]
--logging.level {debug,info,warn,error} Set a log level for the application [env var: LOG_LEVEL]
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 config needs to be updated in order 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
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:
status_cake_test_info * on(test_id) group_right(test_name) status_cake_test_uptime_percent