X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=alarm%2Ftypes.go;h=be96fec63e2f03318652ccc81365f437887afb55;hb=refs%2Fchanges%2F11%2F4811%2F4;hp=ffe5d391c034e5d46e217cfe1f5db58d78f70a7d;hpb=6b1d437b586c6d3b606e3fa7ce0f95cb18336d60;p=ric-plt%2Falarm-go.git diff --git a/alarm/types.go b/alarm/types.go old mode 100644 new mode 100755 index ffe5d39..be96fec --- a/alarm/types.go +++ b/alarm/types.go @@ -67,13 +67,19 @@ type AlarmMessage struct { AlarmTime int64 } +type AlarmConfigParams struct { + MaxActiveAlarms int `json:"maxactivealarms"` + MaxAlarmHistory int `json:"maxalarmhistory"` +} + // RICAlarm is an alarm instance type RICAlarm struct { - moId string - appId string - rmrCtx unsafe.Pointer - rmrReady bool - mutex sync.Mutex + moId string + appId string + managerUrl string + rmrCtx unsafe.Pointer + rmrReady bool + mutex sync.Mutex } const ( @@ -83,42 +89,75 @@ const ( // Temp alarm constants & definitions const ( - RIC_RT_DISTRIBUTION_FAILED int = 8004 - TCP_CONNECTIVITY_LOST_TO_DBAAS int = 8005 - E2_CONNECTIVITY_LOST_TO_GNODEB int = 8006 - E2_CONNECTIVITY_LOST_TO_ENODEB int = 8007 + PERFORMANCE_TEST_ALARM_1 int = 1001 + PERFORMANCE_TEST_ALARM_2 int = 1002 + PERFORMANCE_TEST_ALARM_3 int = 1003 + PERFORMANCE_TEST_ALARM_4 int = 1004 + PERFORMANCE_TEST_ALARM_5 int = 1005 + PERFORMANCE_TEST_ALARM_6 int = 1006 + PERFORMANCE_TEST_ALARM_7 int = 1007 + PERFORMANCE_TEST_ALARM_8 int = 1008 + PERFORMANCE_TEST_ALARM_9 int = 1009 + PERFORMANCE_TEST_ALARM_10 int = 1010 + PERFORMANCE_TEST_ALARM_11 int = 1011 + PERFORMANCE_TEST_ALARM_12 int = 1012 + PERFORMANCE_TEST_ALARM_13 int = 1013 + PERFORMANCE_TEST_ALARM_14 int = 1014 + PERFORMANCE_TEST_ALARM_15 int = 1015 + PERFORMANCE_TEST_ALARM_16 int = 1016 + PERFORMANCE_TEST_ALARM_17 int = 1017 + PERFORMANCE_TEST_ALARM_18 int = 1018 + PERFORMANCE_TEST_ALARM_19 int = 1019 + PERFORMANCE_TEST_ALARM_20 int = 1020 + PERFORMANCE_TEST_ALARM_21 int = 1021 + PERFORMANCE_TEST_ALARM_22 int = 1022 + PERFORMANCE_TEST_ALARM_23 int = 1023 + PERFORMANCE_TEST_ALARM_24 int = 1024 + PERFORMANCE_TEST_ALARM_25 int = 1025 + PERFORMANCE_TEST_ALARM_26 int = 1026 + PERFORMANCE_TEST_ALARM_27 int = 1027 + PERFORMANCE_TEST_ALARM_28 int = 1028 + PERFORMANCE_TEST_ALARM_29 int = 1029 + PERFORMANCE_TEST_ALARM_30 int = 1030 + PERFORMANCE_TEST_ALARM_31 int = 1031 + PERFORMANCE_TEST_ALARM_32 int = 1032 + PERFORMANCE_TEST_ALARM_33 int = 1033 + PERFORMANCE_TEST_ALARM_34 int = 1034 + PERFORMANCE_TEST_ALARM_35 int = 1035 + PERFORMANCE_TEST_ALARM_36 int = 1036 + PERFORMANCE_TEST_ALARM_37 int = 1037 + PERFORMANCE_TEST_ALARM_38 int = 1038 + PERFORMANCE_TEST_ALARM_39 int = 1039 + PERFORMANCE_TEST_ALARM_40 int = 1040 + PERFORMANCE_TEST_ALARM_41 int = 1041 + PERFORMANCE_TEST_ALARM_42 int = 1042 + PERFORMANCE_TEST_ALARM_43 int = 1043 + PERFORMANCE_TEST_ALARM_44 int = 1044 + PERFORMANCE_TEST_ALARM_45 int = 1045 + PERFORMANCE_TEST_ALARM_46 int = 1046 + PERFORMANCE_TEST_ALARM_47 int = 1047 + PERFORMANCE_TEST_ALARM_48 int = 1048 + PERFORMANCE_TEST_ALARM_49 int = 1049 + PERFORMANCE_TEST_ALARM_50 int = 1050 + RIC_RT_DISTRIBUTION_FAILED int = 8004 + TCP_CONNECTIVITY_LOST_TO_DBAAS int = 8005 + E2_CONNECTIVITY_LOST_TO_GNODEB int = 8006 + E2_CONNECTIVITY_LOST_TO_ENODEB int = 8007 + ACTIVE_ALARM_EXCEED_MAX_THRESHOLD int = 8008 + ALARM_HISTORY_EXCEED_MAX_THRESHOLD int = 8009 ) type AlarmDefinition struct { - AlarmId int - AlarmText string - EventType string - OperationInstructions string + AlarmId int `json:"alarmid"` + AlarmText string `json:"alarmtext"` + EventType string `json:"eventtype"` + OperationInstructions string `json:"operationinstructions"` } -var RICAlarmDefinitions = map[int]AlarmDefinition{ - RIC_RT_DISTRIBUTION_FAILED: AlarmDefinition{ - AlarmId: RIC_RT_DISTRIBUTION_FAILED, - AlarmText: "RIC ROUTING TABLE DISTRIBUTION FAILED", - EventType: "Processing error", - OperationInstructions: "Not defined", - }, - TCP_CONNECTIVITY_LOST_TO_DBAAS: AlarmDefinition{ - AlarmId: TCP_CONNECTIVITY_LOST_TO_DBAAS, - AlarmText: "TCP CONNECTIVITY LOST TO DBAAS", - EventType: "Communication error", - OperationInstructions: "Not defined", - }, - E2_CONNECTIVITY_LOST_TO_GNODEB: AlarmDefinition{ - AlarmId: E2_CONNECTIVITY_LOST_TO_GNODEB, - AlarmText: "E2 CONNECTIVITY LOST TO G-NODEB", - EventType: "Communication error", - OperationInstructions: "Not defined", - }, - E2_CONNECTIVITY_LOST_TO_ENODEB: AlarmDefinition{ - AlarmId: E2_CONNECTIVITY_LOST_TO_ENODEB, - AlarmText: "E2 CONNECTIVITY LOST TO E-NODEB", - EventType: "Communication error", - OperationInstructions: "Not defined", - }, -} +var RICAlarmDefinitions map[int]*AlarmDefinition +var RICPerfAlarmObjects map[int]*Alarm + +const ( + ALARM_MANAGER_HTTP_URL string = "http://service-ricplt-alarmmanager-http.ricplt:8080" + ALARM_MANAGER_RMR_URL string = "service-ricplt-alarmmanager-rmr.ricplt:4560" +)