Skip to content

Demo walkthrough

Scenario

The sample graph contains:

checkout-api -> orders.v1 -> fraud-service
                          -> fulfilment-service
fraud-service -> fraud-results.v1

The seeded telemetry shows:

  • consumer lag on fulfilment-prod above the critical threshold;
  • broker disk utilisation above the warning threshold;
  • one under-replicated partition;
  • order throughput on orders.v1.

Run

Start the server with the development login, because the generator writes metrics and writes need a session:

AUTH_DEV_LOGIN=true AUTH_ALLOWLIST=dev-user blackfox serve

In a second terminal:

python collectors/demo_generator.py --dev-login --count 20 --interval 2

Use the UI at http://localhost:7860 to:

  1. inspect the topology;
  2. select orders.v1;
  3. ask for its blast radius;
  4. run the sample SPARQL query;
  5. refresh and watch the anomaly values change.

The development login is for local use only. Do not enable it on a server that other people can reach.

Live Kafka discovery

The Kafka Admin collector reads cluster, broker and topic metadata and posts one observation per resource. It does not read consumer groups, lag or Kafka Connect yet.

pip install -e '.[kafka]'
python collectors/kafka_admin.py \
  --bootstrap-servers localhost:9092 \
  --blackfox-url http://localhost:7860 \
  --dev-login

Pass client security properties as JSON. Keep real credentials out of shell history, for example by reading the JSON from a protected file:

python collectors/kafka_admin.py \
  --bootstrap-servers broker.example:9093 \
  --config-json "$(cat kafka-client.json)" \
  --dev-login

where kafka-client.json holds the confluent-kafka properties such as security.protocol, sasl.mechanism, sasl.username and sasl.password.

The collector has not been run against a live cluster as part of the test suite. It signs in through the development login only. A deployment that uses GitHub sign-in has no collector credential yet.