Table of contents
1.
Introduction
2.
Cloud Monitoring Tools
2.1.
Alerting Policies and Uptime Checks
2.2.
Dashboards and Charts 
3.
Metrics and Time Series
3.1.
Metrics
3.2.
Time Series
4.
View Time Series
4.1.
Google Cloud Dashboard
4.2.
Custom Dashboard
4.3.
Charts
5.
Configure Alerts
6.
Verify that the Service is Accessible
7.
Large System Support
7.1.
Resource groups
7.2.
View Metrics for Multiple Cloud Projects
7.3.
Programmatic and Graphical Interfaces
8.
Access Control with IAM 
8.1.
VPC Service Controls
8.2.
Monitoring IAM Overview
8.3.
Predefined Roles
8.3.1.
Monitoring
8.3.2.
Service Accounts
8.3.3.
Alert Policies
8.3.4.
Dashboards
8.3.5.
Google Cloud
8.3.6.
Metric Scope
9.
Granting IAM roles
10.
Custom Roles
11.
Data regionality for Cloud Monitoring
11.1.
Storage of Time-Series Data
11.2.
Data Produced by Google Products
11.3.
Processing of Time-Series Data
12.
Frequently Asked Questions
12.1.
What is Google Cloud Platform?
12.2.
What is Cloud Monitoring?
12.3.
What do you mean by metrics?
12.4.
What do you mean by time series?
13.
Conclusion 
Last Updated: Mar 27, 2024

Introduction to Cloud Monitoring

Author Rhythm Jain
0 upvote
Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction

Cloud monitoring is a collection of tactics and procedures to analyze, measure, and manage cloud-based services and applications. As organizations expand their infrastructure and digital footprint, IT administrators and DevOps teams must retain insight into the functioning of their digital assets. Cloud monitoring enables this visibility while providing a company with actionable information to enhance uptime and user experiences.

Cloud Monitoring collects data about your service and your Google Cloud resources. 

Let's discuss the Cloud Monitoring tools available for visualizing and monitoring these measurements.

Cloud Monitoring Tools

Alerting Policies and Uptime Checks

Create an alerting policy to be alerted when the performance of a service does not meet the criteria you specify. 

  • The uptime check queries your service regularly and maintains the success and delay of that probe as metric data.
     
  • The alerting policy checks the uptime check's success status and tells you when a probe fails.

Dashboards and Charts 

One can use the charts and dashboards tools to analyze the current load on a service or to examine performance statistics for the service over the last month. Cloud Monitoring automatically populates dashboards depending on the services and resources used by the service. However, one may also construct custom dashboards to chart data, display indications, or display text.

We can monitor the following metrics collected by the google cloud project:

  • System metrics 
  • Application metrics
  • Custom metrics
  • Logs-based metrics

Metrics and Time Series

Metrics

A metric is anything that can be measured. Metrics include the CPU consumption of a VM and the proportion of a disk utilized.

Time Series

A time series is a data structure that comprises time-stamped measurements of a metric and information about its source and meaning.

View Time Series

Cloud Monitoring gives you several options for visualizing your time-series data:

Google Cloud Dashboard

Cloud Monitoring generates these dashboards automatically based on the resources utilized by your Google Cloud project.

Custom Dashboard

Custom dashboards allow us to choose what data we want to see and how we want to see it. You may, for example, view metric data, alerting policies, and logs saved in your Google Cloud project. We may build a custom dashboard using the Dashboards API or the Google Cloud console.

Charts

We may add charts to a custom dashboard or utilize Metrics Explorer, a charting tool that allows you to quickly display and analyze time-series data. Metrics Explorer visualizations may be saved to a custom dashboard.

 

Source: Google Cloud

 

Configure Alerts

Alerting rules allow you to specify whether a single time series can cause a condition to be met or if the condition must be satisfied by many time series.

The Cloud Monitoring API and the Google Cloud interface may be used to establish alerting policies. In both scenarios, we may manage and examine the guidelines in the Google Cloud interface using the Alerting page.

Conditions are the foundation of any alerting policy. A condition outlines a possible issue with the system that we want Cloud Monitoring to keep an eye on. Cloud Monitoring opens an incident and issues notifications when the conditions of an alerting policy are met.

Verify that the Service is Accessible

We can enable Cloud Monitoring to probe the service regularly, like how the consumers access your service. While configuring an uptime check, servers in at least three separate regions test your service periodically and report the probe's success and delay. Create an alerting policy to monitor the uptime check/check passed metric, which records the outcomes of uptime checks, to be informed when your uptime check fails.

Large System Support

Now, we will discuss features that will allow us to monitor large systems.

Resource groups

We can create a resource group to manage Google Cloud or Amazon resources as a grouping rather than individually. A resource group is a dynamic collection of resources that meet the specified criteria. The group membership changes automatically as we add and delete resources from the Cloud project.

