change db to tenants_db

This commit is contained in:
2024-06-19 11:29:47 +08:00
parent 2f08c044fc
commit a156c8bd5a
15 changed files with 32 additions and 32 deletions

View File

@@ -16,7 +16,7 @@ database:
password: 1000omc@kp! password: 1000omc@kp!
host: 172.25.97.150 host: 172.25.97.150
port: 33066 port: 33066
name: omc_db name: tenants_db
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True

View File

@@ -16,7 +16,7 @@ database:
password: 1000omc@kp! password: 1000omc@kp!
host: 127.0.0.1 host: 127.0.0.1
port: 33066 port: 33066
name: omc_db name: tenants_db
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True

View File

@@ -24,7 +24,7 @@ database:
password: 1000omc@kp! password: 1000omc@kp!
host: 127.0.0.1 host: 127.0.0.1
port: 33066 port: 33066
name: omc_db name: tenants_db
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True
# northbound interface, cm/pm # northbound interface, cm/pm

View File

@@ -44,7 +44,7 @@ database:
password: 1000omc@kp! password: 1000omc@kp!
host: 127.0.0.1 host: 127.0.0.1
port: 33066 port: 33066
name: omc_db name: tenants_db
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True
backup: /usr/local/omc/database backup: /usr/local/omc/database

View File

@@ -36,7 +36,7 @@ database:
password: 1000omc@kp! password: 1000omc@kp!
host: 127.0.0.1 host: 127.0.0.1
port: 33066 port: 33066
name: omc_db name: tenants_db
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True
omc: omc:

View File

