If two or more templates have the same metrics with different frequency and scopes, and they are assigned on one device, then the monitoring data is collected for both the metrics which have the same result. This will lead to duplicate alert generation, metric data collection and graphs. To solve this problem, OpsRamp introduced Template Precedence.

Right now, it is limited to only G1 (Generation 1) based templates.

Solution

Template Precedence is implemented to fix the problems below:

Different scope priority table

ScopePriority
Client-Level Template1
Partner-Level Template 2
SP-level Template3
Global-Level Template4

In the above case:

  • Priority is based on the template scope.
  • Only the template with the lowest priority number will be considered.

Same scope priority table

ScopeUpdated time of templatePriority
Client-Level Template T115-Jan-2022 04:08:14 PM2
Client-Level Template T2 17-Dec-2022 05:09:17 PM1

In the above case, priority is based on the template that has the latest updated time.


Scenarios

  1. If a metric exists in a partner-level template and a global-level template, and both the templates are applied to one device, then the partner-level metric is considered as the final metric.

  2. If a metric exists in a partner-level template, global-level template, and device-level monitor (the monitor is directly assigned to the device using assign monitor option) and all these three are assigned on the same device, then the device-level metric is considered as the final metric.

  3. If a metric exists in two templates, and these templates have the same priority, then the template that has the latest updated time is considered.


What is going to change?

Devices that have the same metrics in different templates will be impacted.

The changes can be seen in the UI: Infrastructure > Device View > Monitors

Low level priority metrics will be considered, the remaining will be stricken off, and only active metrics are monitored.