A Prometheus Exporter for PromQL-compatible endpoints
Some cloud providers do not offer federation endpoint or remote write. This exporter aims to export metrics using the /query API endpoint.
Using Docker:
docker run --rm -it -p 9517:9517 -e ENDPOINT=http://demo.robustperception.io:9090 samber/promql-exporter:v0.1.0
Or using a binary:
wget -O promql_exporter https://github.com/samber/promql-exporter/releases/download/v0.1.0/promql_exporter_0.1.0_linux_amd64
chmod +x promql_exporter
./promql_exporter --endpoint xxxx --header 'x-token: yyyy' --header 'x-token: zzzz'
./promql_exporter
usage: promql_exporter --endpoint=http://demo.robustperception.io:9090 [<flags>]
Flags:
-h, --help Show context-sensitive help (also try --help-long and --help-man).
--endpoint PromQL http endpoint ($ENDPOINT)
--header PromQL http header ($HEADER)
--namespace="promql" Namespace for metrics ($PROMQL_EXPORTER_NAMESPACE)
--web.listen-address=":9517" Address to listen on for web interface and telemetry. ($PROMQL_EXPORTER_WEB_LISTEN_ADDRESS)
--web.telemetry-path="/metrics" Path under which to expose metrics. ($PROMQL_EXPORTER_WEB_TELEMETRY_PATH)
--log.format="txt" Log format, valid options are txt and json ($PROMQL_EXPORTER_LOG_FORMAT)
--version Show application version.
- Ping me on Twitter @samuelberthe (DMs, mentions, whatever :))
- Fork the project
- Fix open issues or request new features
Don't hesitate ;)
# Install some dev dependencies
make tools
# Run tests
make test
# or
make watch-test
Give a ⭐️ if this project helped you!
Copyright © 2024 Samuel Berthe.
This project is MIT licensed.