Getting Started
This guide shows how to download, set up, and run the Synthetic Exporter.
1. Download Pre-compiled Binaries (Linux & macOS)
We publish pre-compiled binaries for Linux and macOS on every release.
Download the latest binary from the GitHub Releases page.
Make it executable and run it:
chmod +x synthetic-exporter-linux-amd64
./synthetic-exporter-linux-amd64 -config config.yaml(Note: Playwright will download the Chromium browser automatically on the first run).
2. Docker (Cross-Platform)
The repository includes a multi-stage Dockerfile. It uses dumb-init to clean up Chrome processes. Docker is the easiest way to run the exporter.
Build and Run
docker build -t synthetic-exporter:latest .Run the container with your environment variables. Mount your local config.yaml to /app/config.yaml:
docker run --rm -p 10050:10050 \
-e APP_USERNAME="my_test_user" \
-e APP_PASSWORD="my_secret_password" \
-v $(pwd)/config.yaml:/app/config.yaml:ro \
synthetic-exporter:latestDocker Compose
You can also run the exporter using docker-compose. Create a docker-compose.yml file:
version: '3.8'
services:
synthetic-exporter:
image: synthetic-exporter:latest
ports:
- "10050:10050"
environment:
- APP_USERNAME=my_test_user
- APP_PASSWORD=my_secret_password
volumes:
- ./config.yaml:/app/config.yaml:ro
restart: unless-stoppedThen run:
docker-compose up -d3. Running from Source (Windows / Dev)
If you use Windows or want to run the code locally, you can compile and run the exporter from source. It will download the headless Chromium browser automatically when it starts.
Prerequisites:
- Install Go 1.22+ from golang.org.
- Git.
Setup Steps
Clone the repository:
bashgit clone https://github.com/aizik-fridman/synthetic-exporter.git cd synthetic-exporterSet Environment Variables:
bash# Linux / macOS export APP_USERNAME="my_test_user" # Windows (PowerShell) $env:APP_USERNAME="my_test_user"Run the Exporter: Download the Go dependencies and start the exporter:
bashgo mod download go run main.go -config config.yaml -listen-address :10050
Once running, you can see the metrics at: http://localhost:10050/metrics.
CLI Flags
You can change the exporter's behavior using these CLI flags:
| Flag | Default | Description |
|---|---|---|
-config | config.yaml | Path to the YAML configuration file. |
-listen-address | :10050 | Address to expose the /metrics HTTP endpoint. |
-check-interval | 60s | Time between background synthetic checks (e.g., 30s, 1m). |
