Member-only story
Get notified when your GCP Compute Engine crashes due to HostError
In this post, we are going to discuss about the host-error failures that may occur to your GCP Compute Engines in case of a google cloud hardware or software infrastructure failure. Even though we have uptime metrics in stackdriver for compute instances , there is no readily available metric in stackdriver as of today to notify us on HostError failures. It is also important to set your compute engines availability policy to mitigate these events , so they get restarted automatically on a different host .
In order to get notified for these events , you need to configure a custom log metric .
Since these are very rare occurrences you might not have a prior event to capture the logs for this, so let’s see how this can be configured.
Step 1:
Go to Log-based-metrics under Logging.
Step 2:
Click on “CREATE METRIC”
Step 3:
(GCP recently upgraded their logs viewer ) If you are in the legacy logs viewer , click on the drop down on the right to convert it to an advanced filter , Enter the log…