Skip to content

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:

bash
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 ​

bash
docker build -t synthetic-exporter:latest .

Run the container with your environment variables. Mount your local config.yaml to /app/config.yaml:

bash
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:latest

Docker Compose ​

You can also run the exporter using docker-compose. Create a docker-compose.yml file:

yaml
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-stopped

Then run:

bash
docker-compose up -d

3. 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:

Setup Steps ​

  1. Clone the repository:

    bash
    git clone https://github.com/aizik-fridman/synthetic-exporter.git
    cd synthetic-exporter
  2. Set Environment Variables:

    bash
    # Linux / macOS
    export APP_USERNAME="my_test_user"
    
    # Windows (PowerShell)
    $env:APP_USERNAME="my_test_user"
  3. Run the Exporter: Download the Go dependencies and start the exporter:

    bash
    go 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:

FlagDefaultDescription
-configconfig.yamlPath to the YAML configuration file.
-listen-address:10050Address to expose the /metrics HTTP endpoint.
-check-interval60sTime between background synthetic checks (e.g., 30s, 1m).

Released under the MIT License.