Conclusion This concludes the post on how to install and configure MRTG on Ubuntu server.As you can see, MRTG isn’t terribly complicated and proves to be a really nice open source package for monitoring and displaying traffic in and out your network from virtually anywhere you have a web browser.So perhaps after you’ve done some tweaking on MRTG and are satisfied with the results, you can automate the process of running MRTG by using a startup script in your system startup sequence. /bin/sh ### BEGIN INIT INFO # Provides: mrtg # Required-Start: # Required-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: mrtg init script # Description: This file is used to start, stop, restart, # and determined status of the mrtg daemon.
If you click on any one of these graphs you’ll be taken to another page showing individual graphs for 30 minute, two hour, and daily averages, along with the maximum, average, and current bit rate in and out of that particular interface. Okay, so now that we have MRTG installed, configured and running let’s move on and discuss how to keep it running.
Only interested in displaying one particular interface? Operate Starting MRTG by hand is not ideal in the long run.
Okay, now it’s time to create the web pages which display the MRTG graphs using the When restarting Apache you may receive a warning concerning its inability to “…reliably determine the server’s fully qualified domain name…” This non-critical error can be fixed by adding the following line to MRTG has been configured. Start There’s something important to keep in mind when starting MRTG, and that is that MRTG requires the environmental variable “LANG” to be C in order to run properly.
Since most Linux systems these days, including Ubuntu server, use UTF-8 (run echo $LANG to see what your system uses), let’s change LANG to C and start MRTG using the following command: When you run MRTG for the first time you may see a lot of complaints about missing log files.
Download and Install First, update your package list: If this is the first time installing MRTG on your server you’ll likely be presented with the following message (See Figure 1).