Macro library
Use the Macro library to create, edit, and manage your macros.
Creating macros
FortiAnalyzer includes a number of predefined macros. You can also create new macros, or clone and edit existing macros.
Macros are predefined to use specific datasets and queries. They are organized into categories, and can be added to, removed from, and organized in reports.
To create a new macro:
- If using ADOMs, ensure that you are in the correct ADOM.
- Go to Reports > Report Definitions > Macro Library, and click Create New. The Create Macro pane is displayed.
- Provide the required information for the new macro.
Name | Enter a name for the macro. |
Description | Enter a description of the macro. |
Dataset | Select a dataset from the dropdown list.The options will vary based on device type. |
Query | Displays the query statement for the dataset selected. |
Data Binding | The data bindings vary depending on the dataset selected. Select a data binding from the dropdown list. |
Display | Select a value from the dropdown list. |
- Click OK. The newly created macro is shown in the Macro library.
Managing macros
You can manage macros by Reports > Report Definitions > Macro Library. Some options are available as buttons on the toolbar. Some options are available in the right-click menu. Right-click a macro to display the menu.
Option | Description | |
Create New | Creates a new macro. | |
Edit | Edits the selected macro. You can edit macros that you created. You cannot edit predefined macros. | |
View | Displays the settings for the selected macro. You cannot edit a predefined macro. | |
Delete | Deletes the selected macro. You can delete macros that you create. You cannot delete predefined macros. | |
Clone | Clones the selected macro. | |
Show Predefined | Displays the predefined macros. | |
Show Custom | Displays the custom macros. | |
Search | Lets you search for a macro name. |
Viewing datasets associated with macros
To view datasets associated with macros:
- If using ADOMs, ensure that you are in the correct ADOM.
- Go to Reports > Report Definitions> Macro Library.
- Select a macro, and click View (for predefined macros) or Edit (for custom macros) in the toolbar.
- In the View Macro or Edit Macro pane, find the name of the dataset associated with the macro in the Dataset
- Go to Reports > Report Definitions> Datasets.
- In the Search box, type the name of the dataset.
- Double-click the dataset to view it.