Alerting when a Unix process stops running on Compute Engine
Short answer
B Configure a process-health alerting condition that fires when no process matching your Unix process pattern has run for at least 5 minutes.
Question
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?
Key Takeaways
It tests the choice between condition types — the trap is picking metric absence (C), which detects missing data rather than a process that has stopped running.
This PCD question tests which Cloud Monitoring condition detects a stopped Unix process on Compute Engine with the Stackdriver Monitoring Agent. The correct choice is a process-health policy (B), which alerts when no matching process has been available for the configured duration.
Common mistake: Choosing C, metric absence: it fires when a metric stops reporting, but the absence of data can also come from agent or collection gaps, and no process-level metric is specified — the purpose-built process-health condition is the designed answer.
Expert Analysis
The governing principle Cloud Monitoring defines alerting policies by condition type, and each type answers a different question about a signal. Here the question is narrowly about liveness of one local Unix process on a Compute Engine VM: the Stackdriver Monitoring Agent is installed, and the application cannot be changed to emit its own metrics or logs — so the signal must already be collected by the agent.
Why B is correct The process-health condition type is purpose-built for this. It evaluates the count of processes matching a pattern (process name, user, and so on) as reported by the Monitoring Agent, and fires when that count crosses a threshold — normally zero matching processes — for a configured duration. Google's documentation illustrates exactly this shape: an alert that triggers when no process matching a pattern has been available for longer than a stated period. That maps directly onto "the Unix process has not run for at least 5 minutes," and it requires no application change because the agent already supplies the process metrics. Option B is therefore the right answer.
Why the other options fail Option A (uptime check) sends an HTTP(S) request to an endpoint and judges whether it responds; it cannot observe a local process on the host. Option D (metric threshold) compares a continuously reported value against a bound and cannot express "the process is gone." Option C (metric absence) is the strongest distractor: it does fire when data stops arriving, but absence can equally result from agent restarts or collection gaps, and the scenario names no process-level metric to watch — so it detects missing data rather than a stopped process.
Official Reference
- https://cloud.google.com/monitoring/alerts/types-of-conditions
- https://cloud.google.com/monitoring/alerts/policies-in-json#json-process-health
These links open the official vendor documentation in a new tab.
Exam Strategy
Match the symptom to the condition type before reading the options in depth: "a specific process stopped running on a host with the agent installed" signals process health, while HTTP response signals uptime checks and numeric comparisons signal metric threshold. Eliminate any condition that requires data you are told you cannot create — here the app cannot emit metrics, so anything depending on application-generated signals is out. Finally, be suspicious of absence-style conditions: they prove missing data, not a named process's absence.
Frequently Asked Questions
Why not use a metric absence condition to detect the stopped process?
Does a process-health alert require the Monitoring Agent?
When should an uptime check be used instead?
Community Votes
50% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 11 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 11
-
gcper 👍 6B Process-health policy A process-health policy can notify you if the number of processes that match a pattern crosses a threshold. This can be used to tell you, for example, that a process has stopped running.
-
syu31svc 👍 2https://cloud.google.com/monitoring/uptime-checks: "An uptime check is a request sent to a resource to see if it responds" A is wrong Metric absence and threshold don't make sense Process health is correct for sure so answer is B
-
saurabh1805 👍 2B is correct answer https://cloud.google.com/monitoring/alerts/types-of-conditions#metric-threshold
-
closer89 👍 2 Answered Bhttps://cloud.google.com/monitoring/alerts/policies-in-json#json-process-health
-
santoshchauhan 👍 1 Answered CTo be alerted if your Unix process has not run for at least 5 minutes, you should configure a metric absence alert condition. Since you cannot modify the application to generate metrics or logs, this approach allows you to monitor the absence of data for a specific duration. When the Unix process stops running, the metric data will be absent, triggering the alert. Therefore, the correct answer is C. Metric absence. This type of alerting policy will help you stay informed about any unexpected interruptions in your process execution.
Show 6 more comments
-
RoKo1 👍 1 Answered BProcess-health policy A process-health policy can notify you if the number of processes that match a pattern crosses a threshold. This can be used to tell you, for example, that a process has stopped running. This alerting policy causes Monitoring to send a notification to the specified notification channel when no process matching the string nginx, running as user www, has been available for more than 5 minutes:
-
Sebasi 👍 1 Answered CC Metric absence You want to be alerted if the UNIX process has not run for at least 5 minutes. Since you cannot modify the application to generate metrics or logs, you need to rely on detecting the absence of metrics collected by the Stackdriver Monitoring Agent.
-
ravia__ 👍 1 Answered CMetric absence allows you to trigger an alert if no metrics (e.g., CPU usage, memory usage, etc.) related to the process are received for a specific period, such as 5 minutes
-
wuhaosheng 👍 1 Answered CIf the requirement is to simply determine whether a process has stopped reporting metrics, Metric Absence is the preferred choice.
-
__rajan__ 👍 1 Answered BB is correct.
-
tomato123 👍 1 Answered BB is correct
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All PCD Questions
Access 84 questions with complete answers and detailed explanations.
View Full PCD Practice Test →