Add liveness probe
[ric-plt/vespamgr.git] / README.md
1 # RIC VESPA manager
2
3 The VESPA manager uses the VES Agent (https://github.com/nokia/ONAP-VESPA)
4 to adapt near-RT RIC internal statistics' collection using Prometheus 
5 (xApps and platform containers) to ONAP's VES (VNF event streaming).
6
7 The vesmgr container runs two processes: the VESPA manager and the VES
8 Agent (i.s. VESPA).
9
10 The VESPA manager starts and configures the VES Agent.
11
12 The VES Agent is a service acting as a bridge between Prometheus and 
13 ONAP's VES Collector.
14
15 # Application metrics definition
16
17 The application metrics are defined in the application descriptor.
18 For each counter, the following fields are required in the "metrics" 
19 section of the descriptor:
20
21 * name - Prometheus name of the counter
22 * objectName - object name in VES
23 * objectInstance - object instance in VE
24
25 The VESPA manager receives the application metrics configuration from the
26 application manager. It subscribes the app notification messages from the 
27 application manager, and after having received one, requests the latest
28 application configuration, creates the VES Agent configuration based on it,
29 and restarts the VES Agent.
30
31 The VES Agent does not report any other metrics to VES.
32
33 # Prometheus configuration
34
35 The VES Agent reads the ricComponentName from Prometheus label
36 "kubernetes_name".
37
38 # VES Collector event format
39
40 The VES Agent transmits events to the VES Collector in the 
41 VES Common Event Format v5.4.1. 
42 The Common Event Format is expressed in JSON schema v28.4.1.
43
44 VES Event Listener 5.4.1:
45 <https://docs.onap.org/en/casablanca/submodules/vnfsdk/model.git/docs/files/VESEventListener.html>
46
47 JSON schema v28.4.1:
48 <https://github.com/nokia/ONAP-VESPA/blob/8e9d9e93bb00bed0f5402c9de9502385d5e80acc/doc/CommonEventFormat_28.4.1.json>
49
50 # Environment variables
51
52 The VESPA manager container requires the following environment variables:
53
54 * VESMGR_HB_INTERVAL - VES heartbeat interval as a string. For example: 30s.
55 * VESMGR_MEAS_INTERVAL - Measurement interval as a string. For example: 60s.
56 * VESMGR_PROMETHEUS_ADDR - Prometheus address. For example: http://127.0.0.1:123
57
58
59 * VESMGR_PRICOLLECTOR_ADDR - Primary collector FQDN as a string. For example: ricaux-entry.
60 * VESMGR_PRICOLLECTOR_PORT - Primary collector port id as an integer. Default: 8443.
61 * VESMGR_PRICOLLECTOR_SERVERROOT - Path before the /eventListener part of the POST URL as a string.
62 * VESMGR_PRICOLLECTOR_TOPIC - Primary collector topic as a string.
63 * VESMGR_PRICOLLECTOR_SECURE - Use HTTPS for VES collector. Possible string values: true or false.
64 * VESMGR_PRICOLLECTOR_USER - User name as a string.
65 * VESMGR_PRICOLLECTOR_PASSWORD - Password as a string.
66 * VESMGR_PRICOLLECTOR_PASSPHASE - Passphrase as a string.
67
68
69 * VESMGR_APPMGRDOMAIN - Application manager domain. This is for testing purposes, only. Default: service-ricplt-appmgr-http.ricplt.svc.cluster.local.
70
71 # Liveness probe
72
73 The VESPA manager replies to liveness HTTP GET at path /supervision.
74
75 # Unit Tests
76
77 In order to run the VESPA manager unit tests, give the following command:
78
79 ```
80 go test ./... -v
81 ```
82
83 # License
84
85 See [LICENSES.txt](LICENSES.txt) file.