Alert Configuration for Monitoring a Unix Process on Compute Engine | PCD Exam Solution

Alert Configuration for Monitoring a Unix Process on Compute Engine

Question

You are deploying your application to a Compute Engine virtual machine instance with the Stackdriver Monitoring Agent installed.

Your application is a unix process on the instance.

You want to be alerted if the unix process has not run for at least 5 minutes.

You are not able to change the application to generate metrics or logs.

Which alert condition should you configure?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

B.

https://cloud.google.com/monitoring/alerts/concepts-indepth

The correct answer is C. Metric absence.

Explanation: To monitor a Unix process, the Stackdriver Monitoring Agent can be used to collect metrics on the system resource utilization of the process such as CPU, memory usage, disk I/O, etc. However, to monitor the process health, we would need some metrics that indicate that the process is running, such as the number of threads, open file descriptors, or the process status. If the application does not generate these metrics or logs, we cannot rely on them to monitor the health of the process.

Instead, we can use the "Metric absence" alert condition to alert us if a metric is missing for a certain period. In this case, we would configure the alert to trigger if the metric that indicates the process is running has not been received for at least 5 minutes. This would indicate that the process has stopped running or is not functioning correctly.

The other answer options are not suitable for this scenario.

  • Uptime check: Uptime checks verify that a resource is reachable over the network and can be used to verify the availability of a web server, load balancer, or other network services. However, it cannot be used to monitor a Unix process running on a virtual machine instance.

  • Process health: The "Process health" alert condition checks whether a process is running and healthy by verifying that it responds to a signal or returns an expected output. However, it requires us to modify the application to generate a response to the signal or output.

  • Metric threshold: The "Metric threshold" alert condition triggers an alert when a metric exceeds a certain value or falls below a certain value. However, it cannot be used to monitor the absence of a metric.