From dcb1017c07bcdce38449e9dc79314f060b6bf7b1 Mon Sep 17 00:00:00 2001 From: Zhaohui Yu Date: Mon, 3 Apr 2023 13:45:45 +0800 Subject: [PATCH] [ISSUE #10206] Optimize nacos default application.properties configuration (#10207) * Optimize nacos default application.properties configuration: 1. expose prometheus endpoint for metrics. 2. expose health endpoint for SLB healthcheck. 3. switch on mbean for tomcat, so we can collect tomcat metrics. 4. use one file per hour for tomcat access log * comment prometheus and health endpoint * enable rotate --- distribution/conf/application.properties | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/distribution/conf/application.properties b/distribution/conf/application.properties index 5b99ec508d1..2583f799238 100644 --- a/distribution/conf/application.properties +++ b/distribution/conf/application.properties @@ -97,10 +97,11 @@ db.pool.config.minimumIdle=2 ### If turn on data loading task: # nacos.cmdb.loadDataAtStart=false +#***********Metrics for tomcat **************************# +server.tomcat.mbeanregistry.enabled=true -#*************** Metrics Related Configurations ***************# -### Metrics for prometheus -#management.endpoints.web.exposure.include=* +#***********Expose prometheus and health **************************# +#management.endpoints.web.exposure.include=prometheus,health ### Metrics for elastic search management.metrics.export.elastic.enabled=false @@ -118,6 +119,9 @@ management.metrics.export.influx.enabled=false ### If turn on the access log: server.tomcat.accesslog.enabled=true +### file name pattern, one file per hour +server.tomcat.accesslog.rotate=true +server.tomcat.accesslog.file-date-format=.yyyy-MM-dd-HH ### The access log pattern: server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D %{User-Agent}i %{Request-Source}i