diff --git a/README.md b/README.md index 0d446a4b16..2d566c9ff0 100644 --- a/README.md +++ b/README.md @@ -336,7 +336,7 @@ it being synced automatically everyday. | PORT | 8000 | Exposed port | Server | | NUM_WORKERS | 1 | The number of worker per Worker instance (Set to 0 for API/Server instances, Set to 1 for normal workers, and > 1 for workers dedicated to native jobs) | Worker | | DISABLE_SERVER | false | Disable the external API, operate as a worker only instance | Worker | -| METRICS_ADDR | None | The socket addr at which to expose Prometheus metrics at the /metrics path. Set to "true" to expose it on port 8001 | All | +| METRICS_ADDR | None | (ee only) The socket addr at which to expose Prometheus metrics at the /metrics path. Set to "true" to expose it on port 8001 | All | | JSON_FMT | false | Output the logs in json format instead of logfmt | All | | BASE_URL | http://localhost:8000 | The base url that is exposed publicly to access your instance | Server | | TIMEOUT | 300 | The maximum time of execution of a script. When reached, the job is failed as having timedout. | Worker | diff --git a/backend/src/main.rs b/backend/src/main.rs index a56da225d9..4f014294b4 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -245,6 +245,9 @@ Windmill Community Edition {GIT_VERSION} let metrics_f = async { match metrics_addr { Some(addr) => { + #[cfg(not(feature = "enterprise"))] + panic!("Metrics are only available in the Enterprise Edition"); + windmill_common::serve_metrics(addr, rx.resubscribe(), num_workers > 0) .await .map_err(anyhow::Error::from) diff --git a/docker-compose.yml b/docker-compose.yml index 8309407c09..a9728ab620 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -35,7 +35,7 @@ services: ## You can set the number of workers to 1 and not need any separate worker service but not recommended - NUM_WORKERS=0 - DISABLE_SERVER=false - - METRICS_ADDR=false + - METRICS_ADDR=false # (ee only, if set to true, metrics will be exposed on port 8001) - REQUEST_SIZE_LIMIT=${WM_REQUEST_SIZE_LIMIT} # LICENSE_KEY is only needed for the enterprise edition - LICENSE_KEY=${WM_LICENSE_KEY} @@ -92,7 +92,7 @@ services: - RUST_LOG=info - DISABLE_SERVER=true - KEEP_JOB_DIR=false - - METRICS_ADDR=false + - METRICS_ADDR=false # (ee only, if set to true, metrics will be exposed on port 8001) - NUM_WORKERS=4 - WORKER_TAGS=nativets,postgresql,mysql,graphql,snowflake # LICENSE_KEY is only needed for the enterprise edition