From 267b90952fcc7ce831d21631692543d27c1c5f76 Mon Sep 17 00:00:00 2001 From: Abukar Mohamed Date: Tue, 17 Mar 2020 14:00:18 +0000 Subject: [PATCH] Add AlertManager bind address Change-Id: I3116e3f556f12e88b68096d8da78e1a0de30450c Signed-off-by: Abukar Mohamed --- README.md | 1 + cmd/vesmgr/subscribexAPPNotifications.go | 2 +- cmd/vesmgr/vesmgr.go | 5 +++-- container-tag.yaml | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f8c3cbf..b891212 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,7 @@ The VESPA manager container requires the following environment variables: * VESMGR_HB_INTERVAL - VES heartbeat interval as a string. For example: 30s. * VESMGR_MEAS_INTERVAL - Measurement interval as a string. For example: 60s. * VESMGR_PROMETHEUS_ADDR - Prometheus address. For example: http://127.0.0.1:123 +* VESMGR_ALERTMANAGER_BIND_ADDR - Bind address to receive alerts from Prometheus AlertManager * VESMGR_PRICOLLECTOR_ADDR - Primary collector FQDN as a string. For example: ricaux-entry. * VESMGR_PRICOLLECTOR_PORT - Primary collector port id as an integer. Default: 8443. diff --git a/cmd/vesmgr/subscribexAPPNotifications.go b/cmd/vesmgr/subscribexAPPNotifications.go index df12b93..c87a0a3 100644 --- a/cmd/vesmgr/subscribexAPPNotifications.go +++ b/cmd/vesmgr/subscribexAPPNotifications.go @@ -65,7 +65,7 @@ func subscribexAppNotifications(targetURL string, subscriptions chan subscriptio func subscribexAppNotificationsClientDo(req *http.Request, client *http.Client) (string, error) { resp, err := client.Do(req) if err != nil { - logger.Error("Posting subscriptions failed: %s", err) + logger.Error("Posting subscriptions failed: %v", err) return "", errPostingFailed } defer resp.Body.Close() diff --git a/cmd/vesmgr/vesmgr.go b/cmd/vesmgr/vesmgr.go index dfe9864..0e775f8 100755 --- a/cmd/vesmgr/vesmgr.go +++ b/cmd/vesmgr/vesmgr.go @@ -112,7 +112,7 @@ func (vesmgr *VesMgr) subscribeXAppNotifications() { // Init initializes the vesmgr func (vesmgr *VesMgr) Init(listenPort string) *VesMgr { logger.Info("vesmgrInit") - logger.Info("version %s (%s)", Version, Hash) + logger.Info("version: %s (%s)", Version, Hash) var err error if vesmgr.myIPAddress, err = getMyIP(); err != nil || vesmgr.myIPAddress == "" { @@ -138,7 +138,8 @@ func (vesmgr *VesMgr) Init(listenPort string) *VesMgr { vesmgr.httpServer.init(vesmgr.myIPAddress + ":" + listenPort) vesmgr.vesagent = makeRunner("ves-agent", "-i", os.Getenv("VESMGR_HB_INTERVAL"), "-m", os.Getenv("VESMGR_MEAS_INTERVAL"), "--Measurement.Prometheus.Address", - os.Getenv("VESMGR_PROMETHEUS_ADDR")) + os.Getenv("VESMGR_PROMETHEUS_ADDR"), "--AlertManager.Bind", os.Getenv("VESMGR_ALERTMANAGER_BIND_ADDR"), + "--Debug") return vesmgr } diff --git a/container-tag.yaml b/container-tag.yaml index 7cd5ae0..83cd94a 100644 --- a/container-tag.yaml +++ b/container-tag.yaml @@ -1,4 +1,4 @@ # The Jenkins job uses this string for the tag in the image name # for example nexus3.o-ran-sc.org:10004/my-image-name:0.0.1 --- -tag: 0.0.9 +tag: 0.4.0 -- 2.16.6