Creating a Query for Streams

Define a query for stream metric data (oci_streaming).

For more information about these metrics, see Streaming Metrics Reference.

For query troubleshooting, see Troubleshooting Queries.

  • To create a user-defined query for connector metric data in the Console, use the Metrics Explorer page.

    These steps show how to create a query in Basic mode. To create a query in Advanced mode (MQL), see Editing the MQL Expression for a Query.

    1. Open the navigation menu  and select Observability & Management. Under Monitoring, select Metrics Explorer.
      The Metrics Explorer page displays an empty chart with fields to build a query.
    2. In the navigation bar, select the region that contains the metric data that you want.
      For more information about regions, see Understand Regions and Working Across Regions.
    3. (Optional) To change the time range for the query, select the range you want from Quick Selects.
      Alternatively, you can define a custom range by specifying the Start time and End time.
    4. Select the metric:
      FieldDescription
      Compartment The compartment containing the resources that you want to monitor. By default, the first accessible compartment is selected.
      Metric namespace Select oci_streaming.
      Metric name Select the metric that you want. For example, select PutMessagesLatency.Time
    5. (Optional) To filter returned data by dimension, select a Dimension value and Dimension value.
      For example, to filter by stream, select resourceId from Dimension value and then select the stream OCID that you want from Dimension value.
    6. Select Update Chart.
      The chart shows the results of your query for the selected compartment and region.

    For information about directly editing MQL expressions or changing queries by using the CLI or API, see Editing the MQL Expression for a Query. For other querying tasks, see Querying Metric Data.

  • Use the oci monitoring metric-data summarize-metrics-data command and required parameters to query metric data. To query Streaming metrics, set --namespace to oci_streaming.

    oci monitoring metric-data summarize-metrics-data --namespace oci_streaming [...]

    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. To query Streaming metrics, set namespace to oci_streaming.