How To Create Health Check In Google Stackdriver

google_compute_logo

Prerequisites – Apache2 webserver

Step 1. Open Google Cloud Services & Click Product & Services at the top left most part of the page.

GC instance creation gc main page

Step 2. Now Click on Monitoring at the Service Panel of page.

Stackdriver service panel page pic

Step 3. Now on the left side of the page there is big blue button Create Check in Monitor Uptime click on it.

Moniter uptime button pic

Step 4. Configure New Uptime Check settings as given below.

Title : Name of your Health Check.
Check Type :  Specify the Check Type as per your requirement.
Resource Type : Specify the resource type as per your requirement.
Hostname : Specify the IP address of your Instance for which you want to create Health Check.
Path :  Select Protocol and enter the path component of the URL you want to check.
Check Every : Specify the time as per your requirement.

New uptime check page picNew uptime check page 1 pic
Now Click on Test to Test your connection.If Test is successfully passed then click on Save.

Step 5. Now Click on Create Alerting policy to create your own Policy for your Health check as per your requirements.

Create Alerting Policy pic

Step 6. Now Specify Policy Name as per your choice after that Click on +Add Condition to Add Policies.

Policy page pic

Step 7. Now as you can see there are various type of Policies available in Metric and Health Column.You can Choose any type of policies from the available set of policies as per your requirement.

Add Condition page pic
Now Click on Next.

Step 8. Configure the below settings.

RESOURCE TYPE : Select Instance Resource type according to your requirement
GCE : Google Compute Engine
EC2 : Amazon Compute Engine
APPLIES TO : Specify How many instance you want to attach with Health check,then in another column specify the instance which you want to attach with Health Check.

Now click on Next to proceed further.

Add condition target page pic

Step 9. Now Configure Configuration settings as define below.

IF METRIC : Specify the name of a Service which you want to Monitor
CONDITION : Mention the Condition above or below as per your Requirement
THRESHOLD : Specify the Threshold limit in Percentage
FOR : Once your Specified Threshold limit crosses for your Metric, for the Specified time limit under the FOR, you will receive an Alarm in the form of Notification

Now click on save condition to save your Policy.

Add Condition configuration page pic

Step 10. Now on the Bottom of the page there is a big blue button Add Notification under the Notifications Column.Specify the Method of Notification from the various set of methods as per your requirement, after that click on Add Notification.

Notification page picNow Click on Save Policy to Save your Policy.

Step 11. Now Your Health Check is created Successfully.It will take few minutes to move in Active state.

health check dashboard pic

Step 12. Now Click on Create Dashboard which is available in the Right side of the page.click on it.

Create dashboard page pic

Step 13. Now click on Add Chart Button which is available at the Middle of the page.

Add Chart Button pic

Step 14. Now Configure Chart Settings as given below.

Title : Name of your chart
Resource Type : Type of Resource according to your Requirement
Metric Type : Type of Metric as per your requirement

Now Click on Save to Save your Settings.Dashboard Add Chart page pic

Step 15. Now CPU Usage Graph is Successfully Created.

Cpu Usage Graph pic

Comments are closed