Welcome to Prometheus exporter acceptance tests! 🚀
Runs a job that checks that all metrics provided in the options are present in the Prometheus metrics gathered from the provided exporter url. It returns true if and only if all the metrics are present.
Once finished checking, it creates prometheus_exporter_acceptance_test_result metric in the configured pushgateway, being 0 success or 1 failure.
See openshift templates.
An example of usage:
export METRICS_URL=http://exporter.url:9102/metrics
export METRICS_NAMES='["http_request_duration_seconds_bucket"]'
export EXPORTER_NAME=test-exporter
export PUSHGATEWAY_USERNAME="a_username"
export PUSHGATEWAY_PASSWORD="a_password"
export PUSHGATEWAY_URL="https://pushgateway.url"
prometheus-exporter-acceptance-testsCreate and maintain a development virtual environment via:
make dev-envActivate the virtual environment in the current shell via:
source .venv/bin/activateRun the tests suite via:
make testsThis project is licensed under the terms of the Apache 2.0 license.