We implemented the topology shown below:

We will now set up the environment for the topology, including Grafana and Prometheus to monitor the I-UPF and PSA-UPF-1.
Note: Make sure you have cloned this repository at the same level and location as the
free5gc-composedirectory.
# Navigate to the config folder
cd topology-01/config
# Copy its contents into the original free5gc-compose config folder
cp -r . ../../free5gc-compose/config
# Copy the Docker Compose file
cd ..
cp docker-compose-build-top01.yaml ../free5gc-compose
# Replace UPF and UERANSIM configurations
mv -r ueransim nf_upf ../free5gc-compose
# Copy test scripts and make them executable
cp -r test-scripts ../free5gc-compose
find ../free5gc-compose/test-scripts -type f -name "*.sh" -exec chmod +x {} \;# Copy the Prometheus configuration file
cp prometheus.yaml ../free5gc-compose
# Copy the Grafana provisioning files
cp -r graphana-provisioning ../free5gc-composeMake sure you are in the free5gc-compose folder. Use sudo if necessary.
cd ../free5gc-compose/test-scripts
# Launch the environment
./topology-01-env.sh
# Create 6 UEs using the web interface
./addusers.sh
# Register the UEs
./ue_registration.sh
# Test connectivity
# Parameters:
# 1st: gNB instance (ueransim-1 = gNB 01, ueransim-2 = gNB 02, ueransim-3 = gNB 03)
# 2nd: UE interface (uesimtun0 = UE 01, uesimtun1 = UE 02)
# 3rd: DNN IP (e.g., 172.17.0.1 or 10.10.0.1)
./test_conn_top01.sh ueransim-1 uesimtun0 172.17.0.1-
Open your browser and go to: http://localhost:3000
-
In Grafana, configure a data source to connect to Prometheus running at:
http://localhost:9090 -
To import the prebuilt dashboard:
- Open the JSON file containing the dashboard (located at utils/UPFSs-monitoring-dashboard-graphana).
- Replace the Prometheus UID in the JSON file.
To get the UID:
- Navigate to: http://localhost:3000/connections/datasources
- Open the Prometheus data source. You will be redirected to a URL like:
http://localhost:3000/connections/datasources/edit/<your-datasource-uid> - Copy the UID from the URL and replace it in the JSON file.
- Import the updated JSON file into Grafana using the Import Dashboard feature.
Once done, Grafana should now visualize metrics from Prometheus for your topology.