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
Metadata
Release files for tcms-prometheus-exporter 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tcms_prometheus_exporter-0.1.0.tar.gz | 153.1 kB | Without provenance | Details for tcms_prometheus_exporter-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tcms_prometheus_exporter-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for tcms_prometheus_exporter-0.1.0-py3-none-any.whl |
Total release size: 162.6 kB
Release files / tcms_prometheus_exporter-0.1.0.tar.gz
| Download URL | tcms_prometheus_exporter-0.1.0.tar.gz |
|---|---|
| Size | 153.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ad68bc02910ea7202ae42cdc4ab0487074d0683a97f1bbdfc5a4c5cd65082770
|
|
BLAKE2b-256 checksum How to use checksums |
387e316b39e86ea0ab6a9d8b5c0828cdddb0ac91c98eb388db6694d7f16d4b79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / tcms_prometheus_exporter-0.1.0-py3-none-any.whl
| Download URL | tcms_prometheus_exporter-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2c320e9ac68f40343a94fea553624bb9ced6e4985c4928c15bfce16acfb92ca2
|
|
BLAKE2b-256 checksum How to use checksums |
fbb14c755ead28f3af7f57fb4d40fcd2c614918d380f9add9404a06ffa4f291e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Security for tcms-prometheus-exporter 0.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.