feat: nbi

This commit is contained in:
simon
2025-05-23 18:24:18 +08:00
parent a5e5b3cf6e
commit 01975afe9c
31 changed files with 2338 additions and 1538 deletions

View File

@@ -0,0 +1,10 @@
# alarm relation rules
derived:
- parentCode: 1001
childCode: 1002
- parentCode: 2001
childCode: 2002
related:
- codes: [3001, 3002, 3003]
neType: "AMF"
timeWindow: 60 # 秒

View File

@@ -31,8 +31,8 @@ rest:
keyFile: ./etc/certs/omc-server.key
webServer:
enabled: false
rootDir: d:/omc.git/fe.ems.vue3/dist # front-end build dist directory
enabled: true
rootDir: /home/simon/omc.git/fe.ems.vue3/dist # front-end build dist directory
listen:
- addr: :8080
schema: http
@@ -47,8 +47,8 @@ database:
type: mysql
user: root
password: "1000omc@kp!"
host: "192.168.9.58"
port: 13306
host: "192.168.2.165"
port: 33066
name: omc_db
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True
backup: ./database
@@ -58,8 +58,8 @@ redis:
dataSource:
# OMC system db
default:
port: 16379 # Redis port
host: "192.168.9.58" # Redis host
port: 6379 # Redis port
host: "127.0.0.1" # Redis host
password: "helloearth"
db: 10 # Redis db_num
# used to specify the default data source for multiple data resourece
@@ -139,7 +139,7 @@ alarm:
enable: true
emailList:
smtp: mail.smtp.com
port: 25
port: 110
user: smtpext@smtp.com
password: "1000smtp@omc!"
tlsSkipVerify: true
@@ -159,6 +159,11 @@ alarm:
signName: xxx SMSC
templateCode: 1000
smProxy: smsc
# alarm_relation_rules.yaml
relationRules:
enabled: true
file: ./etc/alarm_relation_rules.yaml
# User authorized information
# crypt: mysql/md5/bcrypt

View File

@@ -20,6 +20,7 @@ import (
"be.ems/features/fm"
"be.ems/features/lm"
"be.ems/features/mml"
"be.ems/features/nbi/redisqueue"
"be.ems/features/pm"
featuresCfg "be.ems/lib/config"
"be.ems/lib/dborm"
@@ -209,6 +210,9 @@ func loadFeatures(app *gin.Engine) {
mml.InitMML()
// 初始化Redis Queue连接池
redisqueue.InitRedisQueue()
// 将 mux.Router 注册到 gin.Engine
// 默认路由组