add: ws for custom kpi
This commit is contained in:
@@ -307,15 +307,19 @@ func PostKPIReportFromNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
report.KpiValues = append(report.KpiValues, *kpiCVal)
|
report.KpiValues = append(report.KpiValues, *kpiCVal)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// KPI自定义指标入库
|
||||||
kpi_c_report.InsertKpiCReport(kpiData.NEType, report)
|
kpi_c_report.InsertKpiCReport(kpiData.NEType, report)
|
||||||
|
|
||||||
// 发送到匹配的网元
|
// 发送到匹配的网元
|
||||||
neInfo := neService.NewNeInfoImpl.SelectNeInfoByRmuid(kpiData.RmUid)
|
neInfo := neService.NewNeInfoImpl.SelectNeInfoByRmuid(kpiData.RmUid)
|
||||||
if neInfo.RmUID == kpiData.RmUid {
|
if neInfo.RmUID == kpiData.RmUid {
|
||||||
// 推送到ws订阅组
|
// 推送到ws订阅组
|
||||||
wsService.NewWSSendImpl.ByGroupID(fmt.Sprintf("%s%s_%s", wsService.GROUP_KPI, neInfo.NeType, neInfo.NeId), kpiEvent)
|
wsService.NewWSSendImpl.ByGroupID(fmt.Sprintf("%s%s_%s", wsService.GROUP_KPI, neInfo.NeType, neInfo.NeId), kpiEvent)
|
||||||
|
// 推送自定义KPI到ws订阅组
|
||||||
|
wsService.NewWSSendImpl.ByGroupID(fmt.Sprintf("%s%s_%s", wsService.GROUP_KPI_C, neInfo.NeType, neInfo.NeId), report)
|
||||||
if neInfo.NeType == "UPF" {
|
if neInfo.NeType == "UPF" {
|
||||||
// 推送标识为:12_RMUID, exp: 12_4400HXUPF001
|
// 推送标识为:12_RMUID, exp: 12_4400HXUPF001
|
||||||
wsService.NewWSSendImpl.ByGroupID(wsService.GROUP_KPI_UPF+"_"+kpiReport.Task.NE.RmUID, kpiEvent)
|
wsService.NewWSSendImpl.ByGroupID(wsService.GROUP_KPI_UPF+kpiReport.Task.NE.RmUID, kpiEvent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ const (
|
|||||||
GROUP_KPI = "10_"
|
GROUP_KPI = "10_"
|
||||||
// 组号-指标UPF 12_neId
|
// 组号-指标UPF 12_neId
|
||||||
GROUP_KPI_UPF = "12_"
|
GROUP_KPI_UPF = "12_"
|
||||||
|
// 组号-自定义KPI指标20_neType_neId
|
||||||
|
GROUP_KPI_C = "20_"
|
||||||
// 组号-IMS_CDR会话事件
|
// 组号-IMS_CDR会话事件
|
||||||
GROUP_IMS_CDR = "1005"
|
GROUP_IMS_CDR = "1005"
|
||||||
// 组号-SMF_CDR会话事件
|
// 组号-SMF_CDR会话事件
|
||||||
|
|||||||
Reference in New Issue
Block a user