Feature Description
Event Data Records (EDRs) collect information that you can use to perform the following functions:
-
Debug or understand the application behavior
-
Diagnose the call flow for the specific subscribers
The SMF supports logging of EDRs for both 4G and 5G subscriber sessions including non-roaming and roaming sessions. If the EDR Support feature is enabled, then in a roaming scenario, hSMF and vSMF generate EDRs for PDU session establishment and release procedures. The SMF generates EDR files in comma-separated value (CSV) format. The SMF stores one CSV record per line. The CSV files can be optionally compressed before sending to an external server.
The SMF treats a request message and response message as one EDR event record. For example, N11SmContextCreateReq and N11SmContextCreateResp attributes are logged as an EDR event.
The SMF supports EDR file generation for transaction and transaction-collision level details for subscriber sessions. By default, the EDR generation is disabled.
In release 2021.02.0, the SMF generates EDRs with procedure-level details, event-level details, and field-level details. These granular details help in debugging errors and issues.
EDR Format
In addition to the existing Transaction EDR fields, the application appends procedure-id and event-id along with the respective field values. Application registers the procedure-id, event-id, and field-id along with the corresponding names. This mapping is used to format the CSV event entry in the EDR. Each event entry consists of comma-separated procedure-id, event-id, and field-value. These registered mappings can also be used in CLI commands to disable EDRs at procedure, event, or field level. You can enable or disable the EDRs dynamically during runtime. The existing EDR records remain the same and the runtime changes get reflected only in the newly generated EDR records.
Transaction EDR Format
Transaction-EDR-Fields, list of event-entries [ ]
Event Entries
Procedure-id1, Event-id1, list of field-id1-values [ ]
The following is a sample transaction entry along with a list of events in the CSV format.
Version, Field-Count, Transaction-id-value, Start-Time, Elapsed-Time, ……,
Procedure-id1, event-id1, field-id1-value, field-id2-value……,
Procedure-id1, event-id2, field-id1-value, field-id2-value……,
Procedure-id1, event-id3, field-id1-value, field-id2-value……
Note | There might be different set of fields for a combination of procedure-id and event-id. You can enable or disable the EDRs dynamically during runtime by using a CLI command. For configuration details, see the Configure EDR Files for Generation section in this guide. |
EDR File Storage Location
This section provides details on the archival location of EDR files in SMF service pod and EDR monitor pod.
EDR Files in SMF Service Pod
The EDR file is generated in each SMF service pod where the subscriber sessions and events are processed. Based on the EDR file size, the files are archived periodically in non-persistent volume, that is, the SMF service pod. A new file is created before archiving the existing file.
The format of the transaction EDR file name and transaction collision EDR file name are as follows:
<pod-name>_<pod_instance>_<PodStartTime>.transaction.csv
<pod-name>_<pod_instance>_<PodStartTime>.transaction_collision.csv
The directory path of service pod is /tmp/edr/.
Example:
smf-service-n0-0_0_ 20220730233455.transaction.csv
Where the pod name is smf-service-n0-0, pod instance is 0, and the pod start time "20220730181014" means 30nd July 2022 18:10:14 UTC.
The format of compressed file name is as follows:
<pod-name>_<pod_instance>_<PodStartTime>.transaction.csv.<fileArchivedTime>.<FileRotationCounter>.gz
Example:
example-service-n0-0_1_20220730181014.transaction.csv.20220730181844.1.gz
EDR Files in EDR Monitor Pod
The SMF service pod sends all the EDR files to edr-monitor pod every 30 seconds. The EDR files remain in edr-monitor pod persistent directory as .csv file. When the total size of all the files exceeds the configured maximum file size, the oldest file is deleted.
The format of file name in edr-monitor pod is <pod-name>_<pod_instance>_<PodStartTime>.transaction.csv.
Example:
edr-monitor pod-n0-0_0_ 20220730233455.transaction.csv
The directory path of edr-monitor pod is /logs/edr/.
The EDR file size, maximum archived EDR file count, and maximum persistent volune size are configured through CLI commands. For information on the configuration commands, see the Configure EDR Parameters section.
To access the files in the persistent volume of EDR monitor pod, log on to the Ops center with required credentials, and use the edr-monitor pod ingress URL.
To determine the ingress URL, use the following command:
kubectl get ingress -n namespace | grep edr
Example:
cloud-user@svi-cndp-tb41-gr-setup-smf-cluster-2-cndp-server-1:~$ kubectl get ingress -n smf-smf | grep edr
edr-archives-smf-smf nginx edr-archives.smf-smf.172.18.128.82.nip.io 10.109.13.65 80, 443 4d5h