@@ -22,7 +22,7 @@ tasks:
do: TaskHelloWorld # (Do what: callback function) do: TaskHelloWorld # (Do what: callback function)
- name: clear expired history alarm - name: clear expired history alarm
status: Inactive status: Inactive
uri: /api/rest/databaseManagement/v1/omc_db/alarm uri: /api/rest/databaseManagement/v1/tenants_db/alarm
params: WHERE=now()+>+ADDDATE(event_time,+interval+(SELECT+`value`+FROM+config+WHERE+config_tag='historyDuration')+day)+and+alarm_status='0' params: WHERE=now()+>+ADDDATE(event_time,+interval+(SELECT+`value`+FROM+config+WHERE+config_tag='historyDuration')+day)+and+alarm_status='0'
interval: 1 interval: 1
unit: Days unit: Days
@@ -30,14 +30,14 @@ tasks:
do: TaskDeleteExpiredRecord do: TaskDeleteExpiredRecord
- name: clear expired history gold_kpi - name: clear expired history gold_kpi
status: Inactive status: Inactive
uri: /api/rest/databaseManagement/v1/omc_db/gold_kpi uri: /api/rest/databaseManagement/v1/tenants_db/gold_kpi
params: WHERE=now()+>+ADDDATE(`date`,+interval+IFNULL((SELECT+`value`+FROM+config+WHERE+config_tag='goldKpiDuration'),7)+day) params: WHERE=now()+>+ADDDATE(`date`,+interval+IFNULL((SELECT+`value`+FROM+config+WHERE+config_tag='goldKpiDuration'),7)+day)
interval: 1 interval: 1
unit: Days unit: Days
at: 00:12:00 at: 00:12:00
do: TaskDeleteExpiredRecord do: TaskDeleteExpiredRecord
- name: clear deleted custom pm kpi - name: clear deleted custom pm kpi
uri: /api/rest/databaseManagement/v1/omc_db/pm_custom_title uri: /api/rest/databaseManagement/v1/tenants_db/pm_custom_title
params: WHERE=now()+>+ADDDATE(update_time,+interval+(SELECT+`value`+FROM+config+WHERE+config_tag='keepPMCKpi')+day)+and+status='Deleted' params: WHERE=now()+>+ADDDATE(update_time,+interval+(SELECT+`value`+FROM+config+WHERE+config_tag='keepPMCKpi')+day)+and+status='Deleted'
interval: 1 interval: 1
unit: Days unit: Days
@@ -45,7 +45,7 @@ tasks:
do: TaskDeleteExpiredRecord do: TaskDeleteExpiredRecord
- name: update expired user session - name: update expired user session
status: Inactive status: Inactive
uri: /api/rest/databaseManagement/v1/omc_db/session uri: /api/rest/databaseManagement/v1/tenants_db/session
params: WHERE=NOW()+>+ADDDATE(shake_time,+interval+expires+second)+and+status='online' params: WHERE=NOW()+>+ADDDATE(shake_time,+interval+expires+second)+and+status='online'
body: '{"session":{"status":"offline"}}' body: '{"session":{"status":"offline"}}'
interval: 30 interval: 30
@@ -61,28 +61,28 @@ tasks:
at: 00:50:00 at: 00:50:00
do: TaskDeleteExpiredRecord do: TaskDeleteExpiredRecord
- name: Backup measure data - name: Backup measure data
uri: /api/rest/databaseManagement/v1/omc_db/measure_data uri: /api/rest/databaseManagement/v1/tenants_db/measure_data
params: SQL=select+*+into+outfile+'%s'+fields+terminated+by+','+escaped+by+''+optionally+enclosed+by+''+lines+terminated+by+'\n'+from+(select+'id','date','task_id','ne_name','rm_uid','ne_type','granul_option','kpi_code','kpi_id','kpi_ext','start_time','end_time','value','timestamp'+union+select+id,date,task_id,ne_name,rm_uid,ne_type,granul_option,kpi_code,kpi_id,kpi_ext,start_time,end_time,value,timestamp+from+measure_data)+b params: SQL=select+*+into+outfile+'%s'+fields+terminated+by+','+escaped+by+''+optionally+enclosed+by+''+lines+terminated+by+'\n'+from+(select+'id','date','task_id','ne_name','rm_uid','ne_type','granul_option','kpi_code','kpi_id','kpi_ext','start_time','end_time','value','timestamp'+union+select+id,date,task_id,ne_name,rm_uid,ne_type,granul_option,kpi_code,kpi_id,kpi_ext,start_time,end_time,value,timestamp+from+measure_data)+b
interval: 1 interval: 1
unit: Days unit: Days
at: 00:20:00 at: 00:20:00
do: TaskDBBackupCSVGetBySQL do: TaskDBBackupCSVGetBySQL
- name: Backup operation log - name: Backup operation log
uri: /api/rest/databaseManagement/v1/omc_db/operation_log uri: /api/rest/databaseManagement/v1/tenants_db/operation_log
params: SQL=select+*+into+outfile+'%s'+fields+terminated+by+','+escaped+by+''+optionally+enclosed+by+''+lines+terminated+by+'\n'+from+(select+'op_id','account_name','op_ip','subsys_tag','op_type','op_content','op_result','begin_time','end_time','vnf_flag','log_time'+union+select+op_id,account_name,op_ip,subsys_tag,op_type,op_content,op_result,begin_time,end_time,vnf_flag,log_time+from+operation_log)+b params: SQL=select+*+into+outfile+'%s'+fields+terminated+by+','+escaped+by+''+optionally+enclosed+by+''+lines+terminated+by+'\n'+from+(select+'op_id','account_name','op_ip','subsys_tag','op_type','op_content','op_result','begin_time','end_time','vnf_flag','log_time'+union+select+op_id,account_name,op_ip,subsys_tag,op_type,op_content,op_result,begin_time,end_time,vnf_flag,log_time+from+operation_log)+b
interval: 1 interval: 1
unit: Days unit: Days
at: 00:26:00 at: 00:26:00
do: TaskDBBackupCSVGetBySQL do: TaskDBBackupCSVGetBySQL
- name: Backup security log - name: Backup security log
uri: /api/rest/databaseManagement/v1/omc_db/security_log uri: /api/rest/databaseManagement/v1/tenants_db/security_log
params: SQL=select+*+into+outfile+'%s'+fields+terminated+by+','+escaped+by+''+optionally+enclosed+by+''+lines+terminated+by+'\n'+from+(select+'id','account_name','account_type','op_ip','op_type','op_content','op_result','op_time'+union+select+id,account_name,account_type,op_ip,op_type,op_content,op_result,op_time+from+security_log)+b params: SQL=select+*+into+outfile+'%s'+fields+terminated+by+','+escaped+by+''+optionally+enclosed+by+''+lines+terminated+by+'\n'+from+(select+'id','account_name','account_type','op_ip','op_type','op_content','op_result','op_time'+union+select+id,account_name,account_type,op_ip,op_type,op_content,op_result,op_time+from+security_log)+b
interval: 1 interval: 1
unit: Days unit: Days
at: 00:28:00 at: 00:28:00
do: TaskDBBackupCSVGetBySQL do: TaskDBBackupCSVGetBySQL
- name: Backup alarm log - name: Backup alarm log
uri: /api/rest/databaseManagement/v1/omc_db/alarm_log uri: /api/rest/databaseManagement/v1/tenants_db/alarm_log
params: SQL=select+*+into+outfile+'%s'+fields+terminated+by+','+escaped+by+''+optionally+enclosed+by+''+lines+terminated+by+'\n'+from+(select+'id','ne_type','ne_id','alarm_seq','alarm_id','alarm_code','alarm_status','event_time','log_time'+union+select+id,ne_type,ne_id,alarm_seq,alarm_id,alarm_code,alarm_status,event_time,log_time+from+alarm_log)+b params: SQL=select+*+into+outfile+'%s'+fields+terminated+by+','+escaped+by+''+optionally+enclosed+by+''+lines+terminated+by+'\n'+from+(select+'id','ne_type','ne_id','alarm_seq','alarm_id','alarm_code','alarm_status','event_time','log_time'+union+select+id,ne_type,ne_id,alarm_seq,alarm_id,alarm_code,alarm_status,event_time,log_time+from+alarm_log)+b
interval: 1 interval: 1
unit: Days unit: Days
@@ -144,7 +144,7 @@ tasks:
at: at:
do: TaskGenMeasureReportTimeoutAlarm do: TaskGenMeasureReportTimeoutAlarm
- name: Monitor proces list and write system log - name: Monitor proces list and write system log
uri: /api/rest/databaseManagement/v1/omc_db/system_log uri: /api/rest/databaseManagement/v1/tenants_db/system_log
params: params:
body: body:
interval: 10 interval: 10

