config
This commit is contained in:
		
							parent
							
								
									321e6a2402
								
							
						
					
					
						commit
						9bddb6d020
					
				| @ -43,14 +43,15 @@ type TimeParameters struct { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| type DataTypeConfig struct { | type DataTypeConfig struct { | ||||||
| 	IndexPattern   string            `json:"index_pattern"` | 	IndexPattern       string             `json:"index_pattern"` | ||||||
| 	MaxRetention   map[string]int    `json:"max_retention"` | 	MaxRetention       map[string]int     `json:"max_retention"` | ||||||
| 	MinRetention   int               `json:"min_retention"` | 	MinRetention       int                `json:"min_retention"` | ||||||
| 	Shards         int               `json:"shards"` | 	Shards             int                `json:"shards"` | ||||||
| 	Replicas       int               `json:"replicas"` | 	Replicas           int                `json:"replicas"` | ||||||
| 	NormalRollover map[string]string `json:"normal_rollover"` | 	NormalRollover     map[string]string  `json:"normal_rollover"` | ||||||
| 	NormalPhases   map[string]int    `json:"normal_phases"` | 	NormalPhases       map[string]int     `json:"normal_phases"` | ||||||
| 	TimeParameters TimeParameters    `json:"time_parameters"` | 	TimeParameters     TimeParameters     `json:"time_parameters"` | ||||||
|  | 	CoolingModelConfig map[string]float64 `json:"cooling_model_config"` // Add this line | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // LoadConfig 加载配置文件 | // LoadConfig 加载配置文件 | ||||||
|  | |||||||
| @ -42,7 +42,14 @@ | |||||||
|         "warm": 60, |         "warm": 60, | ||||||
|         "cold": 180, |         "cold": 180, | ||||||
|         "delete": 365 |         "delete": 365 | ||||||
|     } | }, | ||||||
|  | "cooling_model_config": { | ||||||
|  |     "timeDecayFactor": 0.5, | ||||||
|  |     "periodGranularityFactor": 0.5, | ||||||
|  |     "warmPhaseMultiplier": 1.0, | ||||||
|  |     "coldPhaseMultiplier": 2.0, | ||||||
|  |     "deletePhaseMultiplier": 3.0 | ||||||
|  | } | ||||||
|                 }, |                 }, | ||||||
|                 "ma": { |                 "ma": { | ||||||
|                     "index_pattern": "logstash-%s.ma.*.%d-%02d", |                     "index_pattern": "logstash-%s.ma.*.%d-%02d", | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zhangkun9038@dingtalk.com
						zhangkun9038@dingtalk.com