Create Dashboards Using Predefined Templates

The Oracle Enterprise Manager App for Grafana comes with a set of predefined dashboard templates that you can use to create new Grafana dashboards without having to develop them from scratch.

To display the available templates and sample dashboards:

  1. Select Manage from the Dashboards menu.
    Dashboards menu.

    All available dashboard samples and templates are displayed.

  2. Click on the desired template to begin using that template.

IMPORTANT: Before making any changes to a template dashboard, click Save As to clone it, otherwise your changes will be lost.

Usage Tips

Template Variables

Dashboards inherit specific Enterprise Manager information via a set of variables shown in the following table.

Table 5-1 Grafana-Enterprise Manager Variables

Variable Definition
$oem_gf_emsite Enterprise Manager Site
$oem_gf_target_type Target Type
$oem_gf_target_name Target Name
$oem_gf_metricgroup Metric Group
$oem_gf_metric Metric defined in the above metric group
$oem_gf_named_credential Named Credential of a target

When you clone a template dashboard, your dashboard will automatically inherit one or more of below template variables based on the template dashboard you have cloned it from: $oem_gf_target_type, $oem_gf_target_name, $oem_gf_emsite, $oem_gf_named_credential.

There are query builder level variables tagged to the drop-down respectively. $oem_gf_target_type, $oem_gf_target_name, $oem_gf_metricgroup, $oem_gf_metric, $oem_gf_named_credential which can be used in case the template variables at the dashboard level are not created.

The following example demonstrates how to reference the Template Variables in a SQL query.

select <col1>, <col2>
from <table>
where target_type = $oem_gf_target_type
and target_name in ( $oem_gf_target_name )

Variable Scope

Variable scope determines the precedence with which the variable is used.

The precedence rules are:

  1. Dashboard level scope always has the priority over the query builder level scope.
  2. If no template variable of $oem_gf_target_type, $oem_gf_target_name is not available in the dashboard level, the value will be replace with the query level scope values.
  3. If a template variable is absent in the query builder scope. It will be replaced with an empty string.
  4. The scope of query builder level variables is at the Queries tab only.