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

Question:
You are instrumenting your application for Prometheus. This application handles automated script-based remediations. Only a certain number of remediation processes are able to run at once and you ultimately want to have an alert that notifies you when more than 80% of the remediation processes are currently in use.
How should you BEST go about this?

  1. Define two metrics: one gauge metric called remed_processes_max and a separate gauge metric called remed_processes_running . When the application observes the ratio of remed_processes_running / remed_processes_max > 0.8 , send a notification via the Pushgateway
  2. Define a gauge metric called remed_utilization that tracks the utilization percentage. Create an alerting rule that alerts when the utilization exceeds the 80% threshold. Configure Alertmanager to send a notification via the desired channel
  3. Define a gauge metric called remed_utilization that tracks the utilization percentage. When the application observes this metric over the 80% threshold, send a notification via the Pushgateway
  4. Define two metrics: one gauge metric called remed_processes_max and a separate gauge metric called remed_processes_running . Create an alerting rule with expression remed_processes_running / remed_processes_max > 0.8 . Configure Alertmanager to send a notification to the desired channel
Answer:
D - correct
A - is incorrect as Pushgateway is not responsible for sending alert notifications, that is the responsibility of Alertmanager. Additionally, a Prometheus alerting rule should be used to evaluate the given query and generate an alert, not the application
B - is incorrect as it is a Prometheus best practice to split compound metrics like utilization into their component parts as it increases flexibility. Utilization is defined as the amount used out of some maximum so we can instead define a metric that tracks the usage and another that tracks the maximum
C - is incorrect as Pushgateway is not responsible for sending alert notifications, that is the responsibility of Alertmanager. Additionally, a Prometheus alerting rule should be used to evaluate the condition and generate an alert, not the application. Finally, it is a Prometheus best practice to split compound metrics like utilization into their component parts as it increases flexibility. Utilization is defined as the amount used out of some maximum so we can instead define a metric that tracks the usage and another that tracks the maximum