feat: support add redis queue with alarm/nbi_pm/nbi_kpi, support generate all nbi pm data

This commit is contained in:
simon
2025-08-11 17:10:13 +08:00
parent d4923d008c
commit 46ccc0ab83
26 changed files with 14059 additions and 41 deletions

View File

@@ -126,6 +126,8 @@ type YamlConfig struct {
Enabled bool `yaml:"enabled"`
File string `yaml:"file"`
} `yaml:"testConfig"`
NbiConfig NbiConfig `yaml:"nbiConfig"`
}
type RestParam struct {
@@ -187,6 +189,18 @@ type AlarmConfig struct {
} `yaml:"relatedRules"`
}
type NbiConfig struct {
Enabled bool `yaml:"enabled"`
PmConfig struct {
Enabled bool `yaml:"enabled"`
File string `yaml:"file"`
} `yaml:"pmConfig"`
RelationRules struct {
Enabled bool `yaml:"enabled"`
File string `yaml:"file"`
} `yaml:"relationRules"`
}
type MMLParam struct {
Sleep int64 `yaml:"sleep"`
DeadLine int64 `yaml:"deadLine"`
@@ -280,6 +294,15 @@ func ReadConfig(configFile string) {
if yamlConfig.Alarm.RelatedRules.Enabled {
LoadAlarmRelationRules(yamlConfig.Alarm.RelatedRules.File)
}
if yamlConfig.NbiConfig.Enabled {
if yamlConfig.NbiConfig.PmConfig.Enabled {
LoadNbiPmConfig(yamlConfig.NbiConfig.PmConfig.File)
}
if yamlConfig.NbiConfig.RelationRules.Enabled {
LoadNbiRelationRulesConfig(yamlConfig.NbiConfig.RelationRules.File)
}
}
}
func ReadOriginalConfig(configFile string) {