open5gs/src/smf
Pau Espin 28e40a0f1b
Initial metrics support based on Prometheus (#1571)
* Initial metrics support based on Prometheus

This commit introduces initial support for metrics in open5gs.

The metrics code is added as libogsmetrics (lib/metrics/), with a well
defined opaque API to manage different types of metrics, allowing for
different implementations for different technologies to scrap the
metrics (placed as lib/metrics/<impl>/. The implementation is right now
selected at build time, in order to be able to opt-out the related dependencies
for users not interested in the features. 2 implementations are already
provided in this commit to start with:
* void: Default implementation. Empty stubs, acts as a NOOP.
* prometheus: open5gs processes become Prometheus servers, offering
  states through an http server to the Prometheus scrappers. Relies on
  libprom (prometheus-client-ci [1] project) to track the metrics and format
  them during export, and libmicrohttpd to make the export possible through
  HTTP.

[1] https://github.com/digitalocean/prometheus-client-c

The prometheus-client-c is not well maintained nowadays in upstream, and
furthermore it uses a quite peculiar mixture of build systems (autolib
on the main dir, cmake for libprom in a subdir). This makes it difficult
to have it widely available in distros, and difficult to find it if it
is installed in the system. Hence, the best is to include it as a
meson subproject like we already do for freeDiameter. An open5gs fork is
requried in order to have an extra patch adding a top-level
CMakeList.txt in order to be able to includ eit from open5gs's meson
build. Furthermore, this allows adding bugfixes to the subproject if any
are found in the future.

* [SMF] Initial metrics support

* [SMF] Add metrics at gtp_node level

* docs: Add tutorial documenting metrics with Prometheus
2022-06-08 05:51:02 +09:00
..
app.c Initial proposal CUPS using PFCP 2020-04-26 15:36:05 -04:00
binding.c [PFCP] Support Multi-CP with One-UP 2022-05-18 10:29:58 +09:00
binding.h X2 handover with SGW change (#1367, #1459) 2022-05-12 22:52:36 +09:00
context.c Initial metrics support based on Prometheus (#1571) 2022-06-08 05:51:02 +09:00
context.h Initial metrics support based on Prometheus (#1571) 2022-06-08 05:51:02 +09:00
event.c [SMF] Prevent concurrent access to ogs_pool allocating smf_event (#1546) 2022-05-20 05:57:27 +09:00
event.h Initial metrics support based on Prometheus (#1571) 2022-06-08 05:51:02 +09:00
fd-path.c [SMF] Improve 3GPP-User-Location-Info in Gn,Gx,Gy (#1539) 2022-05-17 10:29:11 +09:00
fd-path.h [SMF] Improve 3GPP-User-Location-Info in Gn,Gx,Gy (#1539) 2022-05-17 10:29:11 +09:00
gn-build.c GTP, SMF: More dec/enc improvements in QoS Profile IE MBR and GBRE fields (#1584) 2022-06-07 22:13:53 +09:00
gn-build.h Introduce Gn interface (GTPv1C) Support to PGW (#1351) 2022-02-18 22:23:45 +09:00
gn-handler.c GTP, SMF: More dec/enc improvements in QoS Profile IE MBR and GBRE fields (#1584) 2022-06-07 22:13:53 +09:00
gn-handler.h [SMF] Integrate session tear down cycle into sess->sm (#1500) 2022-04-20 21:42:18 +09:00
gsm-build.c [SMF] Optimiza Session Modification Message 2022-05-15 23:35:41 +09:00
gsm-build.h [SMF] Optimiza Session Modification Message 2022-05-15 23:35:41 +09:00
gsm-handler.c [PFCP] Support Multi-CP with One-UP 2022-05-18 10:29:58 +09:00
gsm-handler.h VoNR added but not tested! 2021-11-14 21:07:56 +09:00
gsm-sm.c [SMF] Avoid crash if Create{Session,PdpContext}Resp fails to be sent (#1566) 2022-05-31 21:27:42 +09:00
gtp-path.c Initial metrics support based on Prometheus (#1571) 2022-06-08 05:51:02 +09:00
gtp-path.h Initial metrics support based on Prometheus (#1571) 2022-06-08 05:51:02 +09:00
gx-handler.c [SMF] Integrate session tear down cycle into sess->sm (#1500) 2022-04-20 21:42:18 +09:00
gx-handler.h [SMF] Integrate session tear down cycle into sess->sm (#1500) 2022-04-20 21:42:18 +09:00
gx-path.c Fix AN-Trusted AVP sent in CCR (#1542) 2022-05-19 13:25:49 +09:00
gy-handler.c [PGW] Gy+PFCP improvements (#1555) 2022-05-24 22:54:30 +09:00
gy-handler.h [SMF] Integrate session tear down cycle into sess->sm (#1500) 2022-04-20 21:42:18 +09:00
gy-path.c [PGW] Gy+PFCP improvements (#1555) 2022-05-24 22:54:30 +09:00
init.c Initial metrics support based on Prometheus (#1571) 2022-06-08 05:51:02 +09:00
meson.build Initial metrics support based on Prometheus (#1571) 2022-06-08 05:51:02 +09:00
metrics.c Initial metrics support based on Prometheus (#1571) 2022-06-08 05:51:02 +09:00
metrics.h Initial metrics support based on Prometheus (#1571) 2022-06-08 05:51:02 +09:00
n4-build.c X2 handover with SGW change (#1367, #1459) 2022-05-12 22:52:36 +09:00
n4-build.h X2 handover with SGW change (#1367, #1459) 2022-05-12 22:52:36 +09:00
n4-handler.c [PGW] Gy+PFCP improvements (#1555) 2022-05-24 22:54:30 +09:00
n4-handler.h [SMF] Apply 5G Core into GSM (#1498) 2022-05-15 06:27:54 +09:00
namf-build.c VoNR added but not tested! 2021-11-14 21:07:56 +09:00
namf-build.h VoNR added but not tested! 2021-11-14 21:07:56 +09:00
namf-handler.c VoNR added but not tested! 2021-11-14 21:07:56 +09:00
namf-handler.h VoNR added but not tested! 2021-11-14 21:07:56 +09:00
nas-path.c Use HTTP/2 instead of HTTP/1.1 in 5G Core SBI 2020-11-26 21:44:37 -05:00
nas-path.h Use HTTP/2 instead of HTTP/1.1 in 5G Core SBI 2020-11-26 21:44:37 -05:00
nf-sm.c Fix minor typos (#1554) 2022-05-24 21:01:54 +09:00
ngap-build.c [SMF] Optimiza Session Modification Message 2022-05-15 23:35:41 +09:00
ngap-build.h [SMF] Optimiza Session Modification Message 2022-05-15 23:35:41 +09:00
ngap-handler.c [PFCP] Support Multi-CP with One-UP 2022-05-18 10:29:58 +09:00
ngap-handler.h [5GC] Service Request Race Condition(#1226) 2021-11-28 20:54:51 +09:00
ngap-path.c [ALL] Add protection of message encoding (#991) 2021-05-16 12:22:10 +09:00
ngap-path.h Use HTTP/2 instead of HTTP/1.1 in 5G Core SBI 2020-11-26 21:44:37 -05:00
nnrf-build.c Add more memory log 2021-06-06 22:35:46 +09:00
nnrf-build.h arch: DB schema Changes (#796) 2021-03-08 21:25:09 +09:00
nnrf-handler.c Need to increase NF ref_count 2022-03-01 22:02:02 +09:00
nnrf-handler.h fix: update NRF issues (#727,#728,#729,#730) 2020-12-24 15:41:31 -05:00
npcf-build.c SBI updated 2021-07-16 17:02:33 +09:00
npcf-build.h [5GC] Added BSF(Binding Support Function) 2021-05-29 15:56:12 +09:00
npcf-handler.c [SMF] Apply 5G Core into GSM (#1498) 2022-05-15 06:27:54 +09:00
npcf-handler.h [SMF] Apply 5G Core into GSM (#1498) 2022-05-15 06:27:54 +09:00
nsmf-handler.c [PFCP] Support Multi-CP with One-UP 2022-05-18 10:29:58 +09:00
nsmf-handler.h Use HTTP/2 instead of HTTP/1.1 in 5G Core SBI 2020-11-26 21:44:37 -05:00
nudm-build.c arch: DB schema Changes (#796) 2021-03-08 21:25:09 +09:00
nudm-build.h Add only one 5GC scenario (call-flow) 2020-06-17 01:22:28 -04:00
nudm-handler.c Change handling of SessionManagementSubscriptionData as an array (#1551) 2022-05-20 17:33:49 +09:00
nudm-handler.h Use HTTP/2 instead of HTTP/1.1 in 5G Core SBI 2020-11-26 21:44:37 -05:00
pfcp-path.c [PGW] Gy+PFCP improvements (#1555) 2022-05-24 22:54:30 +09:00
pfcp-path.h [PGW] Gy+PFCP improvements (#1555) 2022-05-24 22:54:30 +09:00
pfcp-sm.c X2 handover with SGW change (#1367, #1459) 2022-05-12 22:52:36 +09:00
s5c-build.c X2 handover with SGW change (#1367, #1459) 2022-05-12 22:52:36 +09:00
s5c-build.h X2 handover with SGW change (#1367, #1459) 2022-05-12 22:52:36 +09:00
s5c-handler.c [PFCP] Support Multi-CP with One-UP 2022-05-18 10:29:58 +09:00
s5c-handler.h X2 handover with SGW change (#1367, #1459) 2022-05-12 22:52:36 +09:00
s6b-path.c [SMF] Integrate session tear down cycle into sess->sm (#1500) 2022-04-20 21:42:18 +09:00
sbi-path.c VoNR added but not tested! 2021-11-14 21:07:56 +09:00
sbi-path.h Add more memory log 2021-06-06 22:35:46 +09:00
smf-sm.c Initial metrics support based on Prometheus (#1571) 2022-06-08 05:51:02 +09:00
smf-sm.h [SMF] Apply 5G Core into GSM (#1498) 2022-05-15 06:27:54 +09:00
timer.c [SMF] Remove T_RELEASE_HOLDING timer 2022-03-17 16:07:19 +09:00
timer.h [SMF] Remove T_RELEASE_HOLDING timer 2022-03-17 16:07:19 +09:00