Merge "[DCAE] INFO.yaml update"
[dcaegen2.git] / docs / sections / services / kpi-computation-ms / kpi_computation_ms_overview.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0
2    International License. http://creativecommons.org/licenses/by/4.0
3
4 .. _docs_kpi_computation_ms_overview:
5
6 Introduction
7 """"""""""""
8
9 **Kpi Computation MS** is a software component of ONAP that does calucaltion in accordance with the formula defined dynamically. The service include the features:
10     Subscribe original PM data from DMaaP.
11     Do KPI computation based on KPI formula which can be got from config policies and the formula can be configued dynamically.
12     Publish KPI results on DMaaP.
13     Receive request for specific KPI computation (future scope) on specific ‘objects’ (e.g., S-NSSAI, Service).
14
15 Architecture
16 ------------
17 The internal architecture of Kpi Computation MS is shown below.
18
19 .. image:: ./arch.PNG
20
21 Functionality
22 """""""""""""
23 Kpi Computation MS will do calculation based on the PM data that is VES format. publish KPI result as VES events on a DMaaP Message Router topic for consumers that prefer such data in VES format.
24 Kpi Computation MS receives PM data by subscribing to a Message Router topic.
25
26 Flows:
27 1. KPI Computation MS will get PM data VES format from DMaaP
28 2. Other modules (e.g., SO/OOF/Slice Analysis MS) can also request KPI-MS for KPI calculation (Future scope beyond H-release).
29 3. KPI Computation MS will support for periodical KPI Computation. Period may be specified by a requestor optionally, if nothing is specified, KPI computation MS will continue computation until an explicit stop trigger is received.
30 4. The KPI result which genertate by kpi computation will be published to DMaaP.
31
32 Verification
33 """"""""""""
34 Publish a file to the PM-Mapper using the following example curl:
35     curl -k -X PUT https://dcae-pm-mapper:8443/delivery/<filename> -H 'X-DMAAP-DR-META:{"productName": "AcmeNode","vendorName": "Acme","lastEpochMicrosec": "1538478000000","sourceName": "oteNB5309","startEpochMicrosec": "1538478900000","timeZoneOffset": "UTC+05:00","location": "ftpes://127.0.0.1:22/ftp/rop/A20161224.1045-1100.bin.gz","compression": "gzip","fileFormatType": "org.3GPP.32.435#measCollec","fileFormatVersion": "V9"}' -H "Content-Type:application/xml" --data-binary @<filename> -H 'X-ONAP-RequestID: 12345' -H 'X-DMAAP-DR-PUBLISH-ID: 12345'
36
37 Example type A file:
38     <?xml version="1.0" encoding="utf-8"?>
39     <measCollecFile xmlns="http://www.3gpp.org/ftp/specs/archive/32_series/32.435#measCollec">
40       <fileHeader dnPrefix="www.google.com" vendorName="CMCC" fileFormatVersion="32.435 V10.0">
41         <fileSender localDn="some sender name"/>
42         <measCollec beginTime="2020-06-02T12:00:00Z"/>
43       </fileHeader>
44       <measData>
45         <managedElement swVersion="r0.1" localDn="UPFMeasurement"/>
46         <measInfo measInfoId="UPFFunction0">
47           <job jobId="job10"/>
48           <granPeriod endTime="2020-06-02T12:15:00Z" duration="PT900S"/>
49           <repPeriod duration="PT900S"/>
50           <measType p="1">GTP.InDataOctN3UPF.08_010101</measType>
51           <measType p="2">GTP.OutDataOctN3UPF.08_010101</measType>
52           <measValue measObjLdn="some measObjLdn">
53             <r p="1">10</r>
54             <r p="2">20</r>
55             <suspect>false</suspect>
56           </measValue>
57         </measInfo>
58         <measInfo measInfoId="UPFFunction1">
59           <job jobId="job10"/>
60           <granPeriod endTime="2020-06-02T12:15:00Z" duration="PT900S"/>
61           <repPeriod duration="PT900S"/>
62           <measType p="1">GTP.InDataOctN3UPF.08_010101</measType>
63           <measType p="2">GTP.OutDataOctN3UPF.08_010101</measType>
64           <measValue measObjLdn="some measObjLdn">
65             <r p="1">30</r>
66             <r p="2">40</r>
67             <suspect>false</suspect>
68           </measValue>
69         </measInfo>
70       </measData>
71       <fileFooter>
72         <measCollec endTime="2020-06-02T12:15:00Z"/>
73       </fileFooter>
74     </measCollecFile>
75
76 Curl the topic on Message Router to retrieve the published event:
77
78     curl -k https://message-router:3905/events/unauthenticated.DCAE_KPI_OUTPUT/$ConsumerGroup/$ID
79
80 Example message output:
81     {
82       "event": {
83         "commonEventHeader": {
84           "domain": "perf3gpp",
85           "eventId": "432fa910-feed-4c64-9532-bd63201080d8",
86           "eventName": "perf3gpp_AcmeNode-Acme_pmMeasResult",
87           "lastEpochMicrosec": 1591100100000,
88           "priority": "Normal",
89           "reportingEntityName": "",
90           "sequence": 0,
91           "sourceName": "oteNB5309",
92           "startEpochMicrosec": 1591099200000,
93           "version": 4.0,
94           "vesEventListenerVersion": "7.1",
95           "timeZoneOffset": "UTC+05:00"
96         },
97         "perf3gppFields": {
98           "perf3gppFieldsVersion": "1.0",
99           "measDataCollection": {
100             "granularityPeriod": 1591100100000,
101             "measuredEntityUserName": "",
102             "measuredEntityDn": "UPFMeasurement",
103             "measuredEntitySoftwareVersion": "r0.1",
104             "measInfoList": [{
105               "measInfoId": {
106                 "sMeasTypesList": "SLICE"
107               },
108               "measTypes": {
109                 "sMeasTypesList": ["UpstreamThr08_010101"]
110               },
111               "measValuesList": [{
112                 "suspectFlag": false,
113                 "measResults": [{
114                   "p": 1,
115                   "sValue": "40"
116                 }]
117               }]
118             }]
119           }
120         }
121       }
122     }
123
124 Interaction
125 """""""""""
126 Kpi Computation MS interacts with the Config Binding Service to get configuration information.