Skip to content

Quick Start

make cli
export PFLEX1_PASSWORD='your-monitor-password'
./bin/pflex_exporter --config config.yaml

Then:

curl -s localhost:9445/metrics | grep '^pflex_up'
curl -s localhost:9445/health

You should see pflex_up{cluster="flex-cluster1"} 1 once the first collection cycle completes, and /health returns 200 OK.

One-shot mode

Run a single collection cycle and exit — handy for verifying connectivity and that the expected metrics are produced, without starting the server loop:

./bin/pflex_exporter --config config.yaml --once --debug

Useful flags:

  • --once — run a single collection cycle, log the result, and exit (connectivity check).
  • --debug — verbose logging, including per-collector failures. Combined with --once, it also prints every collected sample (sorted, exposition style) so you can diff a live cluster against the Metrics Reference.
  • --trace — log every gateway API response body (method, URL, status, payload). Headers are never logged and the login/token-refresh responses are skipped entirely, so auth tokens cannot leak. Use it when a metric you expect is absent: the exporter never guesses values, so an unexpected payload shape shows up as a missing sample — the trace shows what the cluster actually returned.

Validating against a real cluster:

./bin/pflex_exporter --config config.yaml --once --debug --trace > validate.log
grep -v '^{' validate.log | sort > samples.txt   # every collected sample (compare with docs/metrics.md)
grep -F 'API trace' validate.log > trace.log     # raw API payloads for anything missing or suspicious

(Log lines are JSON objects on stdout, while the sample dump is plain exposition lines, so the two are easy to separate.)

Local stack (Docker Compose)

Bring up the exporter alongside Prometheus, Grafana (dashboards auto-provisioned), and an OpenTelemetry Collector:

PFLEX1_PASSWORD='your-monitor-password' docker compose up --build

To run the published image instead of building locally, use the pull-based stack:

PFLEX1_PASSWORD='your-monitor-password' docker compose -f docker-compose.ghcr.yml up -d

See Docker deployment for both stacks, image tags, and Grafana details.

What to look at

  • Per-cluster health: pflex_up, pflex_last_scrape_timestamp_seconds, pflex_cluster_generation.
  • Capacity: pflex_cluster_capacity_in_use_in_kb vs pflex_cluster_max_capacity_in_kb.
  • Performance: pflex_cluster_iops{op="total"}, pflex_cluster_bandwidth_kb_per_second{op="total"}.

See the Metrics Reference for the full list and the Dashboards page for ready-made Grafana panels.