This commit is contained in:
zhangkun9038@dingtalk.com 2025-03-29 21:22:38 +08:00
parent 321e6a2402
commit 9bddb6d020
2 changed files with 17 additions and 9 deletions

@ -43,14 +43,15 @@ type TimeParameters struct {
}
type DataTypeConfig struct {
IndexPattern string `json:"index_pattern"`
MaxRetention map[string]int `json:"max_retention"`
MinRetention int `json:"min_retention"`
Shards int `json:"shards"`
Replicas int `json:"replicas"`
NormalRollover map[string]string `json:"normal_rollover"`
NormalPhases map[string]int `json:"normal_phases"`
TimeParameters TimeParameters `json:"time_parameters"`
IndexPattern string `json:"index_pattern"`
MaxRetention map[string]int `json:"max_retention"`
MinRetention int `json:"min_retention"`
Shards int `json:"shards"`
Replicas int `json:"replicas"`
NormalRollover map[string]string `json:"normal_rollover"`
NormalPhases map[string]int `json:"normal_phases"`
TimeParameters TimeParameters `json:"time_parameters"`
CoolingModelConfig map[string]float64 `json:"cooling_model_config"` // Add this line
}
// LoadConfig 加载配置文件

@ -42,7 +42,14 @@
"warm": 60,
"cold": 180,
"delete": 365
}
},
"cooling_model_config": {
"timeDecayFactor": 0.5,
"periodGranularityFactor": 0.5,
"warmPhaseMultiplier": 1.0,
"coldPhaseMultiplier": 2.0,
"deletePhaseMultiplier": 3.0
}
},
"ma": {
"index_pattern": "logstash-%s.ma.*.%d-%02d",