cluster: support ng-monitoring config via server_configs and per-instance overrides#2685
cluster: support ng-monitoring config via server_configs and per-instance overrides#2685boltandrke wants to merge 1 commit intopingcap:masterfrom
Conversation
…ance overrides Add ng_monitoring to ServerConfigs and NgMonitoringConfig to PrometheusSpec so that ng-monitoring configuration (e.g. storage.type, storage.path, continuous_profiling.*) can be set through the topology YAML. Global config is set under server_configs.ng_monitoring, and per-instance overrides under monitoring_servers[].ng_monitoring_config, following the same merge pattern as PD/TiKV/TiDB. Ref pingcap#2325
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @boltandrke! It looks like this is your first PR to pingcap/tiup 🎉 |
|
|
What problem does this PR solve
Adds support for configuring ng-monitoring via topology YAML, addressing
the gap described in #2325.
Currently there is no way to set ng-monitoring configuration (e.g.
storage.type,storage.path,continuous_profiling.*) throughthe topology YAML. The
NgMonitoringConfigtemplate is hardcoded withno user-config merge step, unlike other components (PD/TiKV/TiDB) which
support
server_configs+ per-instanceconfigoverrides.What is changed and how it works
ServerConfigs.NGMonitoring— addedng_monitoring map[string]anytoServerConfigsfor global ng-monitoring configPrometheusSpec.NgMonitoringConfig— addedng_monitoring_config map[string]anyfor per-instance overridesMonitorInstance.InitConfig— replaced template-based ngmonitoring.toml generation with map-based approach usingMerge2Toml, following the same pattern as PD/TiKV/TiDBng_monitoringandng_monitoring_configsectionsUsage
Check List
go build ./...)go test ./pkg/cluster/spec/...)TestNGMonitoringServerConfig)make check— 0 issues)Ref #2325