echo "--> build_ubuntu.sh starts"
# Install RMR from deb packages at packagecloud.io
-rmr=rmr_4.1.2_amd64.deb
-wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/$rmr/download.deb
+rmr=rmr_4.4.4_amd64.deb
+wget --content-disposition https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch/$rmr/download.deb
sudo dpkg -i $rmr
rm $rmr
-rmrdev=rmr-dev_4.1.2_amd64.deb
-wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/$rmrdev/download.deb
+rmrdev=rmr-dev_4.4.4_amd64.deb
+wget --content-disposition https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch/$rmrdev/download.deb
sudo dpkg -i $rmrdev
rm $rmrdev
github.com/gorilla/mux v1.7.1
github.com/jedib0t/go-pretty v4.3.0+incompatible
github.com/mattn/go-runewidth v0.0.9 // indirect
+ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
+ github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/prometheus/alertmanager v0.20.0
github.com/spf13/viper v1.6.2
github.com/stretchr/testify v1.5.1
func (a *AlarmManager) ConfigChangeCB(configparam string) {
a.maxActiveAlarms = app.Config.GetInt("controls.maxActiveAlarms")
+ if a.maxActiveAlarms == 0 {
+ a.maxActiveAlarms = 5000
+ }
+
a.maxAlarmHistory = app.Config.GetInt("controls.maxAlarmHistory")
+ if a.maxAlarmHistory == 0 {
+ a.maxAlarmHistory = 20000
+ }
+
a.alertInterval = viper.GetInt("controls.promAlertManager.alertInterval")
a.amHost = viper.GetString("controls.promAlertManager.address")
amHost = viper.GetString("controls.promAlertManager.address")
}
+ maxActiveAlarms := app.Config.GetInt("controls.maxActiveAlarms")
+ if maxActiveAlarms == 0 {
+ maxActiveAlarms = 5000
+ }
+
+ maxAlarmHistory := app.Config.GetInt("controls.maxAlarmHistory")
+ if maxAlarmHistory == 0 {
+ maxAlarmHistory = 20000
+ }
+
return &AlarmManager{
rmrReady: false,
postClear: clearAlarm,
activeAlarms: make([]AlarmNotification, 0),
alarmHistory: make([]AlarmNotification, 0),
uniqueAlarmId: 0,
- maxActiveAlarms: app.Config.GetInt("controls.maxActiveAlarms"),
- maxAlarmHistory: app.Config.GetInt("controls.maxAlarmHistory"),
+ maxActiveAlarms: maxActiveAlarms,
+ maxAlarmHistory: maxAlarmHistory,
exceededActiveAlarmOn: false,
exceededAlarmHistoryOn: false,
alarmInfoPvFile: app.Config.GetString("controls.alarmInfoPvFile"),