Monitor number of elements inside Zeebe DB
- Node
- RocksDB/Levelup
- Prometheus
- Copy the
.env.sample
file to.env
and set the correct path to your Zeebe data - Choose one of the following:
- build and start the apps stack within Docker:
docker-compose up --build zeebe-db-monitor
- start outside of Docker (easier to debug), on Debian, it will be:
sudo apt install liblz4-dev
-
npx npm@6 install node --loader ts-node/esm src/index.ts
- Go to
- 127.0.0.1:4000 for the grafana dashboards (Docker only)
- 127.0.0.1:9090 for the prometheus metric query (Docker only)
- 127.0.0.1:8080/metrics for the prometheus exporter inside the app, aka raw metrics
The tool use and need two folders:
- The RO folder: the folder where the app will find the zeebe database. It has to be ready-only, as we want 0 modifications on production files, we are only monitoring the DB files.
- by ex.: a mounted RO folder in kubernetes, the same folder as used by Zeebe to save the data but in RO mode
- use the env
ZEEBE_DATA_RO_PATH
to set it
To keep with inconsistency on disk access, the app never crash if the db is not available, but return empty values
- Read DB times
rate(zeebe_db_read_duration_seconds_sum[5m]) / rate(zeebe_db_read_duration_seconds_count[5m])
histogram_quantile(0.9, sum(rate(zeebe_db_read_duration_seconds_bucket[5m])) by (le))
Under Docker:
- Obtain a production dump
- Run something like
docker build -t zeebe-db-monitor .; \ docker run --rm --name zeebe-db-monitor -i -p 8080:8080 -e ZEEBE_DATA_RO_PATH=/zeebe -v $HOME/Dev/PhDassess/snapshots/raft-partition/partitions/1/snapshots/237354356-1490-242489550-242489551:/zeebe:ro -- zeebe-db-monitor
- Browse http://localhost:8080/
npm run build-and-deploy-on-openshift-test