https://github.com/samber/promql-exporter
Prometheus exporter for PromQL endpoints (replacing federation and remote-write)
https://github.com/samber/promql-exporter
exporter federation go grafana mimir monitoring prometheus promql query remote-write stats
Last synced: 10 months ago
JSON representation
Prometheus exporter for PromQL endpoints (replacing federation and remote-write)
- Host: GitHub
- URL: https://github.com/samber/promql-exporter
- Owner: samber
- License: mit
- Created: 2024-05-17T18:21:29.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-17T18:49:12.000Z (about 2 years ago)
- Last Synced: 2025-08-17T15:37:07.188Z (10 months ago)
- Topics: exporter, federation, go, grafana, mimir, monitoring, prometheus, promql, query, remote-write, stats
- Language: Go
- Homepage:
- Size: 12.7 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# PromQL Exporter
[](https://github.com/samber/promql-exporter/releases)

[](https://pkg.go.dev/github.com/samber/promql-exporter)

[](https://goreportcard.com/report/github.com/samber/promql-exporter)
[](https://codecov.io/gh/samber/promql-exporter)
[](https://github.com/samber/promql-exporter/graphs/contributors)
[](./LICENSE)
> 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.
## 🚀 Run
Using Docker:
```sh
docker run --rm -it -p 9517:9517 -e ENDPOINT=http://demo.robustperception.io:9090 samber/promql-exporter:v0.1.0
```
Or using a binary:
```sh
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'
```
## 💡 Usage
```sh
./promql_exporter
usage: promql_exporter --endpoint=http://demo.robustperception.io:9090 []
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.
```
## 🤝 Contributing
- Ping me on Twitter [@samuelberthe](https://twitter.com/samuelberthe) (DMs, mentions, whatever :))
- Fork the [project](https://github.com/samber/promql-exporter)
- Fix [open issues](https://github.com/samber/promql-exporter/issues) or request new features
Don't hesitate ;)
```bash
# Install some dev dependencies
make tools
# Run tests
make test
# or
make watch-test
```
## 👤 Contributors

## 💫 Show your support
Give a ⭐️ if this project helped you!
[](https://github.com/sponsors/samber)
## 📝 License
Copyright © 2024 [Samuel Berthe](https://github.com/samber).
This project is [MIT](./LICENSE) licensed.