This example showcases graphical data visualization using Grafana. Data is extracted from a 5G ns3 simulation into csv files and sent to an InfluxDB server via Telegraf. Grafana then gathers data and plots it on a dashboard, allowing for easier analysis and interpretation. We created four dashboards to showcase all the data generated from "cu-up", "cu-cp" and "du" files within the simulation container. The forth dashboard plots aggregated data of interest.
- URL: http://localhost:3000
- User: admin
- Password: admin
- Port: 8125 UDP (StatsD input)
- Port: 8086 (HTTP API)
- User: admin
- Password: admin
- Database: influx
$ docker compose up
- URL: http://localhost:3000
- User: admin
- Password: admin
$ docker compose exec ns3 /bin/bash
$ cd ns3-mmwave-oran
$ python3 sim_watcher.py
$ docker compose exec ns3 /bin/bash
$ cd ns3-mmwave-oran
$ ./waf --run "scratch/scenario-zero.cc --enableE2FileLogging=1"
You may want to set the following options in the last command:
--RngRun=n
, where n is a positive integer representing the seed for the pseudo-random number generator.--simTime=x
, where x is the simulation time (in seconds)
Once everything is running correctly make sure the absolute time range on Grafana is set to "Last 5 minutes" so that data will appear as soon as it is sent.
When data is visible you may want to change the absolute time range to:
From: timestamp of the first visible measurement
To: From timestamp + simulation time
The MIT License (MIT). Please see License File for more information.
https://github.com/bcremer/docker-telegraf-influx-grafana-stack.git