Adding dynamic fields
Dynamic fields enable administrators to add custom fields to the system application components (for example, device inventory, jobs, and rule sets) to tailor the BMC Network Automation system to your operational needs. This topic describes how to add dynamic fields and provides examples of adding dynamic fields.
To add a dynamic field
- Open the Add Dynamic Field page by navigating to Admin > System Admin > Dynamic Fields > Add.
- Select a component type from the Components field.
Select values for the Assignment Mechanism and Value Type fields, and select values for the remaining fields that are displayed in the page. The selections in the Assignment Mechanism and Value Type fields determine the fields that are displayed in the rest of the page. Examples of the various available fields are provided below.
When you select User Assigned in the Assignment Mechanism field, field values are assigned by the user. For device dynamic fields, values are also assigned by the Device Import task. User-assigned dynamic fields can be created for most BMC Network Automation components (for example, job, rule, device, or policy). User assigned dynamic fields can track a device's location, maintenance contract number, maintenance expiration date, staff responsibility, and other attributes.
The following figure shows user-assigned dynamic fields. The fields that have been defined for devices are highlighted.
When you select System Assigned in the Assignment Mechanism field, the field value is populated through some automated means, and not manually from the device edit page. The value can be populated from an external source during a device import, from a discovered property in a custom device action, or by modifying the device through the web services API. The field types include date, integer, text, single-select menu, and multi-select menu.
When you select Auto Derived in the Assignment Mechanism field, field values are derived from one or more characters in a device's Name, Host Name, or IP Address. Auto Derived dynamic fields apply to devices. You can sort by, filter by, and auto-group by the derived field value.
When you select Configuration Profiled in the Assignment Mechanism field, field values are based on captured or detected attributes in a device's current Running configuration (for example, all defined ACL names). Configuration Profiled dynamic fields (also referred to as CAP) apply to devices. The queries are defined to detect or extract attribute values for populating the dynamic field. Configuration profiled dynamic fields are only shown if the device's device type (for example, Cisco IOS Switch/Router) and OS image version match the query defined in the dynamic field. For example, attributes profiled for Extreme switches are not shown for Cisco IOS Switch/Routers. CAP provides these operational benefits:- You can populate the device inventory with configuration file attributes for tracking, reporting, grouping and searching devices with common configuration attributes.
- As you can auto group based on CAP values, you can:
- Change Policies: Assign a policy to a group of devices with a common attribute (for example, all routers using Border Gateway Protocol (BGP)).
- Configuration Change Requests: Submit a span action (for example, Deploy to Active, Deploy to Stored, Snapshot) for a group of devices with a common attribute (for example, update the community string for devices provisioned for SNMP, update a common ACL).
- Rule Sets: Apply and audit rules for a group of devices with a common attribute (for example, all routers using BGP).
- Change Reports: Report on a group of devices with a common attribute (for example, show a Change Summary for all switches using VLAN Trunk Protocol (VTP)).
- Change Discrepancy and Compliance Monitoring: Monitor discrepancies and compliance violations by a group of devices with a common attribute (for example, monitor discrepancies for all perimeter routers using QoS policy-maps).
Configuration Profiled dynamic fields share these features:
- The dynamic field is evaluated when:
- A Network > Refresh Device Status request is submitted to refresh Configuration Attribute Profiles.
- A device snapshot with a changed configuration is completed and the Admin > System Parameter named Perform Configuration Attribute Profiling After Snapshots is enabled.
The dynamic field must be assigned to a device to be visible in the device inventory. You can assign the dynamic field to the Entire Network or to a selected Group(s). For example, if the dynamic field is unique to Wireless Access Points, assign the field to the auto group called Model.<wap model>.
- The dynamic field can be assigned multiple Queries. Each query is bound to a unique Device Type and OS Version (value, range). Therefore, one dynamic field specification (for example, ACL-Extended) can service different Device Types (for example, Foundry, Cisco) and associated OS Versions. The dynamic field is empty if the field is assigned to a device that does not have a Query specified for the device's Device Type and OS Version.
- Click Save to save the values selected for your dynamic field.
Example Add Dynamic Field pages
The following sections provide example Add Dynamic Field pages for the values made available for the various combinations of Assignment Mechanism and Value Type field values.
- Assignment Mechanism: User Assigned and Value Type: Date example
- Assignment Mechanism: User Assigned and Value Type: Integer example
- Assignment Mechanism: User Assigned and Value Type: Text example
- Assignment Mechanism: User Assigned and Value Type: Single Select Menu example
- Assignment Mechanism: User Assigned and Value Type: Multi Select Menu example
- Assignment Mechanism: System Assigned example
- Assignment Mechanism: Auto Derived example
- Assignment Mechanism: Configuration Profiled and Value Type: Capture Attribute Value example
- Assignment Mechanism: Configuration Profiled and Value Type: Detect Attribute Presence example
Assignment Mechanism: User Assigned and Value Type: Date example
The following fields are displayed when you select User Assigned in the Assignment Mechanism field and Date in the Value Type field.
- Name: Specify the field label (for example, Maintenance Begin, Maintenance End).
- Annotation: (Optional) Specify a note or a comment.
- Display in Lists: (Optional) Specify if the field should be displayed in the component list (that is, sort by).
- Display in Filter: (Optional) Applicable when the component list can be filtered. Indicates if the dynamic field should be available on the component filter when filtering the list (for example, Device, Group, Templates and Job lists).
- Auto-Group: (Optional) Applicable when the Component is Device. For Date dynamic fields it is often more useful to use the Filter and Views than to use auto grouping. Using the component Filter, you can search by more granular date ranges such as Before, Last 30 Days, Yesterday, Range, and so on.
- Required: (Optional) Specify whether the field must be assigned a value (*).
- Export to Warehouse: (Optional) Specify whether the dynamic fields are available in the data warehouse database and in the BMC Decision Support – Network Automation.
- Applicable Device Type(s): Specify whether the field is applicable to all device types or to one or more selected device types.
- Minimum Value: (Optional) Specify the minimum date that can be assigned.
- Maximum Value: (Optional) Specify the maximum date that can be assigned.
- Default Value for New Components: (Optional) Specify a default value to be assigned to new components.
- Value to Assign to Existing Components Without a Value: (Optional). When Required is selected, you can assign a value to existing components that currently have no value.
Assignment Mechanism: User Assigned and Value Type: Integer example
The following fields are displayed when you select User Assigned in the Assignment Mechanism field and Integer in the Value Type field.
- Name: Specify the field label.
- Annotation: (Optional) Specify a note or a comment.
- Display in Lists: (Optional) Specify if the field should be displayed in the component list (that is, sort by).
- Display in Filter: (Optional) Applicable when the component list can be filtered. Indicates if the dynamic field should be available on the component filter when filtering the list (for example, Device, Group, Templates and Job lists).
- Auto-Group: (Optional) Applicable when the Component is Device. For Integer dynamic fields it is often more useful to use the Filter and Views than to use auto grouping. Using the component Filter, you can search by more granular integer ranges such as Less Than, Equal To, Range, and so on.
- Required: (Optional) Specify whether the field must be assigned a value (*).
- Export to Warehouse: (Optional) Specify whether the dynamic field is available in the data warehouse database and in the BMC Decision Support – Network Automation.
- Applicable Device Type(s): Specify whether the field is applicable to all device types or to one or more selected device types.
- Minimum Value: (Optional) Specify the minimum integer value that can be assigned.
- Maximum Value: (Optional) Specify the maximum integer value that can be assigned.
- Default Value for New Components: (Optional) Specify a default value to be assigned to new components.
- Value to Assign to Existing Components Without a Value: (Optional) When a field is required, you can assign a value to existing components that currently have no value.
Assignment Mechanism: User Assigned and Value Type: Text example
The following fields are displayed when you select User Assigned in the Assignment Mechanism field and Text in the Value Type field.
- Name: Specify the field label.
- Annotation: (Optional) Specify a note or a comment.
- Display in Lists: (Optional) Specify if the field should be displayed in the component list (that is, sort by).
- Display in Filter: (Optional) Applicable when the component list can be filtered. Indicates if the dynamic field should be available on the component filter when filtering the list (for example, Device, Group, Templates and Job lists).
- Auto-Group: (Optional) Applicable when the Component is device. Indicates if the system should automatically group devices by values assigned to the dynamic field. When Groups are displayed, an auto-group is shown as Name.Value (for example Location.ATL).
- Required: (Optional) Specify whether the field must be assigned a value (*).
- Export to Warehouse: (Optional) Specify whether the dynamic field is available in the data warehouse database and in BMC Decision Support – Network Automation.
- Applicable Device Type(s): Specify whether the field is applicable to all device types or to one or more selected device types.
Maximum Length: Specify the maximum length of the dynamic field.
- Default Value for New Components: (Optional) Specify a default value to be assigned to new components. You can specify up to 255 characters.
- Value to Assign to Existing Components Without a Value: (Optional) When a field is required, you can assign a value to existing components that currently have no value. You can specify up to 255 characters.
Assignment Mechanism: User Assigned and Value Type: Single Select Menu example
This option is used to create menu-based fields that allow a single value to be assigned. The following figure shows an example of a single value field:
The following fields are displayed when you select User Assigned in the Assignment Mechanism field and Single Select Menu in the Value Type field.
- Name: Specify the field label.
- Annotation: (Optional) Specify a note or a comment.
- Display in Lists: (Optional) Specify if the field should be displayed in the component list (that is, sort by).
- Display in Filter: (Optional) Applicable when the component list can be filtered. Indicates if the dynamic field should be available on the component filter when filtering the list (for example, Device, Group, Templates and Job lists).
- Auto-group: (Optional) Applicable when the Component is Device. Indicates if the system should automatically group devices by values assigned to the dynamic field. When Groups are displayed, an auto-group is shown as Name.Value (for example Location.ATL).
- Required: (Optional) Specify whether the field must be assigned a value (*).
- Export to Warehouse: (Optional) Specify whether the dynamic field is available in the data warehouse database and in BMC Decision Support – Network Automation.
- Applicable Device Type(s): Specify whether the field is applicable to all device types or to one or more selected device types.
- Default Value: (Optional) Specify a default value of the dynamic field.
- Permanent Options: Read-only list of the menu options that cannot be edited or deleted, This field appears for certain canned dynamic fields such as rule Category.
- Options: Define up to 1000 menu options for the dynamic field.
- Default Value for New Components: (Optional) Specify a default value to be assigned to new components.
- Value to Assign to Existing Components Without a Value: (Optional) When a field is required, you can assign a value to existing components that currently have no value.
Assignment Mechanism: User Assigned and Value Type: Multi Select Menu example
This option is used to create menu-based fields that allow multiple values to be assigned. The following figure shows an example of a multiple value field:
The following fields are displayed when you select User Assigned in the Assignment Mechanism field and Multi Select Menu in the Value Type field.
- Name: Specify the field label.
- Annotation: (Optional) Specify a note or a comment.
- Display in Lists: (Optional) Specify if the field should be displayed in the component list (that is, sort by).
- Display in Filter: (Optional) Applicable when the component list can be filtered. Indicates if the dynamic field should be available on the component filter when filtering the list (for example, Device, Group, Templates and Job lists).
- Auto-group: (Optional) Applicable when the Component is Device. Indicates if the system should automatically group devices by values assigned to the dynamic field. When Groups are displayed, an auto-group is shown as Name.Value (for example, Business Services.CRM).
- Required: (Optional) Specify whether the field must be assigned a value (*).
- Export to Warehouse: (Optional) Specify whether the dynamic field is available in the data warehouse database and in BMC Decision Support – Network Automation.
- Applicable Device Type(s): Specify whether the field is applicable to all device types or to one or more selected device types.
- Default Value: (Optional) Specify a default value of the dynamic field.
- Options: Define up to 1000 menu options for the dynamic field.
- Default Value for New Components: (Optional) Specify a default value to be assigned to new components.
- Value to Assign to Existing Components Without a Value: (Optional) When a field is required, you can assign a value to existing components that currently have no value.
Assignment Mechanism: System Assigned example
The following fields are displayed when you select System Assigned in the Assignment Mechanism field.
- Value Type: Select Text.
- Name: Specify the field label.
- Annotation: (Optional) Specify a note or a comment.
- Display in Lists: (Optional) Specify if the field should be displayed in the Device list (that is, sort by).
- Display in Filter: (Optional) Specify if the field should be available on the Device Filter.
- Auto-Group: Optional) Indicates if the system should automatically group devices by values assigned to the field.
- Export to Warehouse: (Optional) Specify whether the dynamic field will be available in the database warehouse and in the BMC Decision Support for Network Automation solution.
- Applicable Device Type(s): Specify whether the field is applicable to all device types or to one or more selected device types.
- Maximum Length: Specified the maximum length of the dynamic field. May not exceed 250 characters.
Assignment Mechanism: Auto Derived example
The following fields are displayed when you select Auto Derived in the Assignment Mechanism field.
- Value Type: Select Name Based to derive the field from the device's Name or Host Name/IP Address Based to derive the field from the device's Host Name/IP Address.
- Name: Specify the field label.
- Annotation: (Optional) Specify a note or a comment.
- Display in Lists: (Optional) Specify if the field should be displayed in Device list (that is, sort by).
- Display in Filter: (Optional) Specify if the field should be available on the Device Filter.
- Auto-Group: (Optional) Indicates if the system should automatically group devices by values assigned to the field.
- Export to Warehouse: (Optional) Specify whether the dynamic field is available in the data warehouse database and in BMC Decision Support – Network Automation.
- Derivation Mask: Specify whether to derive the field value from one or more character positions (for example, 1 to 3) or by using a regular expression (for example, ^(...) extracts the first three characters).
- Value to Assign if Derivation Fails: Specify a value to be assigned if the system cannot derive a value.
Assignment Mechanism: Configuration Profiled and Value Type: Capture Attribute Value example
This example illustrates how to capture all definitions of a configuration attribute. For example you can capture all ACLs, VLANs, VTPs, route maps, or policy maps defined in the device's configuration file. This example shows how to capture all extended access control lists (ACL) used by Cisco IOS devices in selected Groups.
For example, you can use a query (that is, regular expression) to capture and assign matched values. For example, the Query below captured two defined extended ACLs called block_list and no-gre-leaks-allow-vlan12-expected-traffic-in-v1.
The following fields are displayed in the Details tab when you select Configuration Profiled in the Assignment Mechanism field and Capture Attribute Value in the Value Type field.
- Name: Specify the field label.
- Annotation: (Optional) Specify a note or a comment.
- Enabled: (Optional) When enabled, the system evaluates the dynamic field value on device snapshots and Refresh Device Status span actions.
- Display in Lists: (Optional) Specify if the field should be displayed in the Device list (that is, sort by).
- Display in Filter: (Optional) Specify if you want to filter Devices (Device > Filter) by values assigned to the dynamic field. If you have many (for example, over 25) captured values, BMC strongly recommends clearing the option Display as Menu in Filter for best performance and ease of use when displaying the Device Filter. In this case, you can filter the field using wildcards vs. selecting a specific captured value from a menu.
- Auto-Group: (Optional) Indicates whether the system should automatically group devices by values assigned to the dynamic field. When Groups are displayed, an auto-group is shown as Name.Value (for example, ACL-E.block_list).
- Export to Warehouse: (Optional) Specify whether the dynamic field is available in the data warehouse database and in BMC Decision Support – Network Automation.
- Value to Assign When Attribute Not Found: (Optional) Specify the field value to assign if the query does not find the capture attribute (for example, ACL-E.none).
- Validate Query Substitution Parameters: (Optional) Validate use of global, device, and other substitution parameters used in the queries.
The following fields are displayed in the Spans tab when you select Configuration Profiled in the Assignment Mechanism field and Capture Attribute Value in the Value Type field. The Spans tab is used to associate the dynamic field with devices. You can associate the dynamic field with the entire network or with one or many selected network spans.
The following fields are displayed in the Queries tab when you select Configuration Profiled in the Assignment Mechanism field and Capture Attribute Value in the Value Type field. The Queries tab is used to define the queries to capture the field values.
- Device Type: Enter the device type compatible with this Query, or select All to apply this Query to all device types.
- Minimum OS Version: Enter the minimal OS version for which this Query is compatible. Enter the wild card (*) to specify any major, minor, or build version.
- Maximum OS Version: Enter the maximum OS version for which this Query is compatible. Enter wild card (*) to specify any major, minor, or build version.
- Applicable Trail: Select the configuration trail to be scanned, such as Startup, Running, or other arbitrary configuration files that result from taking snapshots (such as vlan.dat for Cisco IOS).
- Security Context: (Optional) When the selected device type supports multiple contexts, specify the security context such as Not a Security Context, Admin, System, or User-Defined, to narrow down which devices match this Query.
- Subject: Specify what attribute to find in the configuration.
- Pattern: Specify the Subject as a single pattern using regular expressions. For Capture Attribute Values you must specify a capture group (a part of the regular expression surrounded by parenthesis). In the example above, the Subject is capturing the extended ACL name (for example, block_list) using the regular expression (.*).
- Line: Specify the Subject as a single text line exactly as it appears in the configuration, with parenthesis around the part to be captured.
- Case Sensitive: (Optional) The Subject is sensitive to case.
- Ignore Whitespace: (Optional) Ignore leading and trailing spaces.
- Domain: Specify where the Subject should be found in the configuration.
- Entire configuration: Search for the Subject anywhere in the configuration.
- Selected blocks: Search for the Subject in all blocks bounded by a Begin line/pattern and End line/pattern.
- Ignore Comments: (Optional) Ignore all comment lines when searching for the query subject in the domain.
- Case Sensitive: (Optional) The begin/end of domain are sensitive to case.
Assignment Mechanism: Configuration Profiled and Value Type: Detect Attribute Presence example
This example illustrates how to determine whether a configuration attribute is present or absent. Our example shows how to detect if SNMP is configured on Cisco IOS devices.
In this example, a query is used to determine the presence of a configuration attribute. You specify what value to assign the dynamic field when the attribute is present or absent. For example, you could assign the dynamic field a value of Used if subject is present and Not Used if the subject is absent.
The following fields are displayed in the Details tab when you select Configuration Profiled in the Assignment Mechanism field and Detect Attribute Presence in the Value Type field.
- Name: Specify the field label.
- Annotation: (Optional) Specify a note or a comment.
- Enabled: (Optional) When enabled, the system evaluates the dynamic field value on device snapshots and Refresh Device Status span actions.
- Display in Lists: (Optional) Specify whether the field should be displayed in the Device list (that is, sort by).
- Display in Filter: (Optional) Specify whether you want to filter Devices (Device > Filter) by values assigned to the dynamic field.
- Auto-Group: (Optional) Indicates if the system should automatically group devices by values assigned to the dynamic field. When Groups are displayed, an auto-group is shown as Name.Value (for example, SNMP.Used or SNMP.Not Used).
- Export to Warehouse: (Optional) Specify whether the dynamic field is available in the data warehouse database and in the BMC Decision Support – Network Automation solution.
- Value to Assign When Attribute Found: (Optional) Specify the field value to assign if the query finds the attribute present (for example, SNMP.Used).
- Value to Assign When Attribute Not Found: (Optional) Specify the field value to assign if the query does not find the attribute (for example, SNMP.Not Used).
- Validate Query Substitution Parameters: (Optional) Validate use of global, device, and other substitution parameters used in the queries.
The Spans tab is displayed when you select Configuration Profiled in the Assignment Mechanism field and Detect Attribute Presence in the Value Type field. The Spans tab is used to associate the dynamic field with devices. You can associate the dynamic field with the entire network or with one or more selected network spans.
The following fields are displayed in the Queries tab when you select Configuration Profiled in the Assignment Mechanism field and Detect Attribute Presence in the Value Type field. The Queries tab is used to define the queries to detect the attribute.
- Device Type: Enter the device type compatible with this Query, or select All to apply this Query to all device types.
- Minimum OS Version: Enter the minimal OS version for which this Query is compatible. Enter a wildcard (*) to specify any major, minor, or build version.
- Maximum OS Version: Enter the maximum OS version for which this Query is compatible. Enter a wildcard (*) to specify any major, minor, or build version.
- Applicable Trail: Select the configuration trail to be scanned, such as Startup, Running, or other arbitrary configuration files that result from taking snapshots (such as vlan.dat for Cisco IOS).
- Security Context: (Optional) When the selected device type supports multiple contexts, specify the security context such as Not a Security Context, Admin, System, or User-Defined, to narrow down which devices match this Query.
- Subject: Specify what attribute to find in the configuration. The Subject is specified as a single pattern that can use regular expressions.
- Pattern: Specify the Subject as a single pattern using regular expressions.
- Line: Specify the Subject as a single text line exactly as it appears in the configuration.
- Case Sensitive: (Optional) The Subject is sensitive to case.
- Ignore Whitespace: (Optional) Ignore leading and trailing spaces.
- Domain:Specify where the Subject should be found in the configuration.
- Entire configuration: Search for the Subject anywhere in the configuration.
- Selected blocks: Search for the Subject in all blocks bounded by a Begin line/pattern and End line/pattern.
- Ignore Comments (Optional): Ignore all comment lines when searching for the query subject in the domain.
- Case Sensitive: (Optional) The begin/end of domain are sensitive to case.