- 30 Oct 2023
- 9 Minutes to read
- Updated on 30 Oct 2023
- 9 Minutes to read
A device template is a user-configured blueprint of Netreo-specific monitoring and device management settings an administrator wishes to be applied to specific types of devices in their network. They provide a way for administrators to automatically configure newly onboarded managed devices for monitoring and to enforce that configuration while Netreo is monitoring the device. An administrator may create and apply as many device templates as required to cover the range of devices in their network that they need to monitor.
The following Netreo-specific settings may be automatically configured using a device template:
- Authentication credentials and a few misc. device settings
- Host alert contacts
- Service checks
- Threshold checks
- Log monitoring rules
- Configuration management rules
These settings are then applied to applicable managed devices during each discovery poll.
A device template does not need to include every setting available, however. Device templates that don't include a particular setting do not affect that setting on the device to which it is applied.
Creating a sensible device template strategy makes managing device monitoring settings simple and helps to enforce consistency in your monitoring configurations. Additionally, combining device templates with auto-configuration rules allows onboarding of new devices to be fully automated. (This is especially useful for networks with large numbers of devices to monitor.)
Two preconfigured device templates labeled "Default" and "Windows Default" come with your Netreo deployment, and already includes several settings to cover basic monitoring for all of your managed devices. These templates are automatically applied (as appropriate) to every newly onboarded device and may be customized as desired.
How Device Templates Work
An individual device template is essentially a user-configurable blueprint that tells Netreo what monitoring settings you would like applied to a managed device so that it can configure these settings for you automatically. When used together as a system, device templates can automatically configure monitoring settings for a wide variety of managed devices.
Please note that device templates can only apply their settings to managed devices that have their USE TEMPLATES setting set to ON. This setting is on by default for all devices, but may be manually turned off by an administrator for individual devices. (There is also a bulk change tool available for turning template usage on/off for multiple device at once. This tool is found on the Device Templates Administration page (Administration > Templates from the main menu) and labeled "Enable Template Usage.")
Device templates may be tuned to reduce alert noise even further than Netreo already does by default by using the Device Template Baseline Tool.
A newly created device template starts out empty, with no settings configured. An empty device template applied to a managed device will not affect any settings on that device. Individual settings must be added to a device template for it to have any effect.
The Device Template Hierarchy
Device templates have their settings applied to managed devices in the order shown below. (This is called the "device template hierarchy.") During its scheduled discovery poll, each managed device has any applicable device templates applied to it in the order listed.
Device template application order:
- Global ("Default" device template)
- Specific device type
- Specific device subtype
- Specific site (device group)
- Specific category (device group)
- Specific functional group (device group)
- Specific managed device (only recommended for use in unusual cases)
First, the "Default" device template is applied. After that, the template assigned to a device's device type is applied. Then, the template assigned to a device's device subtype is applied. And so on.
Remember that a device template is not required to configure every setting available. If a device template attempts to configure a particular setting for a managed device, but no templates applied after it attempt to configure that same setting, the setting is applied to the device without conflict. However, if more than one device template attempts to configure the same setting for a device, the last template applied that configures that setting will win out.
Each instance of an item in the hierarchy may have a different device template assigned to it. For example, you may choose to create different device templates to assign to every different device type in Netreo.
Be aware that it is not necessary for a device template to be assigned to every item the hierarchy. For example, your strategy may not include assigning templates to any site device groups. Or, you may assign templates to some sites, but not others.
Also, be aware that it is technically possible to assign a given device template to more than one place in the hierarchy. Although, this is not recommended.
What Changes Are Made
The following sections of a device template make direct changes to the monitoring settings of a managed device to which it is applied.
This section includes authentication credentials as well as a few miscellaneous device settings.
If a device template contains changes in this section, those changes overwrite the contents/settings of the matching fields found on the Main tab of the device's device administration page. Any individual field here may be configured, or left blank for no change.
Affected settings include:
- Authentication credentials and protocol settings for accessing the device's internal settings.
- How long Netreo will wait between sending alert notifications of the device being "down."
- How long the device may be "down" before it is automatically disabled in Netreo.
- Whether or not auto-configuration rules should be run on every discovery poll for this device.
(For applicable devices, the down-level logon name format is accepted in the USERNAME field of the Authentication section.)
Changes made to this section of the template require you to click the Update button to save the changes. No other template changes require doing this.
Host Alert Contacts
This section allows you to add host alert contacts to a managed device.
Unlike all other settings in a device template this section does not override other device templates, it can only add additional contacts to the device. (All host alert contacts from all device templates applied to a managed device will add those contacts cumulatively to the device.)
This section allows you to add service checks to a managed device to which a template is applied.
Any service checks added to a managed device by a device template will override any service checks with the same name (in the check's description field) added by templates applied earlier in the device template hierarchy or added directly to the device manually.
If any device template applied to a managed device (at any level in the hierarchy) is then dissociated from that device (e.g., by changing the device's assignments for type/subtype, device group, etc. or setting a device's USE TEMPLATES setting to OFF), any service checks added by the now dissociated template will remain intact on the device (thus preserving their historical data), but will be set to disabled (thus no longer collecting new data). Service checks disabled in this way may now be configured directly on a device (rather than in the template of origin) and re-enabled to be fully functional for that specific device only.
Deleting a service check from the configuration of a device template currently applied to a managed device will remove that service check from the device immediately, with no other action required. Be aware, however, that if other device templates applied to that device are configured with a service check with the same name, they will re-add that check to the device on the next discovery poll. Try to avoid deleting service checks on device templates applied to devices that have their USE TEMPLATES setting set to OFF as, by turning this setting off, the connection to the template is broken and Netreo cannot automatically remove the service check from the device when deleted from the template. You would then need to remove the check manually from any affected devices.
See also Add a Service Check to a Device Template.
This section allows you to add threshold checks to a managed device to which a template is applied.
Any threshold checks added to a managed device by a device template will override any threshold check settings for the same statistic added by templates applied earlier in the device template hierarchy or added directly to the device manually.
Threshold checks may not be removed from managed devices once added, but they may be disabled in the device template, thus disabling them on every device affected by that template. Remember that a device template applied later in the template hierarchy may re-enable any given disabled threshold check if it so configured in another device template.
Deleting a threshold check from a device template does not remove the check from affected devices, but rather unlocks the settings of the check so that it may be configured manually directly on the device, rather than in the template of origin.
See also Add a Logging Rule to a Device Template.
Configuration Management Rulesets
Basic Interface Filter
This section allows you to provide a regular expression that is used to filter the network interfaces of a device that will be monitored for availability. The regular expression used should be based on the name of the network interface. See the Instances Tab section of Device Administration for a more detailed explanation of how Netreo determines what interfaces for a given device will be monitored.
Normally, interfaces that are administratively up, but operationally down will not get discovered and added for monitoring. However, by adding <+nonop> to the beginning of your regular expression Netreo will discover and add those interfaces for monitoring. For example:
FastEthernet- adds interfaces that match the regular expression and are operationally up.
!!FastEthernet- adds interfaces that don't match the regular expression and are operationally up.
<+nonop>FastEthernet- adds interfaces that match the regular expression regardless of interface operational status.
!!<+nonop>FastEthernet- adds interfaces that don't match the regular expression regardless of interface operational status.
It is important to note that unlike other settings in a device template, once a basic filter has been added to a template and then applied to devices (thereby applying the basic filter to the devices), removing the basic filter from the device template will then actively remove the basic filter from the affected devices (at the next discovery poll). However, if the device template is deleted or otherwise removed from being applied to a set of devices to which it was previously applied, any basic filter applied by that device template will not be removed from the affected devices and must be removed manually using the Basic Filter button on the Instances tab of the Device Administration page for each device.
To remove a basic interface filter from a device template simply click the trashcan icon, or delete the contents of the filter field and click the save icon. Don't forget to Re-Apply Device Templates After Editing.
When Device Templates Get Applied
Device templates may also be applied to devices arbitrarily by administrators, by using the "Rediscover devices and apply templates" tool found on the Device Templates Administration page (Administration > Templates from the main menu). Basically, all this tool does is schedule the selected devices for an ad-hoc discovery poll.