diff --git a/cpp/CHANGELOG.md b/cpp/CHANGELOG.md index 0520eaf331..ca4e466cf9 100644 --- a/cpp/CHANGELOG.md +++ b/cpp/CHANGELOG.md @@ -20,7 +20,7 @@ Please mark all change in change log and use the ticket from JIRA. - MS-22 - Enhancement for MemVector size control - MS-92 - Unify behavior of debug and release build - MS-98 - Install all unit test to installation directory - +- MS-115 - Change is_startup of metric_config switch from true to on ## New Feature - MS-57 - Implement index load/search pipeline diff --git a/cpp/conf/server_config.yaml b/cpp/conf/server_config.yaml index 27a96960cf..1c26c0aa52 100644 --- a/cpp/conf/server_config.yaml +++ b/cpp/conf/server_config.yaml @@ -12,7 +12,7 @@ db_config: archive_days_threshold: 30 # files older than x days will be archived, unit: day metric_config: - is_startup: true # if monitoring start: on, off + is_startup: off # if monitoring start: on, off collector: prometheus # metrics collector: prometheus prometheus_config: # following are prometheus configure collect_type: pull # prometheus collect data method @@ -20,6 +20,7 @@ metric_config: push_gateway_ip_address: 127.0.0.1 # push method configure: push gateway ip address push_gateway_port: 9091 # push method configure: push gateway port + license_config: # license configure license_path: "/tmp/system.license" # license file path diff --git a/cpp/src/metrics/PrometheusMetrics.cpp b/cpp/src/metrics/PrometheusMetrics.cpp index 07e1d2ee71..d0d50800ad 100644 --- a/cpp/src/metrics/PrometheusMetrics.cpp +++ b/cpp/src/metrics/PrometheusMetrics.cpp @@ -17,7 +17,8 @@ ServerError PrometheusMetrics::Init() { try { ConfigNode &configNode = ServerConfig::GetInstance().GetConfig(CONFIG_METRIC); - startup_ = configNode.GetValue(CONFIG_METRIC_IS_STARTUP) == "true" ? true : false; + startup_ = configNode.GetValue(CONFIG_METRIC_IS_STARTUP) == "on"; + if(!startup_) return SERVER_SUCCESS; // Following should be read from config file. const std::string bind_address = configNode.GetChild(CONFIG_PROMETHEUS).GetValue(CONFIG_METRIC_PROMETHEUS_PORT); const std::string uri = std::string("/metrics"); diff --git a/cpp/unittest/metrics/metrics_test.cpp b/cpp/unittest/metrics/metrics_test.cpp index 82e1d99b93..72596dc79e 100644 --- a/cpp/unittest/metrics/metrics_test.cpp +++ b/cpp/unittest/metrics/metrics_test.cpp @@ -33,7 +33,7 @@ TEST_F(DBTest, Metric_Tes) { server::Metrics::GetInstance().Init(); // server::PrometheusMetrics::GetInstance().exposer_ptr()->RegisterCollectable(server::PrometheusMetrics::GetInstance().registry_ptr()); - zilliz::milvus::cache::CpuCacheMgr::GetInstance()->SetCapacity(2UL*1024*1024*1024); + zilliz::milvus::cache::CpuCacheMgr::GetInstance()->SetCapacity(1UL*1024*1024*1024); std::cout<CacheCapacity()<