Selecting the Statistic for a Query

Select the statistic for querying metric data in Monitoring. The statistic is the aggregation function applied to the set of raw data points at the specified interval.

Example: Mean Statistic
CpuUtilization[1m].mean()

For valid statistic options in MQL expressions, see Statistic. For alarm instructions, see Creating a Basic Alarm.

  • This section describes how to select the statistic 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 statistic using Basic mode (default), select from Statistic.
      • Count: Returns the number of observations received in the specified interval.
      • Max: Returns the highest value observed during the specified interval.
      • Mean: Returns the value of Sum divided by Count during the specified interval.
      • Min: Returns the lowest value observed during the specified interval.
      • P50: Returns the estimated value of the 50th percentile during the specified interval.
      • P90: Returns the estimated value of the 90th percentile during the specified interval.
      • P95: Returns the estimated value of the 95th percentile during the specified interval.
      • P99: Returns the estimated value of the 99th percentile during the specified interval.
      • Rate: Returns the per-interval average rate of change. The unit is per-second.
      • Sum: Returns all values added together, per interval.
    4. To select the statistic by updating the MQL expression, follow these steps:
      1. Select Advanced mode.
      2. Edit the text in the Query code editor box.
        For valid statistic options in MQL expressions, see Statistic.
    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 statistic (part of the MQL expression).

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

    For valid statistic options in MQL expressions, see Statistic.

    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 statistic (part of the MQL expression). For an example, see SummarizeMetricsDataDetails.

    For valid statistic options in MQL expressions, see Statistic.