Create Metric Widgets

You can create metric widgets to view saved search generated metric data and other metric data that are stored in OCI Monitoring service.

  1. Open the navigation menu and click Observability & Management. Under Ops Insights, click Dashboards.
  2. If you want to create a new dashboard and add the new metric widget to it, then in the Dashboards page, click Create Dashboard.

    Alternatively, if you want to add a new metric widget to an existing dashboard, then open the dashboard by clicking on its name in the Dashboards page, and select Edit from the Actions drop-down menu.

  3. In the Widgets tab on the right of the page, click Create Metric Widget.

    This opens the metric widget creation page.

  4. Click the scope filter button scope filter icon on the top left corner, and select the metric compartment where the metric data is available.
  5. You now must identify the source of data to generate the metrics. Under Data, click Add button Add icon next to Source Data.

    The Add Source Data dialog box opens.

  6. In the Add Source Data dialog box, select the following properties:
    • Data Source: Select All Metric Sources to retrieve data from OCI Monitoring service.
    • Namespace: Select the applicable namespace from those that you have access to.
    • Metrics: Based on the previous two selections, this menu gets refreshed with the names of all the metrics available after applying those filters. Select the metrics that you want to use. Alternatively, to have the option of deciding to select the metrics later, you can specify All Metrics.

    Click Add.

    Repeat steps 5 and 6 to add more metrics to Source Data.

    All the selected metrics are now listed under Source Data.

  7. Drag and drop the metrics that you want to visualize from Source Data section to Y Axis section. Alternatively, in the Source Data section, you can click Actions button Actions icon next to the metric name, and click Add to Y Axis.

    You can now see the chart where the selected data is plotted along Y axis.

    Additionally, you can add more metrics to Y Axis section and visualize multiple metrics together.

  8. You can customize your visualization by specifying or modifying the following visualization options:
    • Time Range: Select the time range from the time selector on the top right corner to have data available for the visualization in that range.
    • Chart Type: You can select from Area Chart, Line Chart or Bar Chart based on the type of data that you want to visualize.
    • Y Axis Title: Specify a title for the data projected on the Y Axis.
    • Legend: You can specify the location of the legend as Top, Bottom, Left, Right, or None. If you have multiple metrics in the visualization, then you can hover on the legend of a specific metric to emphasize that data in the combined chart.
    • Correlated Tooltips: If you want to correlate the tooltips across all your metric widgets in the dashboard, then check this box.
      Result of enabling correlation tooltips option

    • Stacked: If you have multiple metrics in the visualization, and you want to stack the two charts for better viewing, then check this box.
    • Use Solid Color: This option is checked by default when you use area chart. When you use area chart for visualization, the area that represents the presence of data is covered in solid color. When you uncheck this box, you can visualize the area chart with a lighter color filled in the area. This also helps you to visualize multiple overlapping metrics in area chart mode.
  9. To edit the source data that you have identified for Y axis, click the Actions button Actions icon next to the metric name, and click Edit.

    The Edit Source Data dialog box opens. You can modify the following parameters of the source data:

    • Interval: Select the periodicity at which you want to view the data points.
    • Statistic: Apply any of the statistical functions like Rate, Mean, Sum, Min, Max, Count, 50 Percentile, 90 Percentile, 95 Percentile, or 99 Percentile.
    • Dimension Value: If the data in the metric is collected from multiple dimensions, then you can select one or more of those dimensions using this option.

    Click Save.

  10. Specify the name for the widget in the field provided above the chart.
  11. Click Apply to save the widget, and automatically add it to the dashboard.

    You can now drag your new metric widget to the right location, and modify its size.

    Click Done to save the dashboard.