Alerting when a Unix process stops running on Compute Engine

PCD By islever Editorial Last updated

Troubleshooting and observability.

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

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?
  1. Uptime check
  2. Process health Correct Answer
  3. Metric absence
  4. Metric threshold

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

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?

Metric absence fires when a metric stops reporting, but missing data can also be caused by agent restarts or collection gaps, and the scenario names no application metric to watch. Process health directly counts matching processes and reports when none have been available for the configured duration.

Does a process-health alert require the Monitoring Agent?

Yes. Process-health conditions rely on process metrics collected from the host by the Stackdriver Monitoring Agent (or the Ops Agent's process monitoring), which is why the question states the agent is installed and no application changes are possible.

When should an uptime check be used instead?

Use an uptime check when you need to verify that an endpoint or resource responds to an HTTP(S), TCP, or SSL request from outside the host. It tests reachability of a service, not the presence of a local Unix process.

More PCD FAQ →

Community Votes

B
50%
C
50%

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

  1. gcper 👍 6
    B 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.
  2. syu31svc 👍 2
    https://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
  3. saurabh1805 👍 2
    B is correct answer https://cloud.google.com/monitoring/alerts/types-of-conditions#metric-threshold
  4. closer89 👍 2 Answered B
    https://cloud.google.com/monitoring/alerts/policies-in-json#json-process-health
  5. santoshchauhan 👍 1 Answered C
    To 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
  1. RoKo1 👍 1 Answered B
    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. 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:
  2. Sebasi 👍 1 Answered C
    C 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.
  3. ravia__ 👍 1 Answered C
    Metric 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
  4. wuhaosheng 👍 1 Answered C
    If the requirement is to simply determine whether a process has stopped reporting metrics, Metric Absence is the preferred choice.
  5. __rajan__ 👍 1 Answered B
    B is correct.
  6. tomato123 👍 1 Answered B
    B is correct

Reader comments & corrections

No reader corrections yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Practice All PCD Questions

Access 84 questions with complete answers and detailed explanations.

View Full PCD Practice Test →

← Back to PCD Study Guide