FortiManager
FortiManager supports network operations use cases for centralized management, best practices compliance, and workflow automation to provide better protection against breaches.
HatiUjja
Staff
Staff
Article Id 418410
Description

This article explains how to add bulk per-device mappings to a Metadata Variable in FortiManager using either a CSV or JSON file.

Scope FortiManager.
Solution

Metadata Variables are commonly used to assign unique values, such as IP addresses to different devices within a FortiManager environment.

 

Each firewall can be configured with a distinct IP address for communication with external services. The example below demonstrates how to configure per-device mapping for a specific use case.

 

In this example, the variable Loopback_IP_threatfeed is used. Initially, it has:

  • A default value of 192.168.1.1.
  • A per-device mapping for one firewall, with a value of 10.1.1.1.
 
 

Object.png

 

Step 1: Export the Metadata Variable file.

 

Export the Metadata Variable in either CSV or JSON format.
The exported file contains the existing mappings, which can then be edited or extended.

 

Export.png

 

Step 2: Edit the file to add per-device mappings.

 

Open the exported file and add new entries for each device along with the corresponding values.
This can be done in either CSV or JSON format.

 

Example – CSV format:

 

example_csv.png

 

Example - JSON format:

 

example_json.png

 

This method is useful when managing a large number of FortiGate devices, each requiring a unique value, and saves time compared to manually creating mappings in the GUI.

 

Added per-device mapping for an additional 2 Firewalls in CSV format:

 

added_mapping_csv.png

 

Added per-device mapping for 2 Firewalls in JSON Format:

 

added_json.png

 

Step 3: Import the File Back into FortiManager.

 

After adding all required mappings, import the updated file back into FortiManager.
The import can be performed from the Metadata Variable section of the ADOM configuration.

 

Import_FMG.png

 

Metadata_import.png

 

Step 4: Verify and use the updated variable.

 

Confirm that all devices display the correct per-device values.

 

Import_verification.png

 

The updated Metadata Variable can then be referenced anywhere in the FortiManager configuration. For example, within Threat Feed settings, as illustrated below.

 

ThreatFeed_config.png

 

Summary:

Using CSV or JSON import to add per-device mappings provides an efficient method for managing large FortiManager deployments. This approach ensures consistency, saves time, and simplifies the process of assigning unique configuration values across multiple devices.