# Golden Template Rule-Based Policy Execution

Golden Template Rule-Based Policy Execution enables NCCM to **automatically validate device configurations** against approved Golden Templates using Rules, Rule Groups, and scheduled Policies. This mechanism ensures continuous compliance monitoring and enables alerting and remediation when deviations are detected.

This use case demonstrates how to configure and execute a Golden Template–based compliance policy end to end.

## **Purpose**

* Enforce standardized device configurations using Golden Templates
* Automatically detect configuration deviations
* Trigger alerts and remediation actions on violations
* Maintain auditability for compliance operations

### **Expected Outcome**

After successful execution:

* Devices are validated against Golden Template rules
* Each device is marked as Complied or Violated
* Violation severity is applied as configured
* Notifications are sent to selected users
* Optional remediation jobs are created
* All actions are logged in the audit trail

### **Prerequisites**

* Golden Templates are created and available
* User has required privileges to manage Rules, Rule Groups, and Policies
* Devices are onboarded, and configuration backups are available

## **Use Case Workflow**

This use case consists of three mandatory steps:

* Create a Golden Template Rule
* Create a Rule Group
* Create and schedule a Policy

### **Step 1: Create a Golden Template Rule**

* Navigate to Network Configuration → Rules

A Golden Template Rule defines **what configuration must be validated**, **how violations are identified**, and **what action should be taken** when a violation occurs.

When **Golden Template** is selected as the Rule Type:

* The **Configuration** field is disabled
* Only Golden Templates matching the selected Vendor, OS Type, and user visibility are listed.

**Rule Information |** Add Rule

<table><thead><tr><th width="141">Label</th><th width="134.99993896484375">Action</th><th>Description / Example</th></tr></thead><tbody><tr><td><strong>Rule Name</strong></td><td>Enter value</td><td>Enter a unique name to identify the Golden Template rule.<br><br><strong>Example:</strong> Golden Template – Interface Compliance</td></tr><tr><td><strong>Description</strong></td><td>Enter value</td><td>Provide a short description explaining the purpose of the rule.<br><br><strong>Example:</strong> Validates interface configuration using a golden template.</td></tr><tr><td><strong>Vendor</strong></td><td>Select</td><td>Select the device vendor. This value controls the list of eligible Golden Templates.<br><br><strong>Example:</strong> Cisco.</td></tr><tr><td><strong>OS Name</strong></td><td>Select</td><td>Select the operating system of the devices. Only templates matching this OS are displayed.<br><br><strong>Example:</strong> IOS.</td></tr><tr><td><strong>OS Version</strong></td><td>Optional</td><td>Specify the OS version if the rule must apply only to a specific version. If left empty, all versions are considered.</td></tr><tr><td><strong>Rule Type</strong></td><td>Select</td><td>Select Golden Template. When selected, the Configuration field is automatically disabled as per system design.</td></tr><tr><td><strong>Configuration</strong></td><td>System disabled</td><td><p>Select the configuration source against which the Golden Template validation must be performed. This field remains enabled for Golden Template rules and allows you to choose between device configuration types.<br><br><strong>Available options:</strong><br></p><ul><li><strong>Running</strong> – Validates the current running configuration on the device.</li><li><strong>Startup</strong> – Validates the startup configuration stored on the device.</li></ul><p><br><strong>Example:</strong> Select Running to validate the live device configuration against the Golden Template.</p></td></tr><tr><td><strong>Status</strong></td><td>Enable / Disable</td><td>Enable to allow rule execution. Disabled rules are ignored during policy execution.</td></tr></tbody></table>

<figure><img src="https://content.gitbook.com/content/E4mkwSP8a1BSD9BFNFav/blobs/vt1U0zs8g0pdu59fB50e/Unknown%20image" alt=""><figcaption></figcaption></figure>

**Match Criteria |** Add Rule

<table><thead><tr><th width="146.5999755859375">Label</th><th width="172.00006103515625">Action</th><th>Description / Example</th></tr></thead><tbody><tr><td><strong>Select and Load Template</strong></td><td>Select</td><td>Displays only Golden Templates that match the selected Vendor, OS Name, and are visible to the logged-in user (Public or Private).</td></tr><tr><td><strong>Golden Template Pattern</strong></td><td>Auto-populated / Edit</td><td>Displays the configuration pattern loaded from the selected Golden Template. Patterns define the expected configuration structure using regex.</td></tr><tr><td><strong>Ignore Patterns</strong></td><td>Enter regex</td><td>Specify regex patterns to exclude matching configuration lines before validation.<br><br><br><strong>Example:</strong> ^ntp clock-period.*</td></tr><tr><td><strong>Regex Validation</strong></td><td>System validation</td><td>Both Golden Template Pattern and Ignore Pattern fields accept only valid regex. Invalid patterns block navigation and display an error message.</td></tr></tbody></table>

**Validation Rules:**

* Only valid regular expressions are allowed
* Invalid regex patterns block rule creation
* Validation is case-insensitive<br>

  <figure><img src="https://content.gitbook.com/content/E4mkwSP8a1BSD9BFNFav/blobs/OtUgViSxEQX2amAS7ssf/Unknown%20image" alt=""><figcaption></figcaption></figure>

**Remedy Action |** Add Rule

