Hello, welcome to NETVN channel
In this video I show you how to monitor network bandwidth with MRTG
With MRTG you can monitor the bandwidth of the server, router or switch over the network
First you download the latest version of MRTG from the official homepage
After downloading, I extracted to C partition of Windows computer
I will rename the folder to mrtg to ease the next steps
To use the PRTG tool, a Windows computer requires Perl to be installed
Thanks for the detailed instructions on how to install and configure it on the homepage of MRTG
On the MRTG homepage there are instructions for many different operating systems
Here I refer to the installation and configuration instructions on the Windows operating system
To download Perl to my computer I have to create a new free account
So that you don't have to wait long I have prepared a free account so I will log in with that account
There are many options for me to download but MRTG requires a Windows computer with Perl installed so I will download Perl
I choose the latest version of Perl
Next is the operating system, although I am installing on Windows 11 operating system, I can download the version for Windows 10 operating system as well
The selections required before the download were set, I scrolled to the bottom of the page and clicked Install
There are two ways to install Perl and I find it easier to install using the command line
I just copy the command and paste it into the Windows command window and wait for the installation to complete
Next I type cmd and open a command window on my Windows computer
To monitor the network traffic of a device or a server I need to enable SNMP on it
Here I will monitor the bandwidth of a Windows server so I will enable SNMP on it
I have a Windows server ready with ip address 192.168.1.254
This server does not have SNMP installed so I will install it
You install SNMP on the Windows server as above
You can also install SNMP on Windows 10 and Windows 11 operating systems
After installing SNMP for Windows server I set it up as follows
I allow monitoring this server from any ip address
You can limit the ip address allowed to monitor this server if you want
Next I set the SNMP community string to public. You can set up another character string if you want, and you should write it down to set it up in the next step
To ensure that the SNMP settings on the server are applied I recommend that you restart the SNMP service
I have finished setting up SNMP on Windows server, now I will monitor its traffic using MRTG
Go back to a Windows 11 computer with MRTG installed and Perl installed
I browse to the bin folder inside the folder called mrtg
Here I open command window and check if MRTG tool is working
If you get the above message, it's working fine
To monitor the target Windows server I used the command as instructed to create a configuration file as above
I replace the default ip address with the ip address of the target Windows server
As mentioned in the previous step the ip address of the server is 192.168.1.254
And here is the config file I got, it's called mrtg.cfg
Next I open the configuration file using the available NotePad software on Windows operating system
As per the instructions I add two lines at the top of the file
The first line to set the directory to save the Windows server traffic monitoring results
Because there is no such folder on my computer, I will create a new folder
On partition C I create a new folder named www
In the www folder I create a new folder named mrtg
I need one more line because by default the result is only fetched once so the second line will get me the result every 5 minutes
After adding the top two lines as above don't forget to save the changes
Next I will test the result with the configuration file I just got
We open the folder named mrtg to save the monitoring results
On the command prompt I run the command perl mrtg mrtg.cfg
mrtg.cfg is the configuration file that was created earlier, it stores the traffic monitoring configuration of the target Windows server
You will see in the mrtg folder appear files to save traffic monitoring results
I open the file with the extension html with any web browser on my computer to see the result
The result will be saved every 5 minutes, my job is to wait
Here are the basic steps to monitor traffic with MRTG
The next steps I set up to run the MRTG tool every time the Windows operating system boots
Or how can I monitor multi-device traffic with MRTG
Next I create a shortcut to run a command to monitor the Windows server traffic
I will replace perl with wperl to run MRTG tool without console
After creating a new shortcut I update Start in as c:\mrtg\bin
Now I need to check if MRTG tool is really working or not by opening Task Manager
I browse and check services running on Windows 11 operating system
And here it is, the wperl service is running
I can close the console window and the MRTG tool still works
I check the services again to make sure the traffic monitoring tool is still working
So every try worked fine, I got rid of the console window
Next I added the newly created shortcut to the startup folder so that it is launched every time the Windows operating system is started
That way I don't need to start MRTG manually
I open the Windows startup folder with the Run window
Then I just drag and drop the newly created shortcut
I restarted the computer with MRTG installed to check the results
Wait a moment for the Windows 11 computer to start
Just like last time I opened Task Manager to check if wperl is running
Great, wperl service is running like MRTG tool is working
I created a new shortcut to the target server's network interface to make it easier to monitor traffic
You name it to match your server
Shortcut created successfully
I just double click on the shortcut to monitor the network interface traffic of the target Windows server
As mentioned I will show you how to add multiple monitored devices with MRTGr
Want to monitor another device I create a new configuration file. I open the bin folder in the mrtg folder
Here I open the command window as above
Now I want to monitor the traffic of the router whose ip address is 10.11.32.140
Of course on my router SNMP is enabled
I will create a new configuration file called mrtg1.cfg to monitor my router
Just like the configuration file of the Windows server, I add 2 lines on top as above
The first line defines the directory where the traffic monitoring results are saved
The folder named mrtg is saving the Windows server monitoring results, so to save the router monitoring results I created a new folder named mrtg1
The remaining line will help me get the result every 5 minutes
Next I create a shortcut to launch router traffic monitoring every time the OS boots
I just cloned the Windows server's traffic monitoring shortcut
Then I edited the new shortcut to match the router device
I rename the shortcut to match the device I want to monitor
I replaced the mrtg.cfg file with the mrtg1.cfg file and saved it
Now I check the traffic monitoring results for the router device
In the folder named mrtg1 will appear files that store the results of traffic monitoring of the router's interfaces
Next I create a shortcut to monitor the router's WAN interface traffic
So I can monitor multiple devices at the same time using MRTG
Above are the basic steps to monitor the network traffic of devices using MRTG
Good luck, thanks for watching, don't forget to like and subscribe