5.2   Compiling MIBs

Before you can compile MIB modules into AgenPro's internal format, a MIB repository has to be created where the compiled MIBs are stored. During the first startup of AgenPro you will be asked to specify a MIB repository.

Precompiled MIBs

AgenPro comes with a set of precompiled SMIv2 MIBs which are located in the repository directory of the AgenPro installation. AgenPro uses that directory as its initial default repository.

To Compile MIBs

1.   From the File menu, choose Compile MIBs (or AgenProManual00003.png from the main tool bar). A file open dialog will appear.

If MIB list support is activated in Preferences selecting a single file for MIB compilation will cause AgenPro to parse the file as a list of MIB file names to compile. The text file must then contain a single file path per row.

2.   Choose a MIB file, ZIP file or a directory and click Open. If you choose a file, then that file will be compiled and all contained MIB modules (typically one) are stored into the MIB repository

If you choose a directory or a ZIP file, then recursively all contained files will be parsed. All successfully parsed MIBs will be automatically sorted by their dependencies and then compiled into the MIB reposi­tory. Directories may also contain ZIP files.

3.   After compilation a message dialog with summary information is shown.

4.   Press Details to open the Compiler Log window (see Figure 1). It lists status information for each MIB file compiled. A MIB file that failed to compiled has a status Failed in the status column. To view the errors detected for that file, click on the + sign in the first column of that row. The error list will then be expanded. By double clicking on an error description, the failed MIB file is opened for editing and later recompilation.

5.   The MIB modules of the successfully compiled MIB files are automat­ically stored in the MIB repository. From there, the MIB modules can be loaded into the MIB Explorer application.
Existing MIB modules will be overwritten (updated). If you do not want to change any MIB modules that already exist in the current MIB repository, then use Compile New MIBs from the File menu.

5.2.1   Compiler Log

The Compiler Log dialog lists the status of all MIB files of a compilation run. If the compilation of a MIB file failed, the Status column displays the text Failed. The error messages for that file can be expanded by clicking on the + sign of the file's row. By selecting an error message, its description text will be displayed in the text pane on the bottom of the dialog.

The file name of the MIB file is displayed in the File column, whereas its complete path is displayed in the Path column.

AgenProManual00004.png

 

Figure 1:   Compiler Log window with compilation errors displayed per MIB module.

To Correct a MIB File

Double click on the row corresponding to the MIB file you want to edit. The MIB file editor window will appear (see section “MIB File Editor” on page 55). Alternatively, you may double click on an error message to directly jump to that error location in the file.

If the error message selected includes location information about the error's line and column, then the editor's cursor will be placed at that location in the MIB file. When you have clicked on the file, the first error will be located. Otherwise, the first occurrence of the object name corresponding to a semantic error will be searched. The next occurrence of the object name may be found with the Find Again button AgenProManual00005.png.

After having fixed the error, the MIB file can be saved and compiled again by using the Import button AgenProManual00006.png.

Tip: You can print the expanded compiler log's content from the context menu.

If the compilation was successful, the editor window will be closed. Otherwise the cursor of the editor will be positioned on the new error.