Selecting the Interval for a Query

Select the interval, or time window, for querying metric data in Monitoring.

Example: One-Minute Interval
CpuUtilization[1m].mean()

Supported values for interval depend on the specified time range in the metric query (not applicable to alarm queries). More interval values are supported for smaller time ranges. For example, if you select one hour for the time range, then all interval values are supported. If you select 90 days for the time range, then only interval values between 1 hour and 1 day are supported. For valid interval options in MQL expressions, see Interval (Monitoring Query Language (MQL) Reference).

Illustration

The timestamp of the aggregated data point corresponds to the end of the time window during which raw data points are assessed. For example, for a five-minute interval, the timestamp "2:05" corresponds to the five-minute time window from 2:00:n to 2:05:00.

This image shows how the timestamp of an aggregated data point corresponds to the interval.

For alarm instructions, see Creating a Basic Alarm.

  • This section describes how to select the interval on the Metrics Explorer page. For alarm query edits, see Creating a Basic Alarm.

    1. Create a basic query on the Metrics Explorer page.
    2. If the query isn't open, open it by selecting Edit queries.
    3. To select the interval using Basic mode (default), select from Interval.
      • 1 minute
      • 5 minutes
      • 15 minutes
      • 30 minutes
      • 1 hour
      • 2 hours
      • 6 hours
      • 12 hours
      • 1 day
      • Custom - specify a Custom value and select a Unit (Minutes or Hours)
    4. To select the interval by updating the MQL expression, follow these steps:
      1. Select Advanced mode.
      2. Edit the text in the Query code editor box.
        For valid interval options in MQL expressions, see Interval (Monitoring Query Language (MQL) Reference).
    5. Select Update Chart.
  • Use the oci monitoring metric-data summarize-metrics-data command and required parameters to query metric data. Use the --query-text parameter to select the interval (part of the MQL expression).

    oci monitoring metric-data summarize-metrics-data --query-text <mql_expression> [...]

    For a complete list of parameters and values for CLI commands, see the Command Line Reference for Monitoring.

  • Run the SummarizeMetricsData operation to query metric data. Use the query attribute to select the interval (part of the MQL expression). For an example, see SummarizeMetricsDataDetails.