View File

@@ -24,7 +24,7 @@ database:
password: 1000omc@kp! password: 1000omc@kp!
host: 127.0.0.1 host: 127.0.0.1
port: 33066 port: 33066
name: omc_db name: tenants_db
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True
backup: d:/local.git/be.ems/restagent/database backup: d:/local.git/be.ems/restagent/database

View File

@@ -30,35 +30,35 @@ tasks:
at: 00:00:00 at: 00:00:00
do: TaskCronUserLoginOMC do: TaskCronUserLoginOMC
- name: clear expired history alarm - name: clear expired history alarm
uri: /api/rest/databaseManagement/v1/omc_db/alarm uri: /api/rest/databaseManagement/v1/tenants_db/alarm
params: WHERE=now()+>+ADDDATE(event_time,+interval+(SELECT+`value`+FROM+config+WHERE+config_tag='historyDuration')+day)+and+alarm_status='0' params: WHERE=now()+>+ADDDATE(event_time,+interval+(SELECT+`value`+FROM+config+WHERE+config_tag='historyDuration')+day)+and+alarm_status='0'
interval: 1 interval: 1
unit: Days unit: Days
at: 00:10:00 at: 00:10:00
do: TaskDeleteExpiredRecord do: TaskDeleteExpiredRecord
- name: clear expired history gold_kpi - name: clear expired history gold_kpi
uri: /api/rest/databaseManagement/v1/omc_db/gold_kpi uri: /api/rest/databaseManagement/v1/tenants_db/gold_kpi
params: WHERE=now()+>+ADDDATE(`date`,+interval+IFNULL((SELECT+`value`+FROM+config+WHERE+config_tag='goldKpiDuration'),7)+day) params: WHERE=now()+>+ADDDATE(`date`,+interval+IFNULL((SELECT+`value`+FROM+config+WHERE+config_tag='goldKpiDuration'),7)+day)
interval: 1 interval: 1
unit: Days unit: Days
at: 00:11:00 at: 00:11:00
do: TaskDeleteExpiredRecord do: TaskDeleteExpiredRecord
- name: clear deleted custom pm kpi - name: clear deleted custom pm kpi
uri: /api/rest/databaseManagement/v1/omc_db/pm_custom_title uri: /api/rest/databaseManagement/v1/tenants_db/pm_custom_title
params: WHERE=now()+>+ADDDATE(update_time,+interval+(SELECT+`value`+FROM+config+WHERE+config_tag='keepPMCKpi')+day)+and+status='Deleted' params: WHERE=now()+>+ADDDATE(update_time,+interval+(SELECT+`value`+FROM+config+WHERE+config_tag='keepPMCKpi')+day)+and+status='Deleted'
interval: 1 interval: 1
unit: Days unit: Days
at: 00:15:00 at: 00:15:00
do: TaskDeleteExpiredRecord do: TaskDeleteExpiredRecord
- name: clear expired ne etc backup - name: clear expired ne etc backup
uri: /api/rest/databaseManagement/v1/omc_db/ne_backup uri: /api/rest/databaseManagement/v1/tenants_db/ne_backup
params: WHERE=now()+>+ADDDATE(`create_time`,+interval+IFNULL((SELECT+`value`+FROM+config+WHERE+config_tag='BackUpSaveTime'),30)+day) params: WHERE=now()+>+ADDDATE(`create_time`,+interval+IFNULL((SELECT+`value`+FROM+config+WHERE+config_tag='BackUpSaveTime'),30)+day)
interval: 1 interval: 1
unit: Days unit: Days
at: 15:02:00 at: 15:02:00
do: TaskRemoveExpiredFile do: TaskRemoveExpiredFile
- name: update expired user session - name: update expired user session
uri: /api/rest/databaseManagement/v1/omc_db/session uri: /api/rest/databaseManagement/v1/tenants_db/session
params: WHERE=NOW()+>+ADDDATE(shake_time,+interval+expires+second)+and+status='online' params: WHERE=NOW()+>+ADDDATE(shake_time,+interval+expires+second)+and+status='online'
body: '{"session":{"status":"offline"}}' body: '{"session":{"status":"offline"}}'
interval: 30 interval: 30
@@ -73,28 +73,28 @@ tasks:
at: 00:50:00 at: 00:50:00
do: TaskDeleteExpiredRecord do: TaskDeleteExpiredRecord
- name: Backup measure data - name: Backup measure data
uri: /api/rest/databaseManagement/v1/omc_db/measure_data uri: /api/rest/databaseManagement/v1/tenants_db/measure_data
params: SQL=select+*+into+outfile+'%s'+fields+terminated+by+','+escaped+by+''+optionally+enclosed+by+''+lines+terminated+by+'\n'+from+(select+'id','date','task_id','ne_name','rm_uid','ne_type','granul_option','kpi_code','kpi_id','kpi_ext','start_time','end_time','value','timestamp'+union+select+id,date,task_id,ne_name,rm_uid,ne_type,granul_option,kpi_code,kpi_id,kpi_ext,start_time,end_time,value,timestamp+from+measure_data)+b params: SQL=select+*+into+outfile+'%s'+fields+terminated+by+','+escaped+by+''+optionally+enclosed+by+''+lines+terminated+by+'\n'+from+(select+'id','date','task_id','ne_name','rm_uid','ne_type','granul_option','kpi_code','kpi_id','kpi_ext','start_time','end_time','value','timestamp'+union+select+id,date,task_id,ne_name,rm_uid,ne_type,granul_option,kpi_code,kpi_id,kpi_ext,start_time,end_time,value,timestamp+from+measure_data)+b
interval: 1 interval: 1
unit: Days unit: Days
at: 00:20:00 at: 00:20:00
do: TaskDBBackupCSVGetBySQL do: TaskDBBackupCSVGetBySQL
- name: Backup operation log - name: Backup operation log
uri: /api/rest/databaseManagement/v1/omc_db/operation_log uri: /api/rest/databaseManagement/v1/tenants_db/operation_log
params: SQL=select+*+into+outfile+'%s'+fields+terminated+by+','+escaped+by+''+optionally+enclosed+by+''+lines+terminated+by+'\n'+from+(select+'op_id','account_name','op_ip','subsys_tag','op_type','op_content','op_result','begin_time','end_time','vnf_flag','log_time'+union+select+op_id,account_name,op_ip,subsys_tag,op_type,op_content,op_result,begin_time,end_time,vnf_flag,log_time+from+operation_log)+b params: SQL=select+*+into+outfile+'%s'+fields+terminated+by+','+escaped+by+''+optionally+enclosed+by+''+lines+terminated+by+'\n'+from+(select+'op_id','account_name','op_ip','subsys_tag','op_type','op_content','op_result','begin_time','end_time','vnf_flag','log_time'+union+select+op_id,account_name,op_ip,subsys_tag,op_type,op_content,op_result,begin_time,end_time,vnf_flag,log_time+from+operation_log)+b
interval: 1 interval: 1
unit: Days unit: Days
at: 00:26:00 at: 00:26:00
do: TaskDBBackupCSVGetBySQL do: TaskDBBackupCSVGetBySQL
- name: Backup security log - name: Backup security log
uri: /api/rest/databaseManagement/v1/omc_db/security_log uri: /api/rest/databaseManagement/v1/tenants_db/security_log
params: SQL=select+*+into+outfile+'%s'+fields+terminated+by+','+escaped+by+''+optionally+enclosed+by+''+lines+terminated+by+'\n'+from+(select+'id','account_name','account_type','op_ip','op_type','op_content','op_result','op_time'+union+select+id,account_name,account_type,op_ip,op_type,op_content,op_result,op_time+from+security_log)+b params: SQL=select+*+into+outfile+'%s'+fields+terminated+by+','+escaped+by+''+optionally+enclosed+by+''+lines+terminated+by+'\n'+from+(select+'id','account_name','account_type','op_ip','op_type','op_content','op_result','op_time'+union+select+id,account_name,account_type,op_ip,op_type,op_content,op_result,op_time+from+security_log)+b
interval: 1 interval: 1
unit: Days unit: Days
at: 00:28:00 at: 00:28:00
do: TaskDBBackupCSVGetBySQL do: TaskDBBackupCSVGetBySQL
- name: Backup alarm log - name: Backup alarm log
uri: /api/rest/databaseManagement/v1/omc_db/alarm_log uri: /api/rest/databaseManagement/v1/tenants_db/alarm_log
params: SQL=select+*+into+outfile+'%s'+fields+terminated+by+','+escaped+by+''+optionally+enclosed+by+''+lines+terminated+by+'\n'+from+(select+'id','ne_type','ne_id','alarm_seq','alarm_id','alarm_code','alarm_status','event_time','log_time'+union+select+id,ne_type,ne_id,alarm_seq,alarm_id,alarm_code,alarm_status,event_time,log_time+from+alarm_log)+b params: SQL=select+*+into+outfile+'%s'+fields+terminated+by+','+escaped+by+''+optionally+enclosed+by+''+lines+terminated+by+'\n'+from+(select+'id','ne_type','ne_id','alarm_seq','alarm_id','alarm_code','alarm_status','event_time','log_time'+union+select+id,ne_type,ne_id,alarm_seq,alarm_id,alarm_code,alarm_status,event_time,log_time+from+alarm_log)+b
interval: 1 interval: 1
unit: Days unit: Days
@@ -155,7 +155,7 @@ tasks:
at: at:
do: TaskGenMeasureReportTimeoutAlarm do: TaskGenMeasureReportTimeoutAlarm
- name: Monitor proces list and write system log - name: Monitor proces list and write system log
uri: /api/rest/databaseManagement/v1/omc_db/system_log uri: /api/rest/databaseManagement/v1/tenants_db/system_log
params: params:
body: body:
interval: 5 interval: 5

