diff --git a/dockerfile/Dockerfile b/dockerfile/Dockerfile index 4528319..bff0750 100644 --- a/dockerfile/Dockerfile +++ b/dockerfile/Dockerfile @@ -14,7 +14,7 @@ RUN apt-get update \ WORKDIR /open5gs -RUN git clone -b v2.6.6 https://github.com/open5gs/open5gs . +RUN git clone -b upf-metrics https://github.com/niloysh/open5gs . RUN meson build --prefix=/open5gs/install \ && ninja -C build \ diff --git a/metrics/amf-metrics.txt b/metrics/amf-metrics.txt new file mode 100644 index 0000000..acb0e47 --- /dev/null +++ b/metrics/amf-metrics.txt @@ -0,0 +1,119 @@ +# HELP gnb gNodeBs +# TYPE gnb gauge +gnb 1 + +# HELP fivegs_amffunction_mm_confupdate Number of UE Configuration Update commands requested by the AMF +# TYPE fivegs_amffunction_mm_confupdate counter +fivegs_amffunction_mm_confupdate 2 + +# HELP fivegs_amffunction_rm_reginitreq Number of initial registration requests received by the AMF +# TYPE fivegs_amffunction_rm_reginitreq counter +fivegs_amffunction_rm_reginitreq 2 + +# HELP fivegs_amffunction_rm_regemergreq Number of emergency registration requests received by the AMF +# TYPE fivegs_amffunction_rm_regemergreq counter +fivegs_amffunction_rm_regemergreq 0 + +# HELP fivegs_amffunction_mm_paging5greq Number of 5G paging procedures initiated at the AMF +# TYPE fivegs_amffunction_mm_paging5greq counter +fivegs_amffunction_mm_paging5greq 0 + +# HELP fivegs_amffunction_rm_regperiodreq Number of periodic registration update requests received by the AMF +# TYPE fivegs_amffunction_rm_regperiodreq counter +fivegs_amffunction_rm_regperiodreq 0 + +# HELP fivegs_amffunction_mm_confupdatesucc Number of UE Configuration Update complete messages received by the AMF +# TYPE fivegs_amffunction_mm_confupdatesucc counter +fivegs_amffunction_mm_confupdatesucc 0 + +# HELP fivegs_amffunction_rm_reginitsucc Number of successful initial registrations at the AMF +# TYPE fivegs_amffunction_rm_reginitsucc counter +fivegs_amffunction_rm_reginitsucc 2 + +# HELP fivegs_amffunction_amf_authreject Number of authentication rejections sent by the AMF +# TYPE fivegs_amffunction_amf_authreject counter +fivegs_amffunction_amf_authreject 0 + +# HELP fivegs_amffunction_rm_regmobreq Number of mobility registration update requests received by the AMF +# TYPE fivegs_amffunction_rm_regmobreq counter +fivegs_amffunction_rm_regmobreq 0 + +# HELP amf_session AMF Sessions +# TYPE amf_session gauge +amf_session 2 + +# HELP fivegs_amffunction_rm_regmobsucc Number of successful mobility registration updates at the AMF +# TYPE fivegs_amffunction_rm_regmobsucc counter +fivegs_amffunction_rm_regmobsucc 0 + +# HELP fivegs_amffunction_amf_authreq Number of authentication requests sent by the AMF +# TYPE fivegs_amffunction_amf_authreq counter +fivegs_amffunction_amf_authreq 2 + +# HELP fivegs_amffunction_rm_regemergsucc Number of successful emergency registrations at the AMF +# TYPE fivegs_amffunction_rm_regemergsucc counter +fivegs_amffunction_rm_regemergsucc 0 + +# HELP fivegs_amffunction_mm_paging5gsucc Number of successful 5G paging procedures initiated at the AMF +# TYPE fivegs_amffunction_mm_paging5gsucc counter +fivegs_amffunction_mm_paging5gsucc 0 + +# HELP ran_ue RAN UEs +# TYPE ran_ue gauge +ran_ue 2 + +# HELP fivegs_amffunction_rm_regperiodsucc Number of successful periodic registration update requests at the AMF +# TYPE fivegs_amffunction_rm_regperiodsucc counter +fivegs_amffunction_rm_regperiodsucc 0 + +# HELP fivegs_amffunction_rm_regtime Time of registration procedure +# TYPE fivegs_amffunction_rm_regtime histogram + +# HELP fivegs_amffunction_rm_registeredsubnbr Number of registered state subscribers per AMF +# TYPE fivegs_amffunction_rm_registeredsubnbr gauge +fivegs_amffunction_rm_registeredsubnbr{plmnid="00101",snssai="2-000002"} 1 +fivegs_amffunction_rm_registeredsubnbr{plmnid="00101",snssai="1-000001"} 1 + +# HELP fivegs_amffunction_rm_reginitfail Number of failed initial registrations at the AMF +# TYPE fivegs_amffunction_rm_reginitfail counter + +# HELP fivegs_amffunction_rm_regmobfail Number of failed mobility registration updates at the AMF +# TYPE fivegs_amffunction_rm_regmobfail counter + +# HELP fivegs_amffunction_rm_regperiodfail Number of failed periodic registration update requests at the AMF +# TYPE fivegs_amffunction_rm_regperiodfail counter + +# HELP fivegs_amffunction_rm_regemergfail Number of failed emergency registrations at the AMF +# TYPE fivegs_amffunction_rm_regemergfail counter + +# HELP fivegs_amffunction_amf_authfail Number of authentication failure messages received by the AMF +# TYPE fivegs_amffunction_amf_authfail counter + +# HELP process_max_fds Maximum number of open file descriptors. +# TYPE process_max_fds gauge +process_max_fds 1048576 + +# HELP process_virtual_memory_max_bytes Maximum amount of virtual memory available in bytes. +# TYPE process_virtual_memory_max_bytes gauge +process_virtual_memory_max_bytes -1 + +# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds. +# TYPE process_cpu_seconds_total gauge +process_cpu_seconds_total 0 + +# HELP process_virtual_memory_bytes Virtual memory size in bytes. +# TYPE process_virtual_memory_bytes gauge +process_virtual_memory_bytes 232681472 + +# HELP process_resident_memory_bytes Resident memory size in bytes. +# TYPE process_resident_memory_bytes gauge +process_resident_memory_bytes 21626880 + +# HELP process_start_time_seconds Start time of the process since unix epoch in seconds. +# TYPE process_start_time_seconds gauge +process_start_time_seconds 95451151 + +# HELP process_open_fds Number of open file descriptors. +# TYPE process_open_fds gauge +process_open_fds 28 + diff --git a/metrics/smf-metrics-free5gc.txt b/metrics/smf-metrics-free5gc.txt new file mode 100644 index 0000000..d0585b6 --- /dev/null +++ b/metrics/smf-metrics-free5gc.txt @@ -0,0 +1,123 @@ +{ + "component": "SMF", + "level": "info", + "msg": "Log slice session info", + "slice-session-info": { + "Snssai": { + "SST": 1, + "SD": "000001" + }, + "PduSession": { + "SessionId": 1, + "DataNetworkName": "internet" + }, + "PFCPSession": { + "Fseid": { + "LocalSEID": 1, + "RemoteSEID": 0, + "IPAddress": "10.10.4.1" + }, + "PDRs": [ + { + "PDRId": 2, + "Fteid": { + "TEID": -1, + "GTPIPAddress": "" + }, + "UEIPAddress": "10.1.0.1" + }, + { + "PDRId": 1, + "Fteid": { + "TEID": 1, + "GTPIPAddress": "10.10.3.1" + }, + "UEIPAddress": "10.1.0.1" + } + ] + } + }, + "time": "2023-10-13T02:44:59Z" +} +{ + "component": "SMF", + "level": "info", + "msg": "Log slice session info", + "slice-session-info": { + "Snssai": { + "SST": 1, + "SD": "000001" + }, + "PduSession": { + "SessionId": 1, + "DataNetworkName": "internet" + }, + "PFCPSession": { + "Fseid": { + "LocalSEID": 2, + "RemoteSEID": 0, + "IPAddress": "10.10.4.1" + }, + "PDRs": [ + { + "PDRId": 3, + "Fteid": { + "TEID": 3, + "GTPIPAddress": "10.10.3.1" + }, + "UEIPAddress": "10.1.0.2" + }, + { + "PDRId": 4, + "Fteid": { + "TEID": -1, + "GTPIPAddress": "" + }, + "UEIPAddress": "10.1.0.2" + } + ] + } + }, + "time": "2023-10-13T02:47:44Z" +} +{ + "component": "SMF", + "level": "info", + "msg": "Log slice session info", + "slice-session-info": { + "Snssai": { + "SST": 1, + "SD": "000001" + }, + "PduSession": { + "SessionId": 1, + "DataNetworkName": "internet" + }, + "PFCPSession": { + "Fseid": { + "LocalSEID": 3, + "RemoteSEID": 0, + "IPAddress": "10.10.4.1" + }, + "PDRs": [ + { + "PDRId": 5, + "Fteid": { + "TEID": 5, + "GTPIPAddress": "10.10.3.1" + }, + "UEIPAddress": "10.1.0.3" + }, + { + "PDRId": 6, + "Fteid": { + "TEID": -1, + "GTPIPAddress": "" + }, + "UEIPAddress": "10.1.0.3" + } + ] + } + }, + "time": "2023-10-14T17:04:24Z" +} \ No newline at end of file diff --git a/metrics/smf-metrics.txt b/metrics/smf-metrics.txt new file mode 100644 index 0000000..e7e23ff --- /dev/null +++ b/metrics/smf-metrics.txt @@ -0,0 +1,129 @@ +# HELP gn_rx_createpdpcontextreq Received GTPv1C CreatePDPContextRequest messages +# TYPE gn_rx_createpdpcontextreq counter +gn_rx_createpdpcontextreq 0 + +# HELP gn_rx_deletepdpcontextreq Received GTPv1C DeletePDPContextRequest messages +# TYPE gn_rx_deletepdpcontextreq counter +gn_rx_deletepdpcontextreq 0 + +# HELP gtp1_pdpctxs_active Active GTPv1 PDP Contexts (GGSN) +# TYPE gtp1_pdpctxs_active gauge +gtp1_pdpctxs_active 0 + +# HELP fivegs_smffunction_sm_n4sessionreport Number of requested N4 session reports evidented by SMF +# TYPE fivegs_smffunction_sm_n4sessionreport counter +fivegs_smffunction_sm_n4sessionreport 0 + +# HELP ues_active Active User Equipments +# TYPE ues_active gauge +ues_active 2 + +# HELP gtp2_sessions_active Active GTPv2 Sessions (PGW) +# TYPE gtp2_sessions_active gauge +gtp2_sessions_active 0 + +# HELP gtp_node_gn_rx_parse_failed Received GTPv1C messages discarded due to parsing failure +# TYPE gtp_node_gn_rx_parse_failed counter + +# HELP s5c_rx_createsession Received GTPv2C CreateSessionRequest messages +# TYPE s5c_rx_createsession counter +s5c_rx_createsession 0 + +# HELP s5c_rx_deletesession Received GTPv2C DeleteSessionRequest messages +# TYPE s5c_rx_deletesession counter +s5c_rx_deletesession 0 + +# HELP gtp_new_node_failed Unable to allocate new GTP (peer) Node +# TYPE gtp_new_node_failed counter +gtp_new_node_failed 0 + +# HELP s5c_rx_parse_failed Received GTPv2C messages discarded due to parsing failure +# TYPE s5c_rx_parse_failed counter +s5c_rx_parse_failed 0 + +# HELP fivegs_smffunction_sm_n4sessionreportsucc Number of successful N4 session reports evidented by SMF +# TYPE fivegs_smffunction_sm_n4sessionreportsucc counter +fivegs_smffunction_sm_n4sessionreportsucc 0 + +# HELP gtp_node_gn_rx_createpdpcontextreq Received GTPv1C CreatePDPContextRequest messages +# TYPE gtp_node_gn_rx_createpdpcontextreq counter + +# HELP fivegs_smffunction_sm_n4sessionestabreq Number of requested N4 session establishments evidented by SMF +# TYPE fivegs_smffunction_sm_n4sessionestabreq counter +fivegs_smffunction_sm_n4sessionestabreq 0 + +# HELP bearers_active Active Bearers +# TYPE bearers_active gauge +bearers_active 2 + +# HELP gn_rx_parse_failed Received GTPv1C messages discarded due to parsing failure +# TYPE gn_rx_parse_failed counter +gn_rx_parse_failed 0 + +# HELP gtp_peers_active Active GTP peers +# TYPE gtp_peers_active gauge +gtp_peers_active 0 + +# HELP gtp_node_gn_rx_deletepdpcontextreq Received GTPv1C DeletePDPContextRequest messages +# TYPE gtp_node_gn_rx_deletepdpcontextreq counter + +# HELP gtp_node_s5c_rx_parse_failed Received GTPv2C messages discarded due to parsing failure +# TYPE gtp_node_s5c_rx_parse_failed counter + +# HELP gtp_node_s5c_rx_createsession Received GTPv2C CreateSessionRequest messages +# TYPE gtp_node_s5c_rx_createsession counter + +# HELP gtp_node_s5c_rx_deletesession Received GTPv2C DeleteSessionRequest messages +# TYPE gtp_node_s5c_rx_deletesession counter + +# HELP fivegs_smffunction_sm_sessionnbr Active Sessions +# TYPE fivegs_smffunction_sm_sessionnbr gauge +fivegs_smffunction_sm_sessionnbr{plmnid="00101",snssai="1-000001"} 2 + +# HELP fivegs_smffunction_sm_pdusessioncreationreq Number of PDU sessions requested to be created by the SMF +# TYPE fivegs_smffunction_sm_pdusessioncreationreq counter +fivegs_smffunction_sm_pdusessioncreationreq{plmnid="",snssai=""} 3 +fivegs_smffunction_sm_pdusessioncreationreq{plmnid="00101",snssai="1-000001"} 3 + +# HELP fivegs_smffunction_sm_pdusessioncreationsucc Number of PDU sessions successfully created by the SMF +# TYPE fivegs_smffunction_sm_pdusessioncreationsucc counter +fivegs_smffunction_sm_pdusessioncreationsucc{plmnid="00101",snssai="1-000001"} 3 + +# HELP fivegs_smffunction_sm_qos_flow_nbr Number of QoS flows at the SMF +# TYPE fivegs_smffunction_sm_qos_flow_nbr gauge +fivegs_smffunction_sm_qos_flow_nbr{plmnid="00101",snssai="1-000001",fiveqi="9"} 3 + +# HELP fivegs_smffunction_sm_n4sessionestabfail Number of failed N4 session establishments evidented by SMF +# TYPE fivegs_smffunction_sm_n4sessionestabfail counter + +# HELP fivegs_smffunction_sm_pdusessioncreationfail Number of PDU sessions failed to be created by the SMF +# TYPE fivegs_smffunction_sm_pdusessioncreationfail counter + +# HELP process_max_fds Maximum number of open file descriptors. +# TYPE process_max_fds gauge +process_max_fds 1048576 + +# HELP process_virtual_memory_max_bytes Maximum amount of virtual memory available in bytes. +# TYPE process_virtual_memory_max_bytes gauge +process_virtual_memory_max_bytes -1 + +# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds. +# TYPE process_cpu_seconds_total gauge +process_cpu_seconds_total 0 + +# HELP process_virtual_memory_bytes Virtual memory size in bytes. +# TYPE process_virtual_memory_bytes gauge +process_virtual_memory_bytes 3120660480 + +# HELP process_resident_memory_bytes Resident memory size in bytes. +# TYPE process_resident_memory_bytes gauge +process_resident_memory_bytes 46800896 + +# HELP process_start_time_seconds Start time of the process since unix epoch in seconds. +# TYPE process_start_time_seconds gauge +process_start_time_seconds 111806825 + +# HELP process_open_fds Number of open file descriptors. +# TYPE process_open_fds gauge +process_open_fds 27 + diff --git a/metrics/smf2-metrics.txt b/metrics/smf2-metrics.txt new file mode 100644 index 0000000..4315650 --- /dev/null +++ b/metrics/smf2-metrics.txt @@ -0,0 +1,129 @@ +# HELP gn_rx_createpdpcontextreq Received GTPv1C CreatePDPContextRequest messages +# TYPE gn_rx_createpdpcontextreq counter +gn_rx_createpdpcontextreq 0 + +# HELP gn_rx_deletepdpcontextreq Received GTPv1C DeletePDPContextRequest messages +# TYPE gn_rx_deletepdpcontextreq counter +gn_rx_deletepdpcontextreq 0 + +# HELP gtp1_pdpctxs_active Active GTPv1 PDP Contexts (GGSN) +# TYPE gtp1_pdpctxs_active gauge +gtp1_pdpctxs_active 0 + +# HELP fivegs_smffunction_sm_n4sessionreport Number of requested N4 session reports evidented by SMF +# TYPE fivegs_smffunction_sm_n4sessionreport counter +fivegs_smffunction_sm_n4sessionreport 0 + +# HELP ues_active Active User Equipments +# TYPE ues_active gauge +ues_active 1 + +# HELP gtp2_sessions_active Active GTPv2 Sessions (PGW) +# TYPE gtp2_sessions_active gauge +gtp2_sessions_active 0 + +# HELP gtp_node_gn_rx_parse_failed Received GTPv1C messages discarded due to parsing failure +# TYPE gtp_node_gn_rx_parse_failed counter + +# HELP s5c_rx_createsession Received GTPv2C CreateSessionRequest messages +# TYPE s5c_rx_createsession counter +s5c_rx_createsession 0 + +# HELP s5c_rx_deletesession Received GTPv2C DeleteSessionRequest messages +# TYPE s5c_rx_deletesession counter +s5c_rx_deletesession 0 + +# HELP gtp_new_node_failed Unable to allocate new GTP (peer) Node +# TYPE gtp_new_node_failed counter +gtp_new_node_failed 0 + +# HELP s5c_rx_parse_failed Received GTPv2C messages discarded due to parsing failure +# TYPE s5c_rx_parse_failed counter +s5c_rx_parse_failed 0 + +# HELP fivegs_smffunction_sm_n4sessionreportsucc Number of successful N4 session reports evidented by SMF +# TYPE fivegs_smffunction_sm_n4sessionreportsucc counter +fivegs_smffunction_sm_n4sessionreportsucc 0 + +# HELP gtp_node_gn_rx_createpdpcontextreq Received GTPv1C CreatePDPContextRequest messages +# TYPE gtp_node_gn_rx_createpdpcontextreq counter + +# HELP fivegs_smffunction_sm_n4sessionestabreq Number of requested N4 session establishments evidented by SMF +# TYPE fivegs_smffunction_sm_n4sessionestabreq counter +fivegs_smffunction_sm_n4sessionestabreq 0 + +# HELP bearers_active Active Bearers +# TYPE bearers_active gauge +bearers_active 1 + +# HELP gn_rx_parse_failed Received GTPv1C messages discarded due to parsing failure +# TYPE gn_rx_parse_failed counter +gn_rx_parse_failed 0 + +# HELP gtp_peers_active Active GTP peers +# TYPE gtp_peers_active gauge +gtp_peers_active 0 + +# HELP gtp_node_gn_rx_deletepdpcontextreq Received GTPv1C DeletePDPContextRequest messages +# TYPE gtp_node_gn_rx_deletepdpcontextreq counter + +# HELP gtp_node_s5c_rx_parse_failed Received GTPv2C messages discarded due to parsing failure +# TYPE gtp_node_s5c_rx_parse_failed counter + +# HELP gtp_node_s5c_rx_createsession Received GTPv2C CreateSessionRequest messages +# TYPE gtp_node_s5c_rx_createsession counter + +# HELP gtp_node_s5c_rx_deletesession Received GTPv2C DeleteSessionRequest messages +# TYPE gtp_node_s5c_rx_deletesession counter + +# HELP fivegs_smffunction_sm_sessionnbr Active Sessions +# TYPE fivegs_smffunction_sm_sessionnbr gauge +fivegs_smffunction_sm_sessionnbr{plmnid="00101",snssai="2-000002"} 1 + +# HELP fivegs_smffunction_sm_pdusessioncreationreq Number of PDU sessions requested to be created by the SMF +# TYPE fivegs_smffunction_sm_pdusessioncreationreq counter +fivegs_smffunction_sm_pdusessioncreationreq{plmnid="",snssai=""} 2 +fivegs_smffunction_sm_pdusessioncreationreq{plmnid="00101",snssai="2-000002"} 2 + +# HELP fivegs_smffunction_sm_pdusessioncreationsucc Number of PDU sessions successfully created by the SMF +# TYPE fivegs_smffunction_sm_pdusessioncreationsucc counter +fivegs_smffunction_sm_pdusessioncreationsucc{plmnid="00101",snssai="2-000002"} 2 + +# HELP fivegs_smffunction_sm_qos_flow_nbr Number of QoS flows at the SMF +# TYPE fivegs_smffunction_sm_qos_flow_nbr gauge +fivegs_smffunction_sm_qos_flow_nbr{plmnid="00101",snssai="2-000002",fiveqi="7"} 2 + +# HELP fivegs_smffunction_sm_n4sessionestabfail Number of failed N4 session establishments evidented by SMF +# TYPE fivegs_smffunction_sm_n4sessionestabfail counter + +# HELP fivegs_smffunction_sm_pdusessioncreationfail Number of PDU sessions failed to be created by the SMF +# TYPE fivegs_smffunction_sm_pdusessioncreationfail counter + +# HELP process_max_fds Maximum number of open file descriptors. +# TYPE process_max_fds gauge +process_max_fds 1048576 + +# HELP process_virtual_memory_max_bytes Maximum amount of virtual memory available in bytes. +# TYPE process_virtual_memory_max_bytes gauge +process_virtual_memory_max_bytes -1 + +# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds. +# TYPE process_cpu_seconds_total gauge +process_cpu_seconds_total 0 + +# HELP process_virtual_memory_bytes Virtual memory size in bytes. +# TYPE process_virtual_memory_bytes gauge +process_virtual_memory_bytes 3120660480 + +# HELP process_resident_memory_bytes Resident memory size in bytes. +# TYPE process_resident_memory_bytes gauge +process_resident_memory_bytes 46477312 + +# HELP process_start_time_seconds Start time of the process since unix epoch in seconds. +# TYPE process_start_time_seconds gauge +process_start_time_seconds 111806825 + +# HELP process_open_fds Number of open file descriptors. +# TYPE process_open_fds gauge +process_open_fds 27 + diff --git a/metrics/upf-metrics-free5gc.txt b/metrics/upf-metrics-free5gc.txt new file mode 100644 index 0000000..129f891 --- /dev/null +++ b/metrics/upf-metrics-free5gc.txt @@ -0,0 +1,7 @@ +2023-10-17 20:15:58 | seid=1|pdrid=6|packet_counts=(0,7)|byte_counts=(0,588)|n3_ip=10.10.3.1|n4_ip=10.10.4.1 +2023-10-17 20:16:03 | seid=2|pdrid=3|packet_counts=(5155109,0)|byte_counts=(445158518,0)|n3_ip=10.10.3.1|n4_ip=10.10.4.1 +2023-10-17 20:16:03 | seid=2|pdrid=4|packet_counts=(0,1617313979)|byte_counts=(0,1669123963757)|n3_ip=10.10.3.1|n4_ip=10.10.4.1 +2023-10-17 20:16:03 | seid=1|pdrid=5|packet_counts=(7,0)|byte_counts=(588,0)|n3_ip=10.10.3.1|n4_ip=10.10.4.1 +2023-10-17 20:16:03 | seid=1|pdrid=6|packet_counts=(0,7)|byte_counts=(0,588)|n3_ip=10.10.3.1|n4_ip=10.10.4.1 +2023-10-17 20:16:08 | seid=2|pdrid=3|packet_counts=(5155109,0)|byte_counts=(445158518,0)|n3_ip=10.10.3.1|n4_ip=10.10.4.1 +2023-10-17 20:16:08 | seid=2|pdrid=4|packet_counts=(0,1617313979)|byte_counts=(0,1669123963757)|n3_ip=10.10.3.1|n4_ip=10.10.4.1 \ No newline at end of file diff --git a/metrics/upf-metrics.txt b/metrics/upf-metrics.txt new file mode 100644 index 0000000..9437b53 --- /dev/null +++ b/metrics/upf-metrics.txt @@ -0,0 +1,67 @@ +# HELP fivegs_ep_n3_gtp_indatapktn3upf Number of incoming GTP data packets on the N3 interface +# TYPE fivegs_ep_n3_gtp_indatapktn3upf counter +fivegs_ep_n3_gtp_indatapktn3upf 12 + +# HELP fivegs_ep_n3_gtp_outdatapktn3upf Number of outgoing GTP data packets on the N3 interface +# TYPE fivegs_ep_n3_gtp_outdatapktn3upf counter +fivegs_ep_n3_gtp_outdatapktn3upf 12 + +# HELP fivegs_upffunction_sm_n4sessionestabreq Number of requested N4 session establishments +# TYPE fivegs_upffunction_sm_n4sessionestabreq counter +fivegs_upffunction_sm_n4sessionestabreq 3 + +# HELP fivegs_upffunction_sm_n4sessionreport Number of requested N4 session reports +# TYPE fivegs_upffunction_sm_n4sessionreport counter +fivegs_upffunction_sm_n4sessionreport 0 + +# HELP fivegs_upffunction_sm_n4sessionreportsucc Number of successful N4 session reports +# TYPE fivegs_upffunction_sm_n4sessionreportsucc counter +fivegs_upffunction_sm_n4sessionreportsucc 0 + +# HELP fivegs_upffunction_upf_sessionnbr Active Sessions +# TYPE fivegs_upffunction_upf_sessionnbr gauge +fivegs_upffunction_upf_sessionnbr 2 + +# HELP fivegs_ep_n3_gtp_indatavolumeqosleveln3upf Data volume of incoming GTP data packets per QoS level on the N3 interface +# TYPE fivegs_ep_n3_gtp_indatavolumeqosleveln3upf counter +fivegs_ep_n3_gtp_indatavolumeqosleveln3upf{qfi="1"} 1008 + +# HELP fivegs_ep_n3_gtp_outdatavolumeqosleveln3upf Data volume of outgoing GTP data packets per QoS level on the N3 interface +# TYPE fivegs_ep_n3_gtp_outdatavolumeqosleveln3upf counter +fivegs_ep_n3_gtp_outdatavolumeqosleveln3upf{qfi="1"} 1008 + +# HELP fivegs_upffunction_sm_n4sessionestabfail Number of failed N4 session establishments +# TYPE fivegs_upffunction_sm_n4sessionestabfail counter + +# HELP fivegs_upffunction_upf_qosflows Number of QoS flows of UPF +# TYPE fivegs_upffunction_upf_qosflows gauge +fivegs_upffunction_upf_qosflows{dnn="internet"} 2 + +# HELP process_max_fds Maximum number of open file descriptors. +# TYPE process_max_fds gauge +process_max_fds 1048576 + +# HELP process_virtual_memory_max_bytes Maximum amount of virtual memory available in bytes. +# TYPE process_virtual_memory_max_bytes gauge +process_virtual_memory_max_bytes -1 + +# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds. +# TYPE process_cpu_seconds_total gauge +process_cpu_seconds_total 0 + +# HELP process_virtual_memory_bytes Virtual memory size in bytes. +# TYPE process_virtual_memory_bytes gauge +process_virtual_memory_bytes 288702464 + +# HELP process_resident_memory_bytes Resident memory size in bytes. +# TYPE process_resident_memory_bytes gauge +process_resident_memory_bytes 27385856 + +# HELP process_start_time_seconds Start time of the process since unix epoch in seconds. +# TYPE process_start_time_seconds gauge +process_start_time_seconds 111807130 + +# HELP process_open_fds Number of open file descriptors. +# TYPE process_open_fds gauge +process_open_fds 12 + diff --git a/metrics/upf2-metrics.txt b/metrics/upf2-metrics.txt new file mode 100644 index 0000000..055249a --- /dev/null +++ b/metrics/upf2-metrics.txt @@ -0,0 +1,65 @@ +# HELP fivegs_ep_n3_gtp_indatapktn3upf Number of incoming GTP data packets on the N3 interface +# TYPE fivegs_ep_n3_gtp_indatapktn3upf counter +fivegs_ep_n3_gtp_indatapktn3upf 0 + +# HELP fivegs_ep_n3_gtp_outdatapktn3upf Number of outgoing GTP data packets on the N3 interface +# TYPE fivegs_ep_n3_gtp_outdatapktn3upf counter +fivegs_ep_n3_gtp_outdatapktn3upf 0 + +# HELP fivegs_upffunction_sm_n4sessionestabreq Number of requested N4 session establishments +# TYPE fivegs_upffunction_sm_n4sessionestabreq counter +fivegs_upffunction_sm_n4sessionestabreq 2 + +# HELP fivegs_upffunction_sm_n4sessionreport Number of requested N4 session reports +# TYPE fivegs_upffunction_sm_n4sessionreport counter +fivegs_upffunction_sm_n4sessionreport 0 + +# HELP fivegs_upffunction_sm_n4sessionreportsucc Number of successful N4 session reports +# TYPE fivegs_upffunction_sm_n4sessionreportsucc counter +fivegs_upffunction_sm_n4sessionreportsucc 0 + +# HELP fivegs_upffunction_upf_sessionnbr Active Sessions +# TYPE fivegs_upffunction_upf_sessionnbr gauge +fivegs_upffunction_upf_sessionnbr 1 + +# HELP fivegs_ep_n3_gtp_indatavolumeqosleveln3upf Data volume of incoming GTP data packets per QoS level on the N3 interface +# TYPE fivegs_ep_n3_gtp_indatavolumeqosleveln3upf counter + +# HELP fivegs_ep_n3_gtp_outdatavolumeqosleveln3upf Data volume of outgoing GTP data packets per QoS level on the N3 interface +# TYPE fivegs_ep_n3_gtp_outdatavolumeqosleveln3upf counter + +# HELP fivegs_upffunction_sm_n4sessionestabfail Number of failed N4 session establishments +# TYPE fivegs_upffunction_sm_n4sessionestabfail counter + +# HELP fivegs_upffunction_upf_qosflows Number of QoS flows of UPF +# TYPE fivegs_upffunction_upf_qosflows gauge +fivegs_upffunction_upf_qosflows{dnn="streaming"} 1 + +# HELP process_max_fds Maximum number of open file descriptors. +# TYPE process_max_fds gauge +process_max_fds 1048576 + +# HELP process_virtual_memory_max_bytes Maximum amount of virtual memory available in bytes. +# TYPE process_virtual_memory_max_bytes gauge +process_virtual_memory_max_bytes -1 + +# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds. +# TYPE process_cpu_seconds_total gauge +process_cpu_seconds_total 0 + +# HELP process_virtual_memory_bytes Virtual memory size in bytes. +# TYPE process_virtual_memory_bytes gauge +process_virtual_memory_bytes 288702464 + +# HELP process_resident_memory_bytes Resident memory size in bytes. +# TYPE process_resident_memory_bytes gauge +process_resident_memory_bytes 26906624 + +# HELP process_start_time_seconds Start time of the process since unix epoch in seconds. +# TYPE process_start_time_seconds gauge +process_start_time_seconds 111807130 + +# HELP process_open_fds Number of open file descriptors. +# TYPE process_open_fds gauge +process_open_fds 12 + diff --git a/mongo-tools/add-subscriber.py b/mongo-tools/add-subscriber.py index 463eccd..8e93a9f 100644 --- a/mongo-tools/add-subscriber.py +++ b/mongo-tools/add-subscriber.py @@ -8,7 +8,13 @@ def add_subscriber(): - subscribers = ["subscriber_1", "subscriber_2", "subscriber_3", "subscriber_4"] + subscribers = [ + "subscriber_1", + "subscriber_2", + "subscriber_3", + "subscriber_4", + "subscriber_5", + ] for subscriber in subscribers: Open5GS_1 = Open5GS(MONGO_URI, MONGO_PORT) sub_data[subscriber]["_id"] = ObjectId() diff --git a/mongo-tools/data.py b/mongo-tools/data.py index ef4bac2..31a1399 100644 --- a/mongo-tools/data.py +++ b/mongo-tools/data.py @@ -137,4 +137,25 @@ "schema_version": 1, "__v": 0, }, + "subscriber_5": { + "_id": "", + "imsi": "001010000000003", + "subscribed_rau_tau_timer": 12, + "network_access_mode": 0, + "subscriber_status": 0, + "access_restriction_data": 32, + "slice": [slice_data["slice_1"]], + "ambr": { + "uplink": {"value": 1, "unit": Open5GS.Unit.Gbps}, + "downlink": {"value": 1, "unit": Open5GS.Unit.Gbps}, + }, + "security": { + "k": "465B5CE8B199B49FAA5F0A2EE238A6BD", + "amf": "8000", + "op": None, + "opc": "E8ED289DEBA952E4283B54E88E6183CB", + }, + "schema_version": 1, + "__v": 0, + }, } diff --git a/open5gs-aio/open5gs/aio/aio-deployment.yaml b/open5gs-aio/open5gs/aio/aio-deployment.yaml index a760c58..5ed30f2 100644 --- a/open5gs-aio/open5gs/aio/aio-deployment.yaml +++ b/open5gs-aio/open5gs/aio/aio-deployment.yaml @@ -44,7 +44,7 @@ spec: containers: - name: aio image: ghcr.io/niloysh/open5gs:v2.6.4-aio - imagePullPolicy: IfNotPresent + imagePullPolicy: Always command: [ "/open5gs/config/init.sh" ] env: - name: DEBUG_MODE diff --git a/open5gs-aio/open5gs/kustomization.yaml b/open5gs-aio/open5gs/kustomization.yaml index 3bc170d..3d24d6b 100644 --- a/open5gs-aio/open5gs/kustomization.yaml +++ b/open5gs-aio/open5gs/kustomization.yaml @@ -23,3 +23,7 @@ configMapGenerator: generatorOptions: disableNameSuffixHash: true + +images: +- name: ghcr.io/niloysh/open5gs + newTag: v2.6.6-upf-metrics-by-seid diff --git a/open5gs/kustomization.yaml b/open5gs/kustomization.yaml index e40457d..5fc5fa9 100644 --- a/open5gs/kustomization.yaml +++ b/open5gs/kustomization.yaml @@ -4,3 +4,8 @@ kind: Kustomization resources: - common - slices + + +images: +- name: ghcr.io/niloysh/open5gs + newTag: v2.6.6-upf-metrics-by-seid diff --git a/open5gs/slices/slice1/smf1/smf-configmap.yaml b/open5gs/slices/slice1/smf1/smf-configmap.yaml index 653c9c5..5938f14 100644 --- a/open5gs/slices/slice1/smf1/smf-configmap.yaml +++ b/open5gs/slices/slice1/smf1/smf-configmap.yaml @@ -4,7 +4,7 @@ metadata: name: smf1-configmap labels: app: open5gs - nf: smf1 + nf: smf name: smf1 data: smfcfg.yaml: | diff --git a/open5gs/slices/slice1/smf1/smf-deployment.yaml b/open5gs/slices/slice1/smf1/smf-deployment.yaml index 1165d59..84c52d2 100644 --- a/open5gs/slices/slice1/smf1/smf-deployment.yaml +++ b/open5gs/slices/slice1/smf1/smf-deployment.yaml @@ -4,20 +4,20 @@ metadata: name: open5gs-smf1 labels: app: open5gs - nf: smf1 + nf: smf name: smf1 spec: selector: matchLabels: app: open5gs - nf: smf1 + nf: smf name: smf1 replicas: 1 template: metadata: labels: app: open5gs - nf: smf1 + nf: smf name: smf1 annotations: k8s.v1.cni.cncf.io/networks: '[ @@ -37,7 +37,7 @@ spec: containers: - image: ghcr.io/niloysh/open5gs:v2.6.4-aio name: smf - imagePullPolicy: IfNotPresent + imagePullPolicy: Always ports: - name: nsmf containerPort: 80 diff --git a/open5gs/slices/slice1/smf1/smf-service.yaml b/open5gs/slices/slice1/smf1/smf-service.yaml index 3b29d9f..3c7e033 100644 --- a/open5gs/slices/slice1/smf1/smf-service.yaml +++ b/open5gs/slices/slice1/smf1/smf-service.yaml @@ -4,7 +4,7 @@ metadata: name: smf1-nsmf labels: app: open5gs - nf: smf1 + nf: smf name: smf1 spec: ports: @@ -22,5 +22,5 @@ spec: port: 5868 selector: app: open5gs - nf: smf1 + nf: smf name: smf1 diff --git a/open5gs/slices/slice1/upf1/upf-configmap.yaml b/open5gs/slices/slice1/upf1/upf-configmap.yaml index 7c541ae..671657d 100644 --- a/open5gs/slices/slice1/upf1/upf-configmap.yaml +++ b/open5gs/slices/slice1/upf1/upf-configmap.yaml @@ -4,12 +4,13 @@ metadata: name: upf1-configmap labels: app: open5gs - nf: upf1 + nf: upf name: upf1 data: upfcfg.yaml: | logger: file: /open5gs/install/var/log/open5gs/upf.log + level: info upf: pfcp: @@ -34,4 +35,5 @@ data: sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"; iptables -t nat -A POSTROUTING -s 10.45.0.0/16 ! -o ogstun -j MASQUERADE; - /open5gs/install/bin/open5gs-upfd -c /open5gs/config/upfcfg.yaml \ No newline at end of file + /open5gs/install/bin/open5gs-upfd -c /open5gs/config/upfcfg.yaml + # sleep 1000000 \ No newline at end of file diff --git a/open5gs/slices/slice1/upf1/upf-deployment.yaml b/open5gs/slices/slice1/upf1/upf-deployment.yaml index 94742f6..e4264c9 100644 --- a/open5gs/slices/slice1/upf1/upf-deployment.yaml +++ b/open5gs/slices/slice1/upf1/upf-deployment.yaml @@ -4,20 +4,20 @@ metadata: name: open5gs-upf1 labels: app: open5gs - nf: upf1 + nf: upf name: upf1 spec: selector: matchLabels: app: open5gs - nf: upf1 + nf: upf name: upf1 replicas: 1 template: metadata: labels: app: open5gs - nf: upf1 + nf: upf name: upf1 annotations: k8s.v1.cni.cncf.io/networks: '[ @@ -37,7 +37,7 @@ spec: containers: - name: upf image: ghcr.io/niloysh/open5gs:v2.6.4-aio - imagePullPolicy: IfNotPresent + imagePullPolicy: Always command: [ "/open5gs/config/wrapper.sh" ] volumeMounts: - mountPath: /open5gs/config/ diff --git a/open5gs/slices/slice2/smf2/smf-configmap.yaml b/open5gs/slices/slice2/smf2/smf-configmap.yaml index e532579..be1d203 100644 --- a/open5gs/slices/slice2/smf2/smf-configmap.yaml +++ b/open5gs/slices/slice2/smf2/smf-configmap.yaml @@ -4,7 +4,7 @@ metadata: name: smf2-configmap labels: app: open5gs - nf: smf2 + nf: smf name: smf2 data: smfcfg.yaml: | diff --git a/open5gs/slices/slice2/smf2/smf-deployment.yaml b/open5gs/slices/slice2/smf2/smf-deployment.yaml index eb94819..0886bca 100644 --- a/open5gs/slices/slice2/smf2/smf-deployment.yaml +++ b/open5gs/slices/slice2/smf2/smf-deployment.yaml @@ -4,20 +4,20 @@ metadata: name: open5gs-smf2 labels: app: open5gs - nf: smf2 + nf: smf name: smf2 spec: selector: matchLabels: app: open5gs - nf: smf2 + nf: smf name: smf2 replicas: 1 template: metadata: labels: app: open5gs - nf: smf2 + nf: smf name: smf2 annotations: k8s.v1.cni.cncf.io/networks: '[ @@ -37,7 +37,7 @@ spec: containers: - image: ghcr.io/niloysh/open5gs:v2.6.4-aio name: smf - imagePullPolicy: IfNotPresent + imagePullPolicy: Always ports: - name: nsmf containerPort: 80 diff --git a/open5gs/slices/slice2/smf2/smf-service.yaml b/open5gs/slices/slice2/smf2/smf-service.yaml index d5e123d..51ba397 100644 --- a/open5gs/slices/slice2/smf2/smf-service.yaml +++ b/open5gs/slices/slice2/smf2/smf-service.yaml @@ -4,7 +4,7 @@ metadata: name: smf2-nsmf labels: app: open5gs - nf: smf2 + nf: smf name: smf2 spec: ports: @@ -22,5 +22,5 @@ spec: port: 5868 selector: app: open5gs - nf: smf2 + nf: smf name: smf2 diff --git a/open5gs/slices/slice2/upf2/upf-configmap.yaml b/open5gs/slices/slice2/upf2/upf-configmap.yaml index 7ca9a19..16c1b73 100644 --- a/open5gs/slices/slice2/upf2/upf-configmap.yaml +++ b/open5gs/slices/slice2/upf2/upf-configmap.yaml @@ -4,7 +4,7 @@ metadata: name: upf2-configmap labels: app: open5gs - nf: upf2 + nf: upf name: upf2 data: upfcfg.yaml: | diff --git a/open5gs/slices/slice2/upf2/upf-deployment.yaml b/open5gs/slices/slice2/upf2/upf-deployment.yaml index 997736d..f43a23d 100644 --- a/open5gs/slices/slice2/upf2/upf-deployment.yaml +++ b/open5gs/slices/slice2/upf2/upf-deployment.yaml @@ -4,20 +4,20 @@ metadata: name: open5gs-upf2 labels: app: open5gs - nf: upf2 + nf: upf name: upf2 spec: selector: matchLabels: app: open5gs - nf: upf2 + nf: upf name: upf2 replicas: 1 template: metadata: labels: app: open5gs - nf: upf2 + nf: upf name: upf2 annotations: k8s.v1.cni.cncf.io/networks: '[ @@ -38,7 +38,7 @@ spec: containers: - name: upf image: ghcr.io/niloysh/open5gs:v2.6.4-aio - imagePullPolicy: IfNotPresent + imagePullPolicy: Always command: [ "/open5gs/config/wrapper.sh" ] volumeMounts: - mountPath: /open5gs/config/ diff --git a/ueransim/ueransim-ue/kustomization.yaml b/ueransim/ueransim-ue/kustomization.yaml index 86ee075..c4ccc4f 100644 --- a/ueransim/ueransim-ue/kustomization.yaml +++ b/ueransim/ueransim-ue/kustomization.yaml @@ -1,3 +1,4 @@ resources: - ue1 -- ue2 \ No newline at end of file +- ue2 +- ue3 \ No newline at end of file diff --git a/ueransim/ueransim-ue/ue3/kustomization.yaml b/ueransim/ueransim-ue/ue3/kustomization.yaml new file mode 100644 index 0000000..0653d3f --- /dev/null +++ b/ueransim/ueransim-ue/ue3/kustomization.yaml @@ -0,0 +1,8 @@ +resources: +- ue-deployment.yaml + +configMapGenerator: + - name: ue3-configmap + files: + - ue3.yaml + - wrapper.sh \ No newline at end of file diff --git a/ueransim/ueransim-ue/ue3/ue-deployment.yaml b/ueransim/ueransim-ue/ue3/ue-deployment.yaml new file mode 100644 index 0000000..f01d6f2 --- /dev/null +++ b/ueransim/ueransim-ue/ue3/ue-deployment.yaml @@ -0,0 +1,55 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: ueransim-ue3 + labels: + app: ueransim + component: ue + name: ue3 +spec: + selector: + matchLabels: + app: ueransim + component: ue + name: ue3 + replicas: + template: + metadata: + labels: + app: ueransim + component: ue + name: ue3 + spec: + containers: + - image: ghcr.io/niloysh/ueransim:v3.2.6 + imagePullPolicy: Always + name: ue + securityContext: + capabilities: + add: ["NET_ADMIN"] + # command: [ "/bin/bash", "-c", "--" ] + # args: [ "while true; do sleep 30; done;" ] + command: [ "/ueransim/config/wrapper.sh" ] + volumeMounts: + - mountPath: /ueransim/config + name: ue-volume + resources: + requests: + memory: "256Mi" + cpu: "200m" + limits: + memory: "512Mi" + cpu: "500m" + dnsPolicy: ClusterFirst + restartPolicy: Always + volumes: + - name: ue-volume + configMap: + name: ue3-configmap + items: + - key: ue3.yaml + path: ue3.yaml + - key: wrapper.sh + path: wrapper.sh + mode: 0755 \ No newline at end of file diff --git a/ueransim/ueransim-ue/ue3/ue3.yaml b/ueransim/ueransim-ue/ue3/ue3.yaml new file mode 100644 index 0000000..857f88c --- /dev/null +++ b/ueransim/ueransim-ue/ue3/ue3.yaml @@ -0,0 +1,72 @@ +# IMSI number of the UE. IMSI = [MCC|MNC|MSISDN] (In total 15 digits) +supi: 'imsi-001010000000003' +# Mobile Country Code value of HPLMN +mcc: '001' +# Mobile Network Code value of HPLMN (2 or 3 digits) +mnc: '01' + +# Permanent subscription key +key: '465B5CE8B199B49FAA5F0A2EE238A6BD' +# Operator code (OP or OPC) of the UE +op: 'E8ED289DEBA952E4283B54E88E6183CB' +# This value specifies the OP type and it can be either 'OP' or 'OPC' +opType: 'OPC' +# Authentication Management Field (AMF) value +amf: '8000' +# IMEI number of the device. It is used if no SUPI is provided +imei: '356938035643803' +# IMEISV number of the device. It is used if no SUPI and IMEI is provided +imeiSv: '4370816125816151' + +# List of gNB IP addresses for Radio Link Simulation +gnbSearchList: + - gnb-service + +# UAC Access Identities Configuration +uacAic: + mps: false + mcs: false + +# UAC Access Control Class +uacAcc: + normalClass: 0 + class11: false + class12: false + class13: false + class14: false + class15: false + +# Initial PDU sessions to be established +sessions: + - type: 'IPv4' + apn: 'internet' + slice: + sst: 1 + sd: 000001 + +# Configured NSSAI for this UE by HPLMN +configured-nssai: + - sst: 1 + sd: 000001 + +# Default Configured NSSAI for this UE +default-nssai: + - sst: 1 + sd: 000001 + +# Supported integrity algorithms by this UE +integrity: + IA1: true + IA2: true + IA3: true + +# Supported encryption algorithms by this UE +ciphering: + EA1: true + EA2: true + EA3: true + +# Integrity protection maximum data rate for user plane +integrityMaxRate: + uplink: 'full' + downlink: 'full' diff --git a/ueransim/ueransim-ue/ue3/wrapper.sh b/ueransim/ueransim-ue/ue3/wrapper.sh new file mode 100644 index 0000000..1bb43f6 --- /dev/null +++ b/ueransim/ueransim-ue/ue3/wrapper.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +mkdir /dev/net +mknod /dev/net/tun c 10 200 + +/ueransim/nr-ue -c /ueransim/config/ue3.yaml \ No newline at end of file