Hi Bursuc,
I've tested it successfully with the config option.
1) First configure it via config command to enable the metrics
./kc.sh config --db=postgres --http-enabled=true --metrics-enabled=true
2) start the server
./kc.sh
It works fine that way.
Here are the environment variables I've defined prior to starting the server:
#!/bin/bash
export KC_DB_URL=jdbc:postgresql://localhost:5432/keycloak
export KC_DB_USERNAME=keycloak
export KC_DB_PASSWORD=keycloak
export KC_HTTP_ENABLED=true
#export KC_METRICS_ENABLED=true
export KEYCLOAK_ADMIN=admin
export KEYCLOAK_ADMIN_PASSWORD=admin