View File

@@ -44,7 +44,7 @@ database:
password: 1000omc@kp! password: 1000omc@kp!
host: 127.0.0.1 host: 127.0.0.1
port: 33066 port: 33066
name: omc_db name: tenants_db
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True
backup: d:/local.git/be.ems/restagent/database backup: d:/local.git/be.ems/restagent/database

View File

@@ -36,7 +36,7 @@ database:
password: 1000omc@kp! password: 1000omc@kp!
host: 127.0.0.1 host: 127.0.0.1
port: 33066 port: 33066
name: omc_db name: tenants_db
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True
omc: omc:

View File

@@ -12,6 +12,6 @@ database:
password: 1000omc@kp! password: 1000omc@kp!
host: 127.0.0.1 host: 127.0.0.1
port: 33066 port: 33066
name: omc_db name: tenants_db
cmfiledir: ../../config/cm cmfiledir: ../../config/cm

View File

@@ -12,7 +12,7 @@ database:
password: 1000omc@kp! password: 1000omc@kp!
host: 127.0.0.1 host: 127.0.0.1
port: 33066 port: 33066
name: omc_db name: tenants_db
mml: mml:
filedir: ../../config/mml/subscriber filedir: ../../config/mml/subscriber

View File

@@ -12,6 +12,6 @@ database:
password: 1000omc@kp! password: 1000omc@kp!
host: 127.0.0.1 host: 127.0.0.1
port: 33066 port: 33066
name: omc_db name: tenants_db
paramfiledir: ../../config/param paramfiledir: ../../config/param

View File

@@ -12,6 +12,6 @@ database:
password: 1000omc@kp! password: 1000omc@kp!
host: 127.0.0.1 host: 127.0.0.1
port: 33066 port: 33066
name: omc_db name: tenants_db
pmfiledir: ../../config/pm pmfiledir: ../../config/pm

View File

@@ -12,4 +12,4 @@ database:
password: 1000omc@kp! password: 1000omc@kp!
host: 127.0.0.1 host: 127.0.0.1
port: 33066 port: 33066
name: omc_db name: tenants_db