QuestionQ233

Managing operations

A company has been running its application on Compute Engine. An application bug enabled a malicious user to repeatedly run a script that causes the Compute Engine instance to crash. Although the bug is fixed, you want to be notified if this hack happens again.

What should you do?

  • A Create an Alerting Policy in Stackdriver using a Process Health condition, checking that the number of executions of the script remains below the desired threshold. Enable notifications.
  • B Create an Alerting Policy in Stackdriver using the CPU usage metric. Set the threshold to 80% to be notified when the CPU usage goes above this 80%.
  • C Log every execution of the script to Stackdriver Logging. Create a User-defined metric in Stackdriver Logging on the logs, and create a Stackdriver Dashboard displaying the metric.
  • D Log every execution of the script to Stackdriver Logging. Configure BigQuery as a log sink, and create a BigQuery scheduled query to count the number of executions in a specific timeframe.
Explanation

A process-health alerting policy can monitor the number of VM processes whose invocation command matches the script and notify when that number exceeds the permitted threshold. This directly detects the repeated script executions that cause the instance crash. CPU utilization is not a reliable indicator of this event, and collecting logs, displaying a dashboard, or running a BigQuery query alone does not notify responders. Monitor count of processes on a VM

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!