Prometheus metrics exporter plugin for Kiwi TCMS
Project description
tcms-prometheus-exporter
A Kiwi TCMS plugin that exposes Prometheus-format metrics for scraping.
Installation
pip install -e /path/to/tcms-prometheus-exporter
Then add to INSTALLED_APPS (handled automatically via the kiwitcms.plugins entry point).
Restart Kiwi TCMS.
Metrics Endpoint
Once installed, the following URLs are available:
/tcms_prometheus_exporter/— Dashboard (requires login)/tcms_prometheus_exporter/metrics/— Prometheus scrape endpoint
Token Protection
By default, the /metrics/ endpoint is open (no authentication required so that Prometheus can scrape it).
To add token-based protection, set the PROMETHEUS_METRICS_TOKEN environment variable:
export PROMETHEUS_METRICS_TOKEN=my-secret-token
Then configure Prometheus to pass the token as a query parameter:
scrape_configs:
- job_name: 'kiwi-tcms'
params:
token: ['my-secret-token']
metrics_path: '/tcms_prometheus_exporter/metrics/'
static_configs:
- targets: ['your-kiwi-host:8000']
Exposed Metrics (23 total)
Test Cases (4)
| Metric | Labels | Description |
|---|---|---|
kiwi_test_cases_total |
product, status, priority, is_automated | Total test cases |
kiwi_test_cases_by_status |
status | Test cases by status |
kiwi_test_cases_by_priority |
priority | Test cases by priority |
kiwi_test_cases_automated_total |
automated | Test cases by automation status |
Test Plans (3)
| Metric | Labels | Description |
|---|---|---|
kiwi_test_plans_total |
product, type, is_active | Total test plans |
kiwi_test_plans_active_total |
— | Active test plans |
kiwi_test_plans_cases_count |
plan_id, plan_name, product | Cases per active plan |
Test Runs (4)
| Metric | Labels | Description |
|---|---|---|
kiwi_test_runs_total |
product, plan_name | Total test runs |
kiwi_test_runs_active_total |
— | Active (not stopped) test runs |
kiwi_test_runs_completion_percent |
run_id, run_summary, product | Completion % (recent 100 active) |
kiwi_test_runs_pass_rate_percent |
run_id, run_summary, product | Pass rate % (recent 100 active) |
Test Executions (3)
| Metric | Labels | Description |
|---|---|---|
kiwi_test_executions_total |
product, status | Total executions |
kiwi_test_executions_by_status |
status, weight_class | Executions by status with weight class |
kiwi_test_execution_pass_rate |
— | Overall pass rate % |
Products & Builds (2)
| Metric | Labels | Description |
|---|---|---|
kiwi_products_total |
— | Total products |
kiwi_builds_total |
product, is_active | Total builds |
Users & Activity (6)
| Metric | Labels | Description |
|---|---|---|
kiwi_users_total |
is_active, is_staff | Registered users by active/staff status |
kiwi_users_logged_in_total |
period | Users who logged in within period (7d, 30d, 90d, never) |
kiwi_user_test_cases_authored |
username | Test cases authored per user |
kiwi_user_test_plans_authored |
username | Test plans authored per user |
kiwi_user_test_runs_managed |
username | Test runs managed per user |
kiwi_user_test_executions_completed |
username | Test executions completed per user |
Instance Info (1)
| Metric | Labels | Description |
|---|---|---|
kiwi_instance_info |
version | Kiwi TCMS version |
License
MIT
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tcms_prometheus_exporter-0.1.0.tar.gz.
File metadata
- Download URL: tcms_prometheus_exporter-0.1.0.tar.gz
- Upload date:
- Size: 153.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad68bc02910ea7202ae42cdc4ab0487074d0683a97f1bbdfc5a4c5cd65082770
|
|
| MD5 |
de1fcf305c55870c63aefe5cc0fc6638
|
|
| BLAKE2b-256 |
387e316b39e86ea0ab6a9d8b5c0828cdddb0ac91c98eb388db6694d7f16d4b79
|
File details
Details for the file tcms_prometheus_exporter-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tcms_prometheus_exporter-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c320e9ac68f40343a94fea553624bb9ced6e4985c4928c15bfce16acfb92ca2
|
|
| MD5 |
6612c24f037e8ea681c06d5b6e59e36e
|
|
| BLAKE2b-256 |
fbb14c755ead28f3af7f57fb4d40fcd2c614918d380f9add9404a06ffa4f291e
|