PCA (Prometheus Certified Associate) sample exam question with answer 95

Question:
Which of the following expressions is valid for creating an alert rule in Prometheus?

  1. rate(my_metric[5m]) > 1
  2. my_metric > 1 and on(instance) some_node == 'example.com'
  3. my_metric > 1 and job == 'prometheus' for 5m
  4. avg_over_time(my_metric[5m]) > 1 and instance =~ /10\.0\.0\..*/
Answer:
D - To create an alert rule in Prometheus, you need to specify a query that defines the condition for the alert, and an expression that evaluates to a boolean value (true or false) based on the query results