Editing and syncing templates and instances

Changes on instances

After creating an instance of a template the instanced job, device, group or SLO can be edited manually. The following example shows a change made to the Subnet mask parameter and the EEM project root dir property of an instanced device:

The device deviates from its template in this particular parameter and property (and also in its Name and Address parameters) and thus the items are highlighted in orange.

Changes on templates

All changes to a template have immediate effect on all of its referenced instances. When e.g. changing a parameter of a job template, all job instances that were created from this job template will immediately reflect the change. This allows for efficient changes to a whole set of jobs, devices, groups or SLOs.

Editing a template works equally to the corresponding operations for standard jobs, devices, groups and SLOs. Go to /root/Templates and navigate to the template object, then choose Edit parameters from its dropdown list. The following example will edit a device template:

The Subnet mask parameter is set, an additional property EEM remote access is added and an existing property EEM project root dir is changed. A new custom property Comment is also added.

After applying this change, all devices that were created as an instance of this template will reflect the change:

On devices where certain parameters or properties were already changed manually before making the above change to the device template (as shown in the example above), those manual changes are not overridden by the template change. The assumption here is that manual changes happen for a reason and should not be overwritten. In this case the Subnet mask parameter and the EEM project root dir property were already changed so the template change did not affect these particular changes. They are highlighted in orange so the deviation is clearly visible.

Resyncing templates with their instances

In the above case one may still want to override the manually edited parameter and force the value configured on the device template to the device instance. This can be done in two ways.

Resyncing from the instance

When choosing Edit parameters from the device instance object, click the Resync button:

This fetches the configuration from the device template and overwrites the Subnet mask parameter with the value from the template:

Note, however, that the differing property value has not been synced. See the section Resync rules below.

When resyncing a device instance, its child jobs will also be synced, each according to the same Resync rules below.

Resyncing from the template

If one is sure that all instances of a template need to be synchronized to the template, the resync can also be done from the template object. Choose Edit parameters on the template and click Resync instances.

Resyncing rules

To restore the link between a template and its instance, use the Resync button.

A resync will not restore the following altered parameters of instances:

  • Instance name
  • Device address
  • Links (Alarm parent, outage parent, child objects)

A resync will

  • add new (custom) properties which have been added to the template
  • not delete any new (custom) properties that have been created on the instance after its creation
  • not modify any (custom) property parameters that have been changed on the instance

If a property within a template has a reference to another template object, the resync has to be done on the top object of the template to update the references of its children (all children will be resynced recursively).

Identifying template-instance relations

To find out which instances were created from a template, go to /root/Templates, dive into the template object and choose the relation Template to from the Relation list. All instances of the template are then shown in the list.

To find out which template an instance is linked to, choose the relation Template from on the instanced job, device, group or SLO.

 

Or to directly navigate to the template, click the link next to the Instance of item on the instanced object: