Configure xApp metrics in xApp description 60/960/3
authorKatri Turunen <katri.turunen@nokia.com>
Mon, 16 Sep 2019 05:48:18 +0000 (08:48 +0300)
committerKatri Turunen <katri.turunen@nokia.com>
Mon, 16 Sep 2019 10:58:33 +0000 (13:58 +0300)
commit412df96a23a30a82d2a031556888aeaf9604ada8
tree06da108f846423881a520ce1d8a45f9effb11110
parent66b7813221b6da5c15da40953d09d3846a4bc029
Configure xApp metrics in xApp description

Vesmgr subscribes the xApp notifications from xAppMgr. When it
receives a notification, it requests the xApp config from xAppMgr,
creates the VESPA configuration according to it, and restarts
VESPA with the new configuration.

The xApp counters should be defined in the xApp descriptor.
Vesmgr reads the counter definitions from section config->metrics.
The following fields are required:

* name - Prometheus name of the counter
* objectName - Ves collector object name
* objectInstance - Ves collector object instance

If the same counter name is defined by several xApps,
vesmgr makes the configuration based on the first definition
and ignores the latter ones, if they are conflicting.
However, VESPA reports all counters to Ves collector regardless
of the xApp exposing them.

VESPA reads the ricComponentName from Prometheus label
"kubernetes_name".

There are no more hard-coded metrics configured in this version.

Change-Id: I746c6941cebe686165aed97e223b0ec0e9c7a679
Signed-off-by: Katri Turunen <katri.turunen@nokia.com>
13 files changed:
README.md
cmd/vesmgr/config.go
cmd/vesmgr/config_test.go
cmd/vesmgr/httpserver.go [new file with mode: 0644]
cmd/vesmgr/httpserver_test.go [new file with mode: 0644]
cmd/vesmgr/subscribexAPPNotifications.go [new file with mode: 0644]
cmd/vesmgr/subscribexAPPNotifications_test.go [new file with mode: 0644]
cmd/vesmgr/vesmgr.go
cmd/vesmgr/vesmgr_queryxappssttus_test.go [new file with mode: 0644]
cmd/vesmgr/vesmgr_test.go
go.sum
test/xApp_config_test_output.json [new file with mode: 0644]
ves-agent-chart/templates/deployment.yaml