1Z0-1067-25 Question 126
Single answerYou want to create an alarm that triggers if the average CPU utilization over the past hour for all Compute instances in the Ashburn region exceeds 80%. Which of the following MQL queries correctly accomplishes this requirement?
- A
CpuUtilization[1h]{region='us-ashburn-1'}.mean() > 80
- B
CpuUtilization{region='us-ashburn-1'}.mean()[1h] > 80
- C
CpuUtilization[1h]{region='us-ashburn-1'}.sum() > 80
- D
CpuUtilization[1h].mean(region='us-ashburn-1') > 80
Show answer and explanation
Correct answer: A
Explanation
When using Metric Query Language (MQL) in Oracle Cloud Infrastructure, the standard syntax for querying a metric is MetricName[TimeWindow]{DimensionFilter}.Aggregator(). To monitor average CPU usage, use 'mean()' with the required dimension filters (e.g., region='us-ashburn-1') and time interval ([1h]). Refer to the OCI Observability and Management documentation for detailed best practices on constructing MQL queries and setting up alarms.
- A. Correct.
Option 1 is correct. The syntax follows the MQL format of
[ ]{ }. and correctly applies the 'mean()' aggregator for a 1-hour window. It compares the result to 80, matching the requirement for triggering an alarm above this threshold. - B. Incorrect.
Option 2 is incorrect because the time window [1h] is misplaced after the aggregator, which does not follow the standard MQL notation. In MQL, the time window and dimension filter must come immediately after the metric name, followed by the aggregator function.
- C. Incorrect.
Option 3 is incorrect because it uses the 'sum()' aggregator instead of 'mean()'. Summation would not provide an average CPU utilization but rather the total CPU utilization across all instances, which does not meet the requirement to check for average usage above 80%.
- D. Incorrect.
Option 4 is incorrect because it incorrectly places the dimension filter inside the aggregator function. The dimension should appear in curly braces immediately after the time window, before applying the aggregator. This syntax would cause an error in MQL.