Skip to content

Commit

Permalink
feat: prometheus metrics are now ee only
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenfiszel committed Aug 20, 2023
1 parent a2fe6c5 commit 2afea50
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
3 changes: 3 additions & 0 deletions backend/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2afea50

Please sign in to comment.