Donkie / Spoolman

Keep track of your inventory of 3D-printer filament spools.
MIT License
757 stars 77 forks source link

Metrics endpoint is not working, showing the main page #363

Closed hakan42 closed 2 months ago

hakan42 commented 2 months ago

Describe the bug Having set SPOOLMAN_METRICS_ENABLED to TRUE, the metrics endpoint is still not available

To Reproduce Steps to reproduce the behavior:

  1. Start docker container with --env SPOOLMAN_METRICS_ENABLED=TRUE
  2. Run "curl http://my-server:7912/metrics"
  3. Observe that the main page of the application is being shown: ""

Expected behavior A parseable metrics output should be shown

Linux Server

Running the container as:

docker run \
   --rm \
   --name ${DOCKER_NAME} \
   --hostname ${DOCKER_NAME} \
   --publish 7912:8000 \
   --env PUID=$(id -u) \
   --env PGID=$(id -g) \
   --env TZ=Europe/Berlin \
   --env SPOOLMAN_LOGGING_LEVEL=DEBUG \
   --env SPOOLMAN_METRICS_ENABLED=TRUE \
   --mount source=${DOCKER_NAME}_data,target=/home/app/.local/share/spoolman \
   ${DOCKER_IMAGE}
Donkie commented 2 months ago

0.17 was now pushed which should include the prometheus support, see if it works better now.

hakan42 commented 2 months ago

Thank you, with that build, it does indeed work.