1Z0-1067-25 Question 123
Single answerYou have a group of Oracle Cloud Infrastructure compute instances that are all tagged with key "environment" and value "production". You want to create an MQL query to view the average CPU utilization across these production instances over the last hour in the Monitoring service console. Which query properly accomplishes this goal?
- A
CpuUtilization[1h]{environment='production'}.mean()
- B
CpuUtilization[1h]{resourceTags.environment='production'}.avg()
- C
CpuUtilization[1h]{resourceTags."environment"='production'}.mean()
- D
CpuUtilization[1h]{tag.environment='production'}.sum()
Show answer and explanation
Correct answer: C
Explanation
In OCI's Metric Query Language, resource tags must be referenced correctly using 'resourceTags."tagKey"'. The correct aggregator for calculating an average is 'mean()'. Refer to the Oracle Cloud Infrastructure Monitoring documentation for best practices on crafting MQL queries, including how to properly filter on resource tags and apply aggregators.
- A. Incorrect.
Option 1: Incorrect. The tagging syntax is incomplete. In OCI MQL, using environment='production' alone is not valid for resource tags. The environment key must be referenced through 'resourceTags."environment"' or within dimension filters if named accordingly.
- B. Incorrect.
Option 2: Incorrect. Although it begins to use resourceTags for filtering, 'avg()' is not the correct aggregator name in standard MQL for average CPU utilization. 'mean()' is typically used for average in MQL.
- C. Correct.
Option 3: Correct. This properly references the resource tag using 'resourceTags."environment"' and applies the 'mean()' aggregator to calculate the average CPU utilization over the last hour.
- D. Incorrect.
Option 4: Incorrect. Although the resource tag syntax might be similar to an older dimension-based approach, 'tag.environment' in MQL does not consistently reference resource tags. Additionally, 'sum()' would retrieve the sum of CPU utilization values across the time series, not the average.