open5gs/lib/sbi
Gaber Stare 0c2a3b0f39 [PCF] Add metrics support
Expose metrics with labels according to ETSI TS 128 552 V16.13.0 in
PCF by using hash.

The metrics are named respecting the rule:
<generation>_<measurement_object_class>_<measurement_family_name>_<metric_name_as_in_TS_128_552>

Since slice itself is not unique, the plmnid label is exposed in
addition to snssai.

AM policy:
fivegs_pcffunction_pa_policyamassoreq and
fivegs_pcffunction_pa_policyamassosucc do not expose snssai label
since it is not available at the time of exposure.
plmnid is defined during AM policy processing, so not to lose the
difference to ...succ, the basic metric
fivegs_pcffunction_pa_policyamassoreq is preserved.

SM policy:
snssai is defined during SM policy processing, so not to lose the
difference to ...succ, the basic metric
fivegs_pcffunction_pa_policysmassoreq is preserved.

Those 2 basic metrics retain their position but are exposed with empty
labels.
Metrics with labels are called later, when the label values are known.

Exposed metrics example:
-standard counters:
fivegs_pcffunction_pa_policyamassoreq{plmnid=""} 3
fivegs_pcffunction_pa_policyamassoreq{plmnid="99970"} 3
fivegs_pcffunction_pa_policyamassosucc{plmnid="99970"} 3
fivegs_pcffunction_pa_policysmassoreq{plmnid="",snssai=""} 3
fivegs_pcffunction_pa_policysmassoreq{plmnid="99970",snssai="1000009"} 3
fivegs_pcffunction_pa_policysmassosucc{plmnid="99970",snssai="1000009"} 3

-nonstandard gauge (added for controlling purposes -
same metric as existing metric on AMF and SMF):
fivegs_pcffunction_pa_sessionnbr{plmnid="99970",snssai="1000009"} 0
2022-12-06 22:57:24 +09:00
..
contrib Add only one 5GC scenario (call-flow) 2020-06-17 01:22:28 -04:00
custom OpenAPI: Generate patch_item.[ch] from OpenAPI specifications 2022-11-24 17:30:38 +09:00
openapi OpenAPI: Add functions OpenAPI_list_clear and OpenAPI_list_insert_prev 2022-11-29 23:10:49 +09:00
support/20210629 OpenAPI: Add functions OpenAPI_list_clear and OpenAPI_list_insert_prev 2022-11-29 23:10:49 +09:00
client.c Follow-up on #1865 2022-11-12 09:37:43 +09:00
client.h Follow-up on #1865 2022-11-12 09:37:43 +09:00
context.c Fixed crash after 48 hours of running (#1893) 2022-11-18 23:28:35 +09:00
context.h Prometheus metrics set to default 2022-11-21 22:06:29 +09:00
conv.c [PCF] Add metrics support 2022-12-06 22:57:24 +09:00
conv.h [PCF] Add metrics support 2022-12-06 22:57:24 +09:00
meson.build OpenAPI: Generate patch_item.[ch] from OpenAPI specifications 2022-11-24 17:30:38 +09:00
message.c [SBI] Case-Insensitive inside MIME message (#1939) 2022-12-05 21:30:24 +09:00
message.h SCP(Model D) is now the default setting. 2022-10-22 11:26:04 +09:00
mhd-server.c [CORE] Check if timer is double free in SBI module 2022-09-03 15:59:39 +09:00
nf-sm.c Fixed crash after 48 hours of running (#1893) 2022-11-18 23:28:35 +09:00
nf-sm.h SCP(Model D) is now the default setting. 2022-10-22 11:26:04 +09:00
nghttp2-server.c [SBI] Introduced HTTP2-TLS based on #1865 2022-11-12 10:47:18 +09:00
nnrf-build.c Follow-up on #1876 2022-11-04 14:58:47 +09:00
nnrf-build.h SCP(Model D) is now the default setting. 2022-10-22 11:26:04 +09:00
nnrf-handler.c Follow-up on #1865 2022-11-12 09:37:43 +09:00
nnrf-handler.h SCP(Model D) is now the default setting. 2022-10-22 11:26:04 +09:00
nnrf-path.c Fixed crash after 48 hours of running (#1893) 2022-11-18 23:28:35 +09:00
nnrf-path.h Fixed crash after 48 hours of running (#1893) 2022-11-18 23:28:35 +09:00
ogs-sbi.h OpenAPI: Generate patch_item.[ch] from OpenAPI specifications 2022-11-24 17:30:38 +09:00
path.c Follow-up on #1865 2022-11-12 09:37:43 +09:00
path.h SCP(Model D) is now the default setting. 2022-10-22 11:26:04 +09:00
server.c Follow-up on #1865 2022-11-12 09:37:43 +09:00
server.h Follow-up on #1865 2022-11-12 09:37:43 +09:00
timer.c [NRF] Fixed library load error 2022-08-26 10:57:11 +09:00
timer.h Move src/../nf-sm.[ch] to lib/sbi/nf-sm.[ch] 2022-08-12 14:03:53 +09:00
types.c [SBI] Support service-names in discovery option 2022-08-27 00:12:22 +09:00
types.h [SBI] Support service-names in discovery option 2022-08-27 00:12:22 +09:00
yuarel.c Added NRF 2020-05-18 17:00:37 -04:00
yuarel.h Added NRF 2020-05-18 17:00:37 -04:00