blob: 98513c393fa75c739bc0e779f39ed321686f58b2 [file] [log] [blame]
Ankur Upadhyaya71795a32023-04-17 10:05:47 +05301..
2 SPDX-FileCopyrightText: 2023-present Intel Corporation
3 SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
4 SPDX-License-Identifier: Apache-2.0
5
6.. _design_metricfunc:
7
8Metric Function Design Overview
9===============================
10
11.. image:: ../_static/images/Metric_Func_Arch.png
12 :width: 500px
13
14Metric-Function
15---------------
16
17The Metric Function act as an aggregator and processor of metrics received from different 5G Network Functions.
18Currently, only SMF and AMF publishes metrics to the Metric Function as of this release.
19
20The Metric Function provides following features
21
22* API Service exposure
23 It provides APIs to fetch various metrics as mentioned below
24 * GetSubscriberAll (/nmetric-func/v1/subscriber/all)
25 * GetSubscriberSummary (/nmetric-func/v1/subscriber/<imsi>)
26 * GetNfStatus (/nmetric-func/v1/nfstatus/<GNB/UPF>)
27 * GetNfServiceStats (/nmetric-func/v1/nfServiceStatsSummary/<AMF/SMF>) (not supported in this release)
28 * GetNfServiceStatsAll (/nmetric-func/v1/nfServiceStats/all) (not supported in this release)
29* Prometheus Client exposure
30 * It exposes Prometheus client interface for metrics scraping via Prometheus server
31* Analytics Function exposure(not supported in this release)
32 * It shall push events to configured Analytics Function.
33
34
35Sample output from API Service
36------------------------------
37* GetSubscriberAll (/nmetric-func/v1/subscriber/all)
38
39 .. code-block::
40
41 http://<metricfunc-pod-ip>:9301/nmetric-func/v1/subscriber/all
42
43 ["imsi-208930100007487","imsi-208930100007488","imsi-208930100007489","imsi-208930100007490","imsi-208930100007491"]
44
45
46* GetSubscriberSummary (/nmetric-func/v1/subscriber/<imsi>)
47
48 .. code-block::
49
50 http://<metricfunc-pod-ip>:9301/nmetric-func/v1/subscriber/imsi-208930100007487
51 {
52 "imsi":"imsi-208930100007487",
53 "smfId":"urn:uuid:c573621f-e198-4f67-988b-f7373e67601c","smfIp":"192.168.84.172",
54 "smfSubState":"Connected","ipaddress":"172.250.237.121","dnn":"internet","slice":"sd:010203 sst:1",
55 "upfid":"upf","upfAddr":"192.168.85.188",
56 "amfId":"b17f4726-4809-43e6-b5b6-afa0fc72807b","guti":"20893cafe00002647e6","tmsi":2508774,"amfngapId":2508775,
57 "ranngapId":3405774848,"amfSubState":"Registered","gnbid":"208:93:000102","tacid":"000001","amfIp":"192.168.84.159"
58 }
59
60* GetNfStatus (/nmetric-func/v1/nfstatus/<GNB/UPF>)
61
62 .. code-block::
63
64 http://<metricfunc-pod-ip>:9301/nmetric-func/v1/nfstatus/UPF
65 [
66 {"nfType":"UPF","nfStatus":"Connected","nfName":"upf-1"},
67 {"nfType":"UPF","nfStatus":"Connected","nfName":"upf-2"}
68 ]
69
70 http://<metricfunc-pod-ip>:9301/nmetric-func/v1/nfstatus/GNB
71 [
72 {"nfType":"GNB","nfStatus":"Disconnected","nfName":"208:93:000112"},
73 {"nfType":"GNB","nfStatus":"Disconnected","nfName":"208:93:000102"}
74 ]
75