Multi-Router Traffic Grapher (MRTG) MULTI-ROUTER TRAFFIC GRAPHER (MRTG)... 1 Overview... 1 Installing MRTG... 1 Viewing the Results... 10 Notes... 13 Troubleshooting... 13 Document Revision History... 13 Overview Using the Multi Router Traffic Grapher to graph statistics is easy with the included LTMRTG program in the LabTech server directory. LabTech will provide Data In\Out statistics for every computer and device you monitor. LabTech provides all this information by default and does not incur any bandwidth penalty by graphing. If you have an existing MRTG installation you can just add new sections to your config file to call the LTMRTG executable. Installing MRTG NOTE: The following instructions are written for Windows 2008 and may very slightly if you are using Windows 2003. To setup a new MRTG and Perl from scratch, download the LabTech-MRTG-Perl package and follow these instructions. 1. On the LabTech server, download LabTech-MRTG-Perl.zip to your desktop. 2. Extract the contents of the zip file. This will create a folder named Labtech- MRTG-PERL. 3. Open the Labtech-MRTG-PERL\Labtech-MRTG-PERL folders. Inside this folder will be a Perl folder. 4. Copy the Perl folder to your C:\ drive. Open the Perl folder and verify the contents. The contents should be the same as shown in the following screen capture. 29.MultiRouterTrafficGrapher.doc.docx 1
Figure 1: Perl Directory Contents Multi-Router Traffic Grapher (MRTG) 5. Open the command prompt. If you are not logged in as Administrator, run the command prompt as Administrator. Figure 2: Command Prompt 6. Enter cd \Perl and press [Enter]. 7. Enter CFGMaker For LabTech.cmd and press [Enter]. The script may run for a few minutes depending on how many devices it finds and builds into the mrtg.cfg file. When the script has completed, you will be returned to the C:\Perl prompt. 8. Navigate to C:\Perl\MRTG\CFG\mrtg.cfg and open in Notepad. 29.MultiRouterTrafficGrapher.doc.docx 2
Figure 3: mrtg.cfg File 9. Remove any devices you do not want to graph. The highlighted area in the above screen capture shows what information needs to be removed for each device you do not want to graph. Select File > Save to save any changes you made. 10. Open your Task Scheduler (Start > Administrative Tools > Task Scheduler). Figure 4: Task Scheduler 29.MultiRouterTrafficGrapher.doc.docx 3
11. Expand Task Scheduler Library > Microsoft > Windows. 12. Right-click on Windows and select Create Task. Figure 5: Create Task Multi-Router Traffic Grapher (MRTG) 13. Enter Multi-Router Traffic Grapher in the Name field. 14. Enter a Description, if desired. 15. Select Run whether user is logged on or not. 16. Click the Triggers tab. 29.MultiRouterTrafficGrapher.doc.docx 4
Figure 6: Add New Trigger 17. Click the New button. 18. Select At startup from the Begin the task drop-down. 19. Repeat the task every 5 minutes, indefinitely. 20. Click OK. 21. Click the Actions tab. 29.MultiRouterTrafficGrapher.doc.docx 5
Figure 7: Create New Action Multi-Router Traffic Grapher (MRTG) 22. Click the New button. 23. Select Start a program from the Action drop-down. 24. Enter c:\perl\runmrtg.cmd in the Program/script field and click OK. 25. You may be prompted to enter the user account information to run this task. Enter the appropriate administrator credentials and click OK. 26. Run the task. 27. Open the IIS Manager (Start > Administrative Tools > IIS Manager). 29.MultiRouterTrafficGrapher.doc.docx 6
Figure 8: IIS Manager LabTech 28. Expand the Server > Sites > Default Web Site. 29. Right-click on the LabTech directory and select Add Virtual Directory. Figure 9: Add Virtual Directory 30. Enter MRTG in the Alias field. 29.MultiRouterTrafficGrapher.doc.docx 7
Multi-Router Traffic Grapher (MRTG) 31. Enter c:\perl\mrtgdata\html in the Physical Path field and click OK. MRTG will be added to the LabTech directory structure. 32. Right-click on MRTG from the tree and select Edit Permissions. 33. Click on the Security tab. 34. Click the Add...button. Figure 10: Select Users or Groups 35. Enter Anonymous Logon in the Enter the object names to select field and click OK. 29.MultiRouterTrafficGrapher.doc.docx 8
Figure 11: Permissions for html 36. By default the group will have Read & Execute, List folder contents and Read permissions. Leave at the default. Click OK and OK again to close the Properties. 37. Now, double-click on Default Document. 38. Click Add. Figure 12: Add Default Document 39. Enter default.htm in the Name field and click OK. 40. At this point, you can access the graphs but the images will not display until permissions are granted to the c:\perl\mrtgdata\html directory. Navigate to c:\perl\mrtgdata. 41. Right-click on the html directory and select Properties. 29.MultiRouterTrafficGrapher.doc.docx 9
Multi-Router Traffic Grapher (MRTG) 42. Click on the Security tab. Figure 13: Security Viewing the Results 43. Highlight ANONYMOUS LOGON and verify that Read & execute, List folder contents and Read permissions are checked. Click OK. 1. Navigate to http://yourfqdn.com/labtech/mrtg to see the resulting page. 29.MultiRouterTrafficGrapher.doc.docx 10
Figure 14: Sample Resulting Page 2. Click on the graph to open additional details. 29.MultiRouterTrafficGrapher.doc.docx 11
Figure 15: Traffic Analysis Multi-Router Traffic Grapher (MRTG) 29.MultiRouterTrafficGrapher.doc.docx 12
Notes Troubleshooting This adds load to the LabTech server so be aware of how many devices you are going to graph. Also, the CFGMaker will add every computer/device to your MRTG.cfg file so you will have to manually prune this to remove computers. Devices have to support SNMP and the probe needs to be configured with the community string before device graphing is possible. Devices have the capability to change the interface that is reported and computers will always report the combined bandwidth of all interfaces. To test if a device\computer will have the necessary information, double-click on the device or computer from the Control Center navigation tree and see if the Data Sent and Data Received fields have values. If you see MySql.Data * errors your ASP.NET 2.0 application is running with medium trust permissions, a context not allowing calls to unsigned assemblies. Set the trust level to full trust for ASP.NET 2.0 or download the MySql.Data.dll (can be downloaded at the bottom of this article) and place it in the directory you are running CFGMaker from. Document Revision History Date Notes 02/13/2013 New Document 29.MultiRouterTrafficGrapher.doc.docx 13