Use SQL Queries

You can create visualization panels by querying the Enterprise Manager data.

Query Builder

The Oracle Enterprise Manager App for Grafana supports pulling metric data from published Enterprise Manager MGMT$ repository views, for example MGMT$METRIC_DETAILS, utilizing SQL queries.

Note:

MGMT$_views are only needed when extracting data from an Oracle Enterprise Manager Repository.
For more information about Enterprise Manager Management Views, see About Management Repository Views.

Graphic shows query builder options.

There are three built-in time series queries.

  • Raw: Option pulls data from sysman.MGMT$METRIC_DETAIL.

    Usage Guideline: Data kept for a month.

  • Hourly: Option pulls data from sysman.MGMT$METRIC_DAILY.

    Usage Guideline: Data kept for three months.

  • Daily: Option pulls data from sysman.MGMT$METRIC_HOURLY.

    Usage Guideline: Data kept for six months.

  • Custom (Target)/Custom (Repository) Option pulls data from any tables based on your own query. You extract data from and Enterprise Manager Repository using repository views.

    Note:

    When writing your own SQL query, it must have following column aliases:
    • time_sec - This column must be a date/timestamp data type column.
    • value - This column must be a number data type column.
    • metric - This column must be a string data type. It can also be a hard-coded string.
    SELECT
    <time_column> as time_sec,
    <value column> as value,
    <series name column> as metric
    FROM <table name>
    WHERE <your where conditions>
    ORDER BY <time_column> ASC;

    Graphic shows custom query parameters.

Query Type - "Non-time series" using MGMT$ Views

Select the Non-time series Query Type to query from the Enterprise Manager repository tables:

Note:

The Non-time series option is used for table visualization only. It will not work with any other graph-oriented visualization.

Query management views.

Note:

For more information about Enterprise Manager Management Views, see About Management Repository Views.