View Metrics for Multiple Cloud Projects

We can configure a multi-project metrics scope to see and monitor time-series data for numerous Google Cloud projects and AWS accounts from a single interface.

By default, Cloud Monitoring tabs in the Google Cloud dashboard only provide access to time series saved in the scope project. The scope project is the one you choose from the Google Cloud console project picker. The alarms, uptime checks, dashboards, and monitoring groups you set are saved in the scoping project.

The metrics scope specifies which projects and accounts' metrics will be available to the scoping project. The metrics scope may be configured to incorporate time-series data from other Google Cloud projects and AWS accounts.

Programmatic and Graphical Interfaces

we can use the Google Cloud console to view the metric data and create and manage alerting policies, dashboards, and uptime checks. We may also use the Cloud Monitoring API to establish and administer alerting settings, dashboards, uptime checks, and write custom metric data.

Access Control with IAM 

Cloud Monitoring uses Identity and Access Management (IAM) roles and permissions. It is designed for administrators who set up and assign roles and permissions.

VPC Service Controls

VPC Service Controls adds more security to Cloud Monitoring, reducing the danger of data exfiltration. We may add a metrics scope to a Service Boundary using VPC Service Controls to protect Cloud Monitoring resources and services from requests beyond the perimeter.

Monitoring IAM Overview

Monitoring requires that you have the necessary IAM permissions.

Each REST method in an API is generally connected with permission, and you must have that permission to use it. Rights are not provided to people directly; instead, they are issued indirectly through roles, which aggregate numerous permissions to make management more effortless.

Predefined Roles

Cloud Monitoring has predefined the following IAM roles. They just grant Monitoring permissions.

Monitoring

Service Accounts

Alert Policies

Dashboards

Google Cloud

Metric Scope

Granting IAM roles

The project owners, editors, and default service accounts for Compute Engine, and App Engine already have the appropriate rights; however, these responsibilities may need to be explicitly granted to other user accounts. These permissions may be provided using either the Google Cloud CLI or the Google Cloud console (Google Cloud console).

Custom Roles

To establish a custom role with Monitoring rights, follow these steps:

  1. Choose from the API permissions section to create a role that only grants access to the Monitoring API.
     
  2. Choose from the Console permissions for Monitoring section for a role providing Monitoring access in the Google Cloud console.
     
  3. Include the permissions from the role roles/monitoring.metricWriter in the Roles section to enable the authority to write monitoring data.

Data regionality for Cloud Monitoring

Now we'll talk about data storage policies for Cloud Monitoring. Cloud Monitoring is a global offering, and its services are accessible regardless of location.

Storage of Time-Series Data

To store a time series in a specified area, the monitored resource must have one of the following valid label values:

  • location
  • zone
  • region


The time series is deleted when the monitored resource label's value is not recognized or defined. When the monitored resource against which the time series is written does not contain one of the above labels, the storage location of the time series is undetermined.

Data Produced by Google Products

Google products that may be deployed by zone or region save any time series generated in the same region to which they are deployed.

Processing of Time-Series Data

The physical location where time-series data are processed when searched is determined by various factors, including the data's storage location, query semantics, networking, and others. There is no guarantee that time series will always be processed at the area where they are physically stored.

Frequently Asked Questions

What is Google Cloud Platform?

Google Cloud Platform is a Google cloud platform that allows users to access cloud systems and computing services. GCP provides many cloud computing services in the compute, database, storage, migration, and networking domains.

What is Cloud Monitoring?

Cloud monitoring is a collection of tactics and procedures to analyze, measure, and manage cloud-based services and applications. As organizations expand their infrastructure and digital footprint, IT administrators and DevOps teams must retain insight into the functioning of their digital assets.

What do you mean by metrics?

A metric is anything that can be measured. Metrics include the CPU consumption of a VM and the proportion of a disk utilized.

What do you mean by time series?

A time series is a data unit that comprises time-stamped measurements of a metric and information about its source and meaning.

Conclusion 

This blog introduced you to Cloud Monitoring. We hope our blog enhances your knowledge of the cloud and cloud monitoring.

See Basics of C++ with Data StructureDBMSOperating System by Coding Ninjas, and keep practicing on our platform Coding Ninjas Studio.

If you think you are ready for the tech giants company, check out the mock test series on code studio.

You can also refer to our Guided Path on Coding Ninjas Studio to upskill yourself in domains like Data Structures and AlgorithmsCompetitive ProgrammingAptitude, and many more!. You can also prepare for tech giants companies like Amazon, Microsoft, Uber, etc., by looking for the questions asked by them in recent interviews. If you want to prepare for placements, refer to the interview bundle. If you are nervous about your interviews, you can see interview experiences to get ideas about these companies' questions.

Nevertheless, you may consider our premium courses to give your career an edge over others!

Do upvote our blogs if you find them helpful and engaging!

Happy Learning!

Live masterclass