X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=alarm%2Ftypes.go;h=5a70f18e26c4a67265af1bc48dca5c274a2d8911;hb=4cedd5020e5c7ba0383156f9929ab3db986c0593;hp=dc77d437de6c2296b9500baa8f8e351005f012c3;hpb=121e8b6026904eb245c6f8ac805efa7c3dad3ae5;p=ric-plt%2Falarm-go.git diff --git a/alarm/types.go b/alarm/types.go index dc77d43..5a70f18 100755 --- a/alarm/types.go +++ b/alarm/types.go @@ -67,6 +67,11 @@ 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 @@ -84,45 +89,22 @@ 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 + 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: { - AlarmId: RIC_RT_DISTRIBUTION_FAILED, - AlarmText: "RIC ROUTING TABLE DISTRIBUTION FAILED", - EventType: "Processing error", - OperationInstructions: "Not defined", - }, - TCP_CONNECTIVITY_LOST_TO_DBAAS: { - AlarmId: TCP_CONNECTIVITY_LOST_TO_DBAAS, - AlarmText: "TCP CONNECTIVITY LOST TO DBAAS", - EventType: "Communication error", - OperationInstructions: "Not defined", - }, - E2_CONNECTIVITY_LOST_TO_GNODEB: { - AlarmId: E2_CONNECTIVITY_LOST_TO_GNODEB, - AlarmText: "E2 CONNECTIVITY LOST TO G-NODEB", - EventType: "Communication error", - OperationInstructions: "Not defined", - }, - E2_CONNECTIVITY_LOST_TO_ENODEB: { - AlarmId: E2_CONNECTIVITY_LOST_TO_ENODEB, - AlarmText: "E2 CONNECTIVITY LOST TO E-NODEB", - EventType: "Communication error", - OperationInstructions: "Not defined", - }, -} +var RICAlarmDefinitions map[int]*AlarmDefinition const ( ALARM_MANAGER_HTTP_URL string = "http://service-ricplt-alarmmanager-http.ricplt:8080"