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: 2 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 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-17T18:49:12.000Z (about 1 year ago)
- Last Synced: 2025-03-15T22:43:35.446Z (2 months ago)
- Topics: exporter, federation, go, grafana, mimir, monitoring, prometheus, promql, query, remote-write, stats
- Language: Go
- Homepage:
- Size: 12.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- 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 featuresDon'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.