fix: incorrect cluster metric collection mode (#136)
This commit is contained in:
parent
7922a42513
commit
acaf76a0b1
|
@ -37,8 +37,11 @@ func GetMonitorState(clusterID string) string {
|
|||
if conf == nil {
|
||||
panic(fmt.Errorf("config of cluster [%s] is not found", clusterID))
|
||||
}
|
||||
if conf.MetricCollectionMode == "" {
|
||||
if conf.MonitorConfigs != nil && !conf.MonitorConfigs.NodeStats.Enabled && !conf.MonitorConfigs.IndexStats.Enabled {
|
||||
return elastic.ModeAgent
|
||||
}
|
||||
return elastic.ModeAgentless
|
||||
}
|
||||
return conf.MetricCollectionMode
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue