Add AlertManager bind address 27/2827/2 v0.4.1
authorAbukar Mohamed <abukar.mohamed@nokia.com>
Tue, 17 Mar 2020 14:00:18 +0000 (14:00 +0000)
committerAbukar Mohamed <abukar.mohamed@nokia.com>
Tue, 17 Mar 2020 14:25:11 +0000 (14:25 +0000)
Change-Id: I3116e3f556f12e88b68096d8da78e1a0de30450c
Signed-off-by: Abukar Mohamed <abukar.mohamed@nokia.com>
README.md
cmd/vesmgr/subscribexAPPNotifications.go
cmd/vesmgr/vesmgr.go
container-tag.yaml

index f8c3cbf..b891212 100644 (file)
--- 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.
index df12b93..c87a0a3 100644 (file)
@@ -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()
index dfe9864..0e775f8 100755 (executable)
@@ -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
 }
 
index 7cd5ae0..83cd94a 100644 (file)
@@ -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