<table><thead><tr><th width="137">Label</th><th width="140.20001220703125">Action</th><th>Description / Example</th></tr></thead><tbody><tr><td><strong>Violation Severity</strong></td><td>Select</td><td>Define the severity level raised when the rule violates.<br><br><strong>Values:</strong> Critical, Major, Minor</td></tr><tr><td><strong>Rule Violation Message</strong></td><td>Enter value</td><td>Message displayed when a violation occurs.<br><br><strong>Example:</strong> Golden Template Rule Violates</td></tr><tr><td><strong>Notifier</strong></td><td>Select</td><td>Select one or more users or entities to receive violation notifications.</td></tr><tr><td><strong>On Violation Perform</strong></td><td>Select</td><td>Define the remediation action to execute on a violation.<br><br><strong>Options:</strong> Script Execution, Rollback to Baseline, Rollback to Previous</td></tr><tr><td><strong>Remediation Comments</strong></td><td>Optional</td><td>Enter notes describing the remediation logic or expected corrective action.</td></tr></tbody></table>

![](https://content.gitbook.com/content/E4mkwSP8a1BSD9BFNFav/blobs/P5knJfnVvKXCtxcw0d9p/Unknown%20image)

### **Step 2: Create a Rule Group**

* Navigate to Network Configuration → Rule Group

A Rule Group associates one or more Golden Template rules with a **specific set of devices**.

**Rule Group information |** Add Rule Group

<table><thead><tr><th width="132.199951171875">Label</th><th width="164.59991455078125">Action</th><th>Description / Example</th></tr></thead><tbody><tr><td><strong>Name</strong></td><td>Enter value</td><td>Enter a name for the Rule Group that logically groups Golden Template rules.<br><br><strong>Example:</strong> Golden Template Check Devices</td></tr><tr><td><strong>Description</strong></td><td>Optional</td><td>Provide a brief description of the rule group's purpose.</td></tr><tr><td><strong>Status</strong></td><td>Enable / Disable</td><td>Enabled rule groups are eligible for policy execution.</td></tr><tr><td><strong>Visibility</strong></td><td>Select</td><td>Choose who can view and use this rule group.<br><br><strong>Values:</strong> Public, Private</td></tr><tr><td><strong>Vendor</strong></td><td>Select</td><td>Select the vendor of devices to which the rule group applies.<br><br><strong>Example:</strong> Cisco</td></tr><tr><td><strong>OS Name</strong></td><td>Select</td><td>Select the OS of the devices to be validated.<br><br><strong>Example:</strong> IOS</td></tr><tr><td><strong>Asset Tags</strong></td><td>Optional</td><td>Filter devices using asset tags if tagging is configured.</td></tr><tr><td><strong>IP Address Range</strong></td><td>Enter value</td><td>Define the IP range of target devices.<strong>Example:</strong> 10.0.4.*</td></tr><tr><td><strong>Exclude IP Address</strong></td><td>Optional</td><td>Exclude specific IPs or hostnames from rule execution.<br><br><strong>Example:</strong> 10.0.4.5</td></tr></tbody></table>

![](https://content.gitbook.com/content/E4mkwSP8a1BSD9BFNFav/blobs/ssbvQaSZ2m2BnyI2ccZf/Unknown%20image)

**Rule Selection |** Add Rule Group

<table><thead><tr><th width="159.4000244140625">Label</th><th width="126.79998779296875">Action</th><th>Description / Example</th></tr></thead><tbody><tr><td><strong>Associated Rules</strong></td><td>Add</td><td>Add one or more Golden Template rules to the rule group. Only the rules of the Golden Template are selectable.</td></tr><tr><td><strong>Actions</strong></td><td>Edit / Delete</td><td>Modify or remove the group's associated rules.</td></tr></tbody></table>

![](https://content.gitbook.com/content/E4mkwSP8a1BSD9BFNFav/blobs/Dqk1TdbY4K1I7g69Enls/Unknown%20image)

### **Step 3: Create and Schedule a Policy**

* Navigate to Network Configuration → Policies

A Policy defines **when and how often** Golden Template rules are executed.

**Add Policy |** Basic Details

<table><thead><tr><th width="128.20001220703125">Label</th><th width="154.59991455078125">Action</th><th>Description / Example</th></tr></thead><tbody><tr><td><strong>Policy Name</strong></td><td>Enter value</td><td>Enter a name to identify the policy.<br><br><strong>Example:</strong> Golden Template Policy</td></tr><tr><td><strong>Description</strong></td><td>Enter value</td><td>Describe the objective of the policy execution.</td></tr><tr><td><strong>Status</strong></td><td>Enable / Disable</td><td>Enabled policies execute based on the configured schedule.</td></tr><tr><td><strong>Rule Group</strong></td><td>Select</td><td>Associate one or more Golden Template rule groups with the policy.</td></tr></tbody></table>

![](https://content.gitbook.com/content/E4mkwSP8a1BSD9BFNFav/blobs/6uRu2atRy7zjqTrgk4eN/Unknown%20image)

### **Summary**

This use case demonstrates how to enforce configuration compliance across network devices using a **Golden Template–based rule execution workflow**. In this process, a Golden Template rule is created to validate device configurations against a predefined standard, grouped with relevant devices using a rule group, and executed through a scheduled policy.

Once the policy runs, device configurations are automatically evaluated for compliance. Devices that match the Golden Template are marked as compliant, while deviations are flagged as violations, triggering alerts and optional remediation actions such as script execution or rollback.
