Missing MRTG config file
Question: I’ve installed OPENXTRA BASICS but MRTG does not work. I have looked at the files in \Program Files\OPENXTRA BASICS\MRTG\bin but the configuration file is missing. Any idea what’s gone wrong?
Answer: The bin directory should have a configuration file (usually around 3k bytes). It’s just a text file and if you double click on by default Notepad should open it. If it’s missing the chances are that you have not enabled the SNMP Services in Windows. Details of how to do this are in the OPENXTRA BASICS Getting Started guide, but I’ve reproduced them here.
Step 1 Click on the FireDaemon Service Manager on your desktop.
Stop the service.
Step 2 Install the Windows SNMP Services.
(See Installing Windows SNMP Services below)
Step 3 Run CFGMAKER from the command line.
(See Making an MRTG Configuration File by hand below)
Step 4 Click on the FireDaemon Service Manager on your desktop.
Restart the service.
Installing Windows SNMP Services
It is essential that you enable SNMP Services in Windows, some of the tools in the package rely on SNMP. Enabling SNMP is easy, just follow the steps below. There are small differences between versions of Windows.
Windows NT
Step 1 Click Control Panel.
Step 2 Double Click on Network.
Step 3 Click on Services.
Step 4 Click Add or Remove Services
Step 5 Select SNMP.
Step 6 Click Next.
Step 7 Click Finish.
Step 8 Close Add or Remove Programs and Control Panel.
The SNMP Services are now installed.
Windows 2000/XP
Step 1 Click Control Panel.
Step 2 Double Click on Add or Remove Programs.
Step 3 Click on Add or Remove Windows Components.
Step 4 Select Management and Monitoring Tools.
Step 5 Click Next.
Step 6 Click Finish.
Step 7 Close Add or Remove Programs and Control Panel.
The SNMP Services are now installed.
Making an MRTG Configuration File by hand
The package as delivered will make a basic configuration file for you. This is just a starter and you may wish to add things later on. By default MRTG configuration files will monitor Bytes In and Bytes Out for a specified device. However it is possible to monitor any SNMP variable if you know the OID.
To begin you need to have the following information to hand:
- The IP address (or name) of the device you want to monitor
- The SNMP OID of the variable you want to monitor
- The SNMP Community string name (Default is Public)
- If non standard the SNMP Port Number must be specified
Bytes In and Bytes Out do not need an OID, but all other OIDs need to be specified.
Configuration file example
In this example we want to build a basic configuration to monitor In and Out bytes for a device.
We do not know the device’s IP address, but we known the name, BART.
Step 1 Make a list of the details we know.
- IP address.We do not know the IP address, but we know the device name, BART.
- SNMP OID of the variable(s). Bytes In and Bytes Out do not need to be specified.
- SNMP Community string. Public is used in this case.
Step 2 In Windows click Start, select Command Prompt.
Step 3 Go to the MRTG\bin directory.
By default this is C:\Program Files\OPENXTRA\MRTG\bin, but your path may be different.
Step 4 Type the following commands.
perl cfgmaker --ifref=nr public@BART -global "WorkDir: c:\progra~1\openxt~1\mrtg\wwwroot" -global "RunAsDaemon: Yes" >mrtg1.cfg
Type the whole thing as one line. Make sure that you include a single space between commands as shown above. If you use long file names in Windows you will have to abbreviate them as shown. For example Program Files becomes Progra~1.
So what do the commands mean?
The aim is to make a configuration file called mrtg1.cfg and place it in c:\program files\OPENXTRA BASICS\mrtg\bin. The variable, WorkDir, defines the directory in which to place the HTML pages for viewing. Cfgmaker is the program that builds the configuration file. Cfgmaker looks for the specified machine, BART with the Community string Public. If it finds that machine then cfgmaker probes it for information about the active ports and so on.
The instruction --ifref=nr is the default and shows interface references by interface number.
The instruction, RunAsDaemon: Yes, ensures that MRTG will run continuously.

