Home  > Resources  > Blog

Deployment and Monitoring in Google Cloud Platform

May 14, 2021 by Bibhas Bhattacharya
Category: Cloud

This tutorial is adapted from Web Age course Google Cloud Primer.

1.1 Google Cloud Monitoring

Google Cloud monitoring is built right into the Cloud Console and provides a single point of control of metrics, uptime monitoring, dashboards, and alerts.

It enables administrators and DevOps staff to:

  • Automatically collect metrics and events from multi-cloud (AWS is supported) and hybrid infrastructure in real-time
  • Enable SRE (Site Reliability Engineering) best practices
  • Provide metrics visualizations in dashboards and charts
  • Set up and generate alerts
  • Identify trends using rich query language
  • Interact with Slack, PagerDuty, and other incident management tools
  • Using the BindPlane service, collect this data from over 150 common application components

Cloud Monitoring provides visibility into the performance, uptime, and overall health of cloud-powered applications. Cloud Monitoring collects metrics, events, and metadata from Google Cloud, Amazon Web Services, hosted uptime probes, application instrumentation, and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch, and many others. Cloud Monitoring ingests that data and generates insights via dashboards, charts, and alerts. Cloud Monitoring alerting helps you collaborate by integrating with Slack, PagerDuty, HipChat, Campfire, and more. Google acquired Stackdriver back in 2014 and has been steadily integrating its functionality.

1.2 Cloud Monitoring UI

Source: https://cloud.google.com/monitoring

1.3 Google Cloud Management Tools at a Glance

Source: https://chuckerickson.net/gcp-visual-language

1.4 Management Tools 

  • Operations suite (formerly Stackdriver)
    • Monitoring, logging, and diagnostics for applications on Google Cloud Platform and AWS
  • Cloud Deployment Manager
    • GCP resource provisioning tool
      • Uses templates created in YAML, Python or Jinja2
  • Cloud APIs
    • Programmatic access to GCP resources
  • Cloud Console
    • Web UI to manage GCP resources
  • Cloud Shell
    • Browser-based shell that offers CLI to access and manage GCP resources
  • Cloud Console Mobile App
    • Android and iOS app for managin GCP resources

1.5 Google Cloud’s Operations Suite (formerly Stackdriver)

  • Enables operations specialists to
    • Collect metrics, logs, and traces across Google Cloud and your applications
    • Use built-in out-of-the-box dashboards and views to monitor the platform and applications
    • Query and analyze these signals
    • Set up appropriate performance and availability indicators
    • Set up alerts and notification rules with your existing systems

1.6 Operations Suite Key Features 

  • Log management
    • Smart log processing based on the Logs Router. Logs are parsed and filtered against predefined rules. Logs include a wide range of operational trails, audit logs, platform logs, and user logs.
  • Log insights
    • Gives visibility into cloud applications’ errors and sends alerts when new errors are detected
  • Proactive monitoring
    • Provides the policy-based health check capability of your cloud solutions. You can be notified when certain run-time metrics fail to meet specified criteria. Integrated with a wide range of notification channels, including Slack and PagerDuty
  • Custom visualization
    • Allows you to define custom dashboards with powerful visualizations in addition to the out-of-the-box Cloud Monitoring Dashboards
  • Health check monitoring
    • Cloud Monitoring provides real-time monitoring of the web-facing components of your applications, including your instances and load balances
  • Service monitoring
    • Provides telemetry services and dashboards to help troubleshoot and automate health monitoring through SLOs and error budget management
  • Latency management
    • Based on the Cloud Trace service that performs latency sampling, per-URL statistics, and reporting for App Engine
  • Debugging
    • Cloud Debugger allows developers to remotely debug their cloud applications without stopping or slowing them down
  • Performance and cost management
    • Backed by Cloud Profiler, this capability enables continuous profiling of resource consumption in your production applications to be carried out, helping you to proactively identify and then eliminate potential performance issues
  • Security management
    • This Cloud Audit Logs-based capability provides near real-time visibility into user activity across Google Cloud

1.7 Cloud Deployment Manager

Google Cloud allows developers and administrators to conveniently create resources using templates, which act as blueprints for building the resources from scratch. Cloud Deployment Manager is a Configuration-as-Code capability for managing repeatable deployments.  It supports the creation and management of cloud resources with simple templates. It allows you to specify all the resources needed by your application in a declarative format using yaml,Python or Jinja2 templates to parameterize configuration of common resources, such as  load balances, auto-scaled instance groups, etc.

1.8 Instance Templates

Instance templates allow you to quickly create identical VM instances from a preexisting configuration. For example, one can use an instance template to create VM instances and managed instance groups (MIGs). 

Instance templates define the following VM attributes:

  • Machine type, boot disk image or container image, and tags
  • Should you wish so, you can then use the instance template to create a (zonal | regional) MIG

You can create an instance template using the Google Cloud Console, gcloud command-line tool, or the API. You cannot update an existing instance template — you will need to create a new one, should you wish to make changes to the configuration. 


According to Google Cloud documentation, “An instance template is a global resource that is not bound to a zone or a region. However, you will specify some zonal resources in an instance template, which restricts the template to the zone where that resource resides. For example, if you include a read-only persistent disk from us-central1-b in your instance template, you cannot use that template in any other zone because that specific disk exists only in zone us-central1-b.

Follow Us

Blog Categories