Table of contents
- Monitor and Log with Google Cloud Operations Suite: Challenge Lab
- Task 1: Configure Cloud Monitoring
- Task 2: Configure a Compute Instance to generate Custom Cloud Monitoring metrics
- Task 3: Create a custom metric using Cloud Operations logging events
- Task 4: Add custom metrics to the Media Dashboard in Cloud Operations Monitoring
- Task 5: Create a Cloud Operations alert based on the rate of high resolution video file uploads
- Congratulations
Monitor and Log with Google Cloud Operations Suite: Challenge Lab
Task 1: Configure Cloud Monitoring
Goto Navigation Menu -> Monitoring
Check it is enabled or not , if not enabled then enable it
Task 2: Configure a Compute Instance to generate Custom Cloud Monitoring metrics
Goto Navigation Menu -> Compute Engine -> VM instances
- Stop video-queue-monitor instances
- Edit video-queue-monitor instace:
- Go to Custom metadata
- replace the startup-script:
- replace MY_PROJECT_ID value with your PROJECT ID
- replace MY_GCE_INSTANCE_ID value with your your video-queue-monitor Instance id (find it in top)
- replace MY_GCE_INSTANCE_ZONE value with us-east1-b
- replace the startup-script:
Then Click on Save
- And Start/Resume video-queue-monitor instances
Task 3: Create a custom metric using Cloud Operations logging events
- Goto Navigation Menu -> Logging -> Log explorer
Click show query and enable it and then paste this
textPayload=~"file_format\: ([4,8]K).*"
in query box and run query. Create Metric with name
large_video_upload_rate
,Click Create Metric
Task 4: Add custom metrics to the Media Dashboard in Cloud Operations Monitoring
Goto Navigation Menu -> Monitoring -> Media_Dashboard
Click Edit Dashboard -> Add Chart
Select Line Chart
- Resource and metric
- Click VM instance -> Custom -> OpenCensus
- Resource and metric
Then Click Apply -> Save it
Again Click Add Chart
Select Line Chart
- Resource and metric
- paste this in search box
large_video_upload_rate
- paste this in search box
- Resource and metric
Apply -> Save
Task 5: Create a Cloud Operations alert based on the rate of high resolution video file uploads
Go to Monitoring > Alerting
- Create Policy
- Metric:
large_video_upload_rate
in search box and select logging/user/large_video_upload_rate
- Metric:
- Rolling window : 1 minute
- next
- Threshold : {value as supplied to you in task} in my case it 4 might be different for you please change it accordingly
- use notification channel turn it off
- Name your alert with
large video uploads
then Save
- next
Congratulations
You earned a new Skill Badge