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.
NoteWhen it comes to Agent based G1 templates, this feature is limited to Performance Monitors and Application Monitors.
Template Precedence is implemented to fix the problems below:
Different scope priority table
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
|Scope||Updated time of template||Priority|
|Client-Level Template T1||15-Jan-2022 04:08:14 PM||2|
|Client-Level Template T2||17-Dec-2022 05:09:17 PM||1|
In the above case, priority is based on the template that has the latest updated time.
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.
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.
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.