<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://search.yahoo.com/mrss/"><channel><title>Cloud Operations</title><link>https://cloud.google.com/blog/products/operations/</link><description>Cloud Operations</description><atom:link href="https://cloudblog.withgoogle.com/blog/products/operations/rss/" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 04 Nov 2022 16:43:25 +0000</lastBuildDate><image><url>https://cloud.google.com/blog/products/operations/static/blog/images/google.a51985becaa6.png</url><title>Cloud Operations</title><link>https://cloud.google.com/blog/products/operations/</link></image><item><title>Flexible committed use discounts — a simple new way to discount Compute Engine instances</title><link>https://cloud.google.com/blog/products/compute/save-money-with-the-new-compute-engine-flexible-cuds/</link><description>&lt;div class="block-paragraph"&gt;&lt;p&gt;Saving money never goes out of style. Today, many of our customers use Compute Engine resource-based &lt;a href="https://cloud.google.com/compute/docs/instances/signing-up-committed-use-discounts#memory-optimized_commitments"&gt;committed use discounts (CUDs)&lt;/a&gt; to help them save on steady-state compute usage within a specific machine family and region. As part of our commitment to offer more flexible and easy ways for you to manage your spend, we now offer a new type of committed use discount for Compute Engine: flexible CUDs.&lt;/p&gt;&lt;p&gt;Flexible CUDs are spend-based commitments that offer predictable and simple flat-rate discounts (28% off 1-year, and 46% off 3-years) that apply across multiple VM families and regions. Similar to &lt;a href="https://cloud.google.com/compute/docs/instances/signing-up-committed-use-discounts#memory-optimized_commitments"&gt;resource-based CUDs&lt;/a&gt;, you can apply flexible CUDs across projects within the same billing account, and to VMs of different sizes and tenancy, to support changing workload requirements while keeping costs down. &lt;/p&gt;&lt;p&gt;Today, Compute Engine flexible CUDs are available for most general-purpose (N1, N2, E2, N2D) and compute-optimized (C2, C2D) VM usage, including instance CPU and memory usage across all regions (refer to &lt;a href="https://cloud.google.com/skus/sku-groups/compute-engine-flexible-cud-eligible-skus"&gt;the complete list&lt;/a&gt; with more VM families to come). &lt;/p&gt;&lt;p&gt;Similar to resource-based CUDs, flexible CUDs are discounts over usage, not capacity reservations. To ensure capacity availability, make a separate &lt;a href="https://cloud.google.com/compute/docs/instances/reserving-zonal-resources"&gt;reservation&lt;/a&gt;, and CUDs will apply automatically to any eligible usage as a result.&lt;/p&gt;&lt;p&gt;You can &lt;a href="https://cloud.google.com/docs/cuds-spend-based#purchasing"&gt;purchase&lt;/a&gt; CUDs from any billing account, and the discount can apply to any eligible usage in projects paid for by that billing account. When you purchase a flexible CUD, you pay the same commitment fee for the entirety of the commitment term, even if your usage falls below this commitment value. The commitment fee is billed monthly. Once a commitment is purchased, it cannot be canceled.&lt;/p&gt;&lt;p&gt;For the best combination of savings and flexibility, you can combine resource-based CUDs and flexible CUDs together. You can have standard resource-based CUDs to cover your most stable resource usage and flexible spend based CUDs to cover your more dynamic resource usage. Every hour, standard CUDs apply first to any eligible usage followed by flexible CUDs, optimizing the use of your CUDs. Finally, any usage overage or usage that’s not eligible for either type of CUDs, will be charged based on your on-demand rates. &lt;/p&gt;&lt;p&gt;Here is a quick summary of the differences between resource based CUDs and flexible CUDs&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/images/1_cud.max-1000x1000.jpg"
        
          alt="1 cud.jpg"&gt;
        
        &lt;/a&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph_with_image"&gt;&lt;div class="article-module h-c-page"&gt;
  &lt;div class="h-c-grid uni-paragraph-wrap"&gt;
    &lt;div class="uni-paragraph
      h-c-grid__col h-c-grid__col--8 h-c-grid__col-m--6 h-c-grid__col-l--6
      h-c-grid__col--offset-2 h-c-grid__col-m--offset-3 h-c-grid__col-l--offset-3"&gt;

      






  

    &lt;figure class="article-image--wrap-small
      
      "
      &gt;

      
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/images/medianet.max-1000x1000.jpg"
        
          alt="medianet.jpg"&gt;
        
        &lt;/a&gt;
      
    &lt;/figure&gt;

  





      &lt;h3&gt;What customers are saying about flexible CUDs&lt;/h3&gt;&lt;p&gt;&lt;i&gt;“Media.net is a global company with dynamic resource requirements. With flexible CUDs, Media.net is able to quickly and easily save money on baseline workload requirements, while giving it the flexibility to use different machine types and regions. Media.net chose Spot VMs after exploring various options to support spiky workloads, as they provided Media.net with both deep discounts and simple, predictable pricing. Flexible CUDs and Spot VMs were the perfect combination to optimize costs for the dynamic capacity needs of the business.” &lt;b&gt;— Amit Bhawani, Sr VP of Engineering, Media.net&lt;/b&gt;&lt;/i&gt;&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;
&lt;div class="block-paragraph_with_image"&gt;&lt;div class="article-module h-c-page"&gt;
  &lt;div class="h-c-grid uni-paragraph-wrap"&gt;
    &lt;div class="uni-paragraph
      h-c-grid__col h-c-grid__col--8 h-c-grid__col-m--6 h-c-grid__col-l--6
      h-c-grid__col--offset-2 h-c-grid__col-m--offset-3 h-c-grid__col-l--offset-3"&gt;

      






  

    &lt;figure class="article-image--wrap-small
      
      "
      &gt;

      
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/images/lucidworks.max-1000x1000.jpg"
        
          alt="lucidworks.jpg"&gt;
        
        &lt;/a&gt;
      
    &lt;/figure&gt;

  





      &lt;p&gt;&lt;i&gt;“As Lucidworks expands our product offerings, Google Cloud's Flexible CUDs have been the perfect solution to optimize cost while giving us the flexibility to shift workloads to different regions based on customer demographics and different instance families based on performance characteristics.&amp;quot; — &lt;b&gt;Matt Roca, Director of Cloud Governance and Security, Lucidworks&lt;/b&gt;&lt;/i&gt;&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;h3&gt;Understanding flexible CUDs &lt;/h3&gt;&lt;p&gt;You can &lt;a href="https://cloud.google.com/docs/cuds-spend-based#purchasing"&gt;purchase&lt;/a&gt; a flexible CUD in the Google Cloud console or via the API. A flexible CUD goes into effect one hour after purchase, and the discounts will automatically be applied to any eligible usage. &lt;/p&gt;&lt;p&gt;Your flexible CUD is applied to eligible on-demand spend by the hour. If during a given hour, you spend less than what you committed to, you will not fully utilize your commitment or realize your full discount.&lt;/p&gt;&lt;p&gt;For example: If you want to cover $100 worth of on-demand spend every hour by a flexible CUD, you will pay $54/hour (46% off) for 3 years (payable monthly), and receive a $100 credit that applies automatically to any eligible on-demand spend. The $100 credit burns down at the eligible on-demand rate for every eligible SKU, and expires if unused.&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/images/2_cud.max-1000x1000.jpg"
        
          alt="2 cud.jpg"&gt;
        
        &lt;/a&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;p&gt;&lt;b&gt;Attributing flexible CUDs credits&lt;/b&gt;&lt;b&gt;&lt;br/&gt;&lt;/b&gt;If you are running multiple projects within the same billing account, the credits from flexible CUDs are attributed proportionally across projects within the billing account and across SKUs within the same project according to their usage proportion.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Planning for flexible CUDs purchases&lt;/b&gt;&lt;b&gt;&lt;br/&gt;&lt;/b&gt;A good way to think about how to purchase and use resource based CUDs with flexible CUDs is to first forecast and purchase resource based CUDs based on your steady state resource spend, to get the deepest discounts. A best practice is to use flexible CUDs for more variable and growing workloads, and to use on-demand VMs, or &lt;a href="https://cloud.google.com/blog/products/compute/google-cloud-spot-vm-use-cases-and-best-practices"&gt;Spot VMs&lt;/a&gt;, for the rest of your usage. &lt;/p&gt;&lt;h3&gt;Get started with flexible CUDs today&lt;/h3&gt;&lt;p&gt;Building a business in the cloud can be complicated; paying for it should be easy. We designed flexible CUDs to make it easy for organizations to enjoy significant discounts across a wide variety of Google Cloud resources in a way that’s simple and predictable. For more details on how to &lt;a href="https://cloud.google.com/docs/cuds-spend-based#purchasing"&gt;purchase&lt;/a&gt; and use flexible CUDs and to get started, refer to &lt;a href="https://cloud.google.com/compute/docs/instances/committed-use-discounts-overview"&gt;this documentation&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><pubDate>Fri, 04 Nov 2022 16:00:00 +0000</pubDate><guid>https://cloud.google.com/blog/products/compute/save-money-with-the-new-compute-engine-flexible-cuds/</guid><category>Cloud Operations</category><category>Infrastructure</category><category>Google Cloud</category><category>Compute</category><og xmlns:og="http://ogp.me/ns#"><type>article</type><title>Flexible committed use discounts — a simple new way to discount Compute Engine instances</title><description></description><site_name>Google</site_name><url>https://cloud.google.com/blog/products/compute/save-money-with-the-new-compute-engine-flexible-cuds/</url></og><author xmlns:author="http://www.w3.org/2005/Atom"><name>Yasmin Mowafy</name><title>Sr. Product Manager</title><department></department><company></company></author></item><item><title>Some beans and gems, some snakes and elephants, with Java 17, Ruby 3, Python 3.10 and PHP 8.1 in App Engine and Cloud Functions</title><link>https://cloud.google.com/blog/topics/developers-practitioners/new-java-ruby-python-php-runtimes/</link><description>&lt;div class="block-paragraph"&gt;&lt;p&gt;Time to spill the beans and show the gems, to our friendly snakes and elephants: we’ve got some great news for Java, Ruby, Python and PHP serverless developers today. Google App Engine and Cloud Functions are adding new modern runtimes, allowing you to update to the major version release trains of those programming languages.&lt;/p&gt;&lt;p&gt;In short, here’s what’s new:&lt;br/&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;Access to App Engine legacy bundled services for Java 11/17, Python 3 and Go 1.12+ runtimes, is Generally Available&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;The Java 17, Ruby 3.0, Python 3.10, and PHP 8.1 runtimes come into preview in App Engine and Cloud Functions&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p/&gt;&lt;p&gt;Let’s have a closer look. First of all, the access to App Engine legacy bundled services for second generation runtimes for &lt;a href="https://cloud.google.com/appengine/docs/standard/java-gen2/services/access"&gt;Java&lt;/a&gt;, &lt;a href="https://cloud.google.com/appengine/docs/standard/python3/services/access"&gt;Python&lt;/a&gt; and &lt;a href="https://cloud.google.com/appengine/docs/standard/go/services/access"&gt;Go&lt;/a&gt; is now &lt;b&gt;Generally Available&lt;/b&gt;. In the past, for example for the Java platform, only Java 8 (a first generation runtime) could access the &lt;a href="https://cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled"&gt;built-in APIs&lt;/a&gt; like Memcache, Images, Mail, or Task Queues. Now, if you use the Java 11 runtime (a second generation runtime), you can access those services as well as all the &lt;a href="https://cloud.google.com/java/docs/reference"&gt;Google Cloud APIs&lt;/a&gt;. For example, you can now store transient cached data in Memcache, or send an email to users of your application in a second generation runtime. Same thing for Python and Go developers, you can take advantage of the bundled services as well. If you’re still using an old runtime version, this will further ease the transition to newer versions. Be sure to check it out and upgrade.&lt;/p&gt;&lt;p/&gt;&lt;p&gt;Next, let’s continue with a fresh bean and a shiny gem, mixed in with some friendly animals, with the&lt;b&gt; &lt;/b&gt;&lt;b&gt;preview of the Java 17, Ruby 3.0, Python 3.10 and PHP 8.1 runtimes for both App Engine and Cloud Functions&lt;/b&gt;. What about having a look at what’s new in those language versions?&lt;/p&gt;&lt;h3&gt;&lt;b&gt;Java&lt;/b&gt;&lt;/h3&gt;&lt;p&gt;Between the two Long-Term-Support versions of Java 11 and 17, a lot of new features have landed. Java developers can now write text blocks for strings spanning several lines, without having to concatenate multiple strings manually. The switch construct has evolved to become an expression, which lets you break away from the &lt;code&gt;break&lt;/code&gt; keyword, and paves the way for more advanced pattern matching capabilities. Speaking of which, the &lt;code&gt;instanceof&lt;/code&gt; keyword is indeed offering some pattern matching evolution, to avoid obvious but useless casts. Records allow you to create more streamlined immutable data classes, rather than writing your own Java beans for that purpose with proper &lt;code&gt;hashCode()&lt;/code&gt;, &lt;code&gt;equals()&lt;/code&gt; or &lt;code&gt;toString()&lt;/code&gt; methods. For more control over your class hierarchy, sealed class gives you more control over the extension of your classes.&lt;/p&gt;&lt;h3&gt;&lt;b&gt;Ruby&lt;/b&gt;&lt;/h3&gt;&lt;p&gt;With Ruby 3.0, the big highlights were on performance, static type checking, and concurrency. The goal to make Ruby 3.0, three times faster on some benchmarks than Ruby 2.0 was reached, making your code run more swiftly. Also, Ruby programs can be annotated with some typing information, which allow type checkers to take advantage of those types to provide static type checking, to improve the quality of your code. For concurrency and parallelism, a new actor-inspired concurrency primitive called Ractor helps taming multiple cores in parallel, for your demanding workloads. And a fiber scheduler is introduced for intercepting blocking operations. And beyond those headlines, many improvements to various Ruby APIs have also landed.&lt;/p&gt;&lt;h3&gt;&lt;b&gt;Python&lt;/b&gt;&lt;/h3&gt;&lt;p&gt;In Python 3.10, the parser gives better and clearer error messages for syntax errors (with more accurate error location), also for indentation, attribute, and name errors, which greatly help developers to find the problems in their code. Structural pattern matching lands with a new &lt;code&gt;match&lt;/code&gt; and &lt;code&gt;case&lt;/code&gt; statement construct. Further PEP improvements are tackling more robust type hints for static type checkers. Parenthesized context managers have been added to make the code prettier when spanning a long collection of context managers across several lines. &lt;/p&gt;&lt;h3&gt;&lt;b&gt;PHP&lt;/b&gt;&lt;/h3&gt;&lt;p&gt;With version 8.1, PHP gets a pretty major update. First, let’s start with a new &lt;code&gt;enum&lt;/code&gt; syntax construct instead of creating constants in classes, and you get validation out of the box. Classes now have the ability to define final class constants. The new &lt;code&gt;readonly&lt;/code&gt; properties can’t be changed after initialization, which is great for value objects and DTOs. A first class callable syntax is introduced, allowing you to get a reference to any function, with a short syntax. Developers will also find further improvements to initializers, that make it possible to even have nested attributes, using objects as default parameter values, static variables, and global constants. One last nice addition we can mention is the introduction of fibers to implement lightweight cooperative concurrency.&lt;/p&gt;&lt;h3&gt;&lt;b&gt;Your turn&lt;/b&gt;&lt;/h3&gt;&lt;p&gt;Gems, beans, elephants, snakes: there’s something great in those new language versions for every developer. Thus, with these new runtimes in Preview, Java, Ruby, Python and PHP developers can update or develop new App Engine apps and Cloud Functions using the latest and greatest versions of their favorite languages. Be sure to check out the documentation for App Engine (&lt;a href="https://cloud.google.com/appengine/docs/standard/java-gen2/runtime"&gt;Java&lt;/a&gt;, &lt;a href="https://cloud.google.com/appengine/docs/standard/ruby/runtime"&gt;Ruby&lt;/a&gt;, &lt;a href="https://cloud.google.com/appengine/docs/standard/python3/runtime"&gt;Python&lt;/a&gt;, &lt;a href="https://cloud.google.com/appengine/docs/standard/php7/runtime"&gt;PHP&lt;/a&gt;) and Cloud Functions (&lt;a href="https://cloud.google.com/functions/docs/concepts/java-runtime"&gt;Java&lt;/a&gt;, &lt;a href="https://cloud.google.com/functions/docs/concepts/ruby-runtime"&gt;Ruby&lt;/a&gt;, &lt;a href="https://cloud.google.com/functions/docs/concepts/python-runtime"&gt;Python&lt;/a&gt;, &lt;a href="https://cloud.google.com/functions/docs/concepts/php-runtime"&gt;PHP&lt;/a&gt;). We’re looking forward to hearing from you about how you’ll take advantage of those new language runtimes.&lt;/p&gt;&lt;p/&gt;&lt;p/&gt;&lt;/div&gt;
&lt;div class="block-related_article_tout"&gt;





&lt;div class="uni-related-article-tout h-c-page"&gt;
  &lt;section class="h-c-grid"&gt;
    &lt;a href="https://cloud.google.com/blog/products/serverless/introducing-the-next-generation-of-cloud-functions/"
       data-analytics='{
                       "event": "page interaction",
                       "category": "article lead",
                       "action": "related article - inline",
                       "label": "article: {slug}"
                     }'
       class="uni-related-article-tout__wrapper h-c-grid__col h-c-grid__col--8 h-c-grid__col-m--6 h-c-grid__col-l--6
        h-c-grid__col--offset-2 h-c-grid__col-m--offset-3 h-c-grid__col-l--offset-3 uni-click-tracker"&gt;
      &lt;div class="uni-related-article-tout__inner-wrapper"&gt;
        &lt;p class="uni-related-article-tout__eyebrow h-c-eyebrow"&gt;Related Article&lt;/p&gt;

        &lt;div class="uni-related-article-tout__content-wrapper"&gt;
          &lt;div class="uni-related-article-tout__image-wrapper"&gt;
            &lt;div class="uni-related-article-tout__image" style="background-image: url('https://storage.googleapis.com/gweb-cloudblog-publish/images/cloudfunctions1.max-500x500.jpg')"&gt;&lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="uni-related-article-tout__content"&gt;
            &lt;h4 class="uni-related-article-tout__header h-has-bottom-margin"&gt;Supercharge your event-driven architecture with new Cloud Functions (2nd gen)&lt;/h4&gt;
            &lt;p class="uni-related-article-tout__body"&gt;The next generation of our Cloud Functions Functions-as-a-Service platform gives you more features, control, performance, scalability and...&lt;/p&gt;
            &lt;div class="cta module-cta h-c-copy  uni-related-article-tout__cta muted"&gt;
              &lt;span class="nowrap"&gt;Read Article
                &lt;svg class="icon h-c-icon" role="presentation"&gt;
                  &lt;use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#mi-arrow-forward"&gt;&lt;/use&gt;
                &lt;/svg&gt;
              &lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;/section&gt;
&lt;/div&gt;

&lt;/div&gt;</description><pubDate>Wed, 13 Apr 2022 18:30:00 +0000</pubDate><guid>https://cloud.google.com/blog/topics/developers-practitioners/new-java-ruby-python-php-runtimes/</guid><category>App Engine</category><category>Cloud Operations</category><category>Developers &amp; Practitioners</category><og xmlns:og="http://ogp.me/ns#"><type>article</type><title>Some beans and gems, some snakes and elephants, with Java 17, Ruby 3, Python 3.10 and PHP 8.1 in App Engine and Cloud Functions</title><description></description><site_name>Google</site_name><url>https://cloud.google.com/blog/topics/developers-practitioners/new-java-ruby-python-php-runtimes/</url></og><author xmlns:author="http://www.w3.org/2005/Atom"><name>Guillaume Laforge</name><title>Cloud Developer Advocate</title><department></department><company></company></author><author xmlns:author="http://www.w3.org/2005/Atom"><name>Ludovic Champenois</name><title>App Engine Java Runtime Tech Lead</title><department></department><company></company></author></item><item><title>Optimize your applications using Google Vertex AI Vizier</title><link>https://cloud.google.com/blog/products/ai-machine-learning/optimize-your-applications-using-google-vertex-ai-vizier/</link><description>&lt;div class="block-paragraph"&gt;&lt;p&gt;Businesses around the globe are continuing to benefit from innovations in Artificial Intelligence (AI) and Machine Learning (ML). At F5, we are using AI/MI in meaningful ways to improve data security, fraud detection, bot attack prevention and more. While the benefits of AI/ML for these business processes are well articulated, at F5, we also use AI/ML to optimize our software applications. &lt;/p&gt;&lt;p&gt;Using AI/ML for better software engineering is still in its early days. We are seeing use cases around AI assisted code completion, auto-code generation for no-code/low-code platforms but we are not seeing broad usage of AI/ML in optimizing the software application architecture itself. In this blog, we will demonstrate workload optimization of a data pipeline using black-box optimization with Google’s Vertex AI Vizier.&lt;/p&gt;&lt;h2&gt;Performance Optimization  &lt;/h2&gt;&lt;p&gt;Today, software optimization is an iterative and mostly manual process where profilers are used to identify the performance bottlenecks in software code. Profilers measure the software performance and generate reports that developers can review and further optimize the code. The drawback of this manual approach is that the optimization depends on developer's experience and hence is very subjective. It is slow, non-exhaustive, error prone and susceptible to human bias. The distributed nature of cloud native applications further complicates the manual optimization process.&lt;/p&gt;&lt;p&gt;An under-utilized and more  global approach is another type of performance engineering that relies on performance  experiments and black-box optimization algorithms. More specifically, we aim to optimize the operational cost of a complex system with many parameters. Other experiment-based performance optimization techniques exist, such as causal profiling, but are outside the scope  of this post. &lt;/p&gt;&lt;p&gt;As illustrated in Figure 1, the process to optimize the performance is iterative and automated. A succession of controlled trials is performed on a system to study the value of a cost function characterizing the system to be optimized. New candidate parameters are  generated, and more trials are performed until this results in too little improvement to be  worthwhile. More details on this process later in this post.&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        &lt;a href="https://storage.googleapis.com/gweb-cloudblog-publish/images/1_Vertex_AI_Vizier.max-2800x2800.jpg" rel="external" target="_blank"&gt;
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/images/1_Vertex_AI_Vizier.max-1000x1000.jpg"
        
          alt="1 Vertex AI Vizier.jpg"&gt;
        
        &lt;/a&gt;
      
        &lt;figcaption class="article-image__caption "&gt;&lt;i&gt;Figure 1: Black-box optimization - Iterative experiments to arrive at optimal output as a cost function&lt;/i&gt;&lt;/figcaption&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;h2&gt;What is the problem &lt;/h2&gt;&lt;p&gt;Let's first set the stage - partly inspired by our experience, partly fictitious for the purpose of  this discussion.  &lt;/p&gt;&lt;p&gt;Our objective is to build an efficient way to get data from PubSub to BigQuery. Google Cloud offers a fully managed data processing service, Dataflow for executing a wide variety of data processing patterns which we use for multiple other realtime streaming needs. We opted to leverage a simplified custom stream processor for this use case for processing and transformations to benefit from the 'columnar' orientation of BQ — sort of 'E(t)LT' model.  &lt;/p&gt;&lt;p&gt;The setup for our study is illustrated in more detail in Figure 2. The notebook in the central position plays the role of orchestrator for the study of the 'system under optimization'.  The main objectives (and components involved) are: &lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;Reproducibility&lt;/b&gt;: in addition to an automated process, a pub/sub snapshot is used to  initialize a subscription specifically created to feed the stream processor to reproduce  the same conditions for each experiment. &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;Scalability&lt;/b&gt;: the  Vertex AI Workbench implements a set of automated procedures used to run  multiple experiments in parallel with different input parameters to speed up the overall  optimization process.  &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;Debuggability&lt;/b&gt;: for every experiment the study and trial ids are systematically injected as  labels for each log and metric produced by the stream processor. In this way, we can easily isolate, analyze, and understand the reasons for a failed experiment or one with  surprising results.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        &lt;a href="https://storage.googleapis.com/gweb-cloudblog-publish/images/2_Vertex_AI_Vizier.max-2800x2800.jpg" rel="external" target="_blank"&gt;
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/images/2_Vertex_AI_Vizier.max-1000x1000.jpg"
        
          alt="2 Vertex AI Vizier.jpg"&gt;
        
        &lt;/a&gt;
      
        &lt;figcaption class="article-image__caption "&gt;&lt;i&gt;Figure 2: High level architecture for conducting the experiments&lt;/i&gt;&lt;/figcaption&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;p&gt;To move the data from PubSub to BigQuery efficiently, we designed and developed some code and now want to refine it to be as efficient as possible. We have a program, and we want to  optimize based on performance metrics that are easy to capture from running it. Our question  now is how do we select the best variant?&lt;/p&gt;&lt;p&gt;Not too surprisingly, this is an &lt;i&gt;optimization problem&lt;/i&gt;: the world is full of them! Essentially, these  problems are all about optimizing (minimizing or maximizing) an objective function under some  constraints and finding the minima or maxima where this happens. Because of their widespread  applicability, this is a domain that has been studied extensively. &lt;/p&gt;&lt;p&gt;The form is typically:&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--medium
      
      
        h-c-grid__col
        
        h-c-grid__col--4 h-c-grid__col--offset-4
        
      "
      &gt;

      
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/images/3_Vertex_AI_Vizier.max-1000x1000.jpg"
        
          alt="3 Vertex AI Vizier.jpg"&gt;
        
        &lt;/a&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;p&gt;- read as we want the x of a certain domain &lt;i&gt;X&lt;/i&gt; that minimizes a cost function &lt;i&gt;f&lt;/i&gt;. Since it is a minimization problem here, such &lt;i&gt;x &lt;/i&gt;are called minima. Minima don’t necessarily exist and when they do are not necessarily unique.  Not all optimization problems are equal: continuous and linear programming is 'easy', convex  optimization is still relatively easy, combinatorial optimization is harder... and this is assuming we can describe the objective function we want to optimize — even partially as  with being able to compute gradients.  &lt;/p&gt;&lt;p&gt;In our case, the objective function is some performance (still TBD at this point) of some  program in some execution environment. This is far from &lt;i&gt;f(x)=x&lt;sup&gt;2&lt;/sup&gt;&lt;/i&gt;: we have no analytical  expression for our program performance, no derivatives, no guarantee that the function is  convex, the evaluation is costly, and the observation can be noisy. This type of optimization is  called 'black-box optimization' for the reason that we cannot describe it in simple mathematical  terms our objective function. Nonetheless we are very much interested in finding the  parameters that deliver the best result. &lt;/p&gt;&lt;p&gt;Let's now frame our situation as a concrete optimization problem before we introduce further  black-box optimization and some tools as we are looking for a way to automate solving this  type of problems rather than doing it manually — 'time is money' as they say.  &lt;/p&gt;&lt;h2&gt;Framing as an optimization problem&lt;/h2&gt;&lt;p&gt;Our problem has many moving parts but not all have the same nature.  &lt;/p&gt;&lt;h3&gt;Objective &lt;/h3&gt;&lt;p&gt;First comes the objective. In our case, we want to minimize the cost per byte of moving data  from PubSub to BigQuery. Assuming that the system scales linearly in the domain we are interested in, the cost per byte processed is independent of the number of instances and allows to extrapolate precisely the cost to reach a defined throughput. &lt;/p&gt;&lt;p&gt;How do we get there?  &lt;/p&gt;&lt;p&gt;We run our program on a significant and known volume of data in a specified execution  environment — think specific machine type, location, and program configuration —, measure how  long it takes to process it and calculate the cost of the resources — named `cost_dollar` below. This is our cost function &lt;i&gt;f&lt;/i&gt;.  &lt;/p&gt;&lt;p&gt;As mentioned earlier, there is no simple mathematical expression to define the cost function of  our system and evaluating it actually involves running a program and is 'costly' to evaluate.  &lt;/p&gt;&lt;h3&gt;Parameter space &lt;/h3&gt;&lt;p&gt;Our system has numerous knobs: the program has many configuration parameters  corresponding to alternative ways of doing things we want to explore and sizing parameters  such as different queue size or number of workers. The execution environment defines even  more parameters: VM configuration, machine type, OS image, location, ...  In general, the number of parameters can vary wildly — for this scenario, we have a dozen.  &lt;/p&gt;&lt;p&gt;In the end, our parameter space is described by Table 1 which for each  `parameter_id` gives the type of value (integer, discrete or categorical).&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        &lt;a href="https://storage.googleapis.com/gweb-cloudblog-publish/images/4_Vertex_AI_Vizier.max-2800x2800.jpg" rel="external" target="_blank"&gt;
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/images/4_Vertex_AI_Vizier.max-1000x1000.jpg"
        
          alt="4 Vertex AI Vizier.jpg"&gt;
        
        &lt;/a&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;p&gt;The objective has been identified, we know how to evaluate it for some given assignment of a  collection of identified parameters and we have defined the domain of these parameters.  That's what we need to allow us to do some black-box optimization. &lt;/p&gt;&lt;h2&gt;Approach &lt;/h2&gt;&lt;p&gt;Back to the black-box optimization: we already stated this is a problem dealing with  minimization/maximization of a function for which we have no expression, we can still evaluate  it! We just need to run an experiment and determine the cost. &lt;/p&gt;&lt;p&gt;The issue is running the experiment has a cost and given the parameter space, exploring them  all is rapidly not a viable option. Assuming you pick only 3 values for each of the 12-ish  parameters: 3&lt;sup&gt;12&lt;/sup&gt;=531,441 — it's large already. This method of exploring systematically all  the combinations generated from a subset of each parameter taken individually is called &lt;b&gt;grid  search&lt;/b&gt;. &lt;/p&gt;&lt;p&gt;Instead, we use a form of &lt;i&gt;surrogate optimization&lt;/i&gt;: In case like this one where there is no  convenient representation of our objective function, it can be beneficial to introduce a  surrogate function with better properties that models the actual function. Certainly, instead of  one problem: minimizing our cost function, we have two: fitting a function on our problem and  minimizing it. But we gained a recipe to move forward: fit a model on the observations and use  this model to help choose a promising candidate for which we need to run an experiment. Once we have the result of the experiment, the model can be refined and new candidates can be  generated, until marginal improvements are not worth the effort.  &lt;/p&gt;&lt;p&gt;&lt;a href="https://cloud.google.com/vertex-ai/docs/vizier/overview"&gt;Google Cloud Vertex AI Vizier&lt;/a&gt; offers  this type of optimization as a service. If you want to read more about what is behind — spoiler: it  relies on Gaussian Process (GP) optimization, check this publication for a complete description:  &lt;a href="https://research.google/pubs/pub46180/" target="_blank"&gt;Google Vizier: A Service for Black-Box optimization&lt;/a&gt;.  &lt;/p&gt;&lt;p&gt;We performed 148 different experiments with different combinations of input parameters. What have we learned?  &lt;/p&gt;&lt;h2&gt;Results of our study&lt;/h2&gt;&lt;p&gt;The point of this discussion is not to detail precisely what parameters we used to get the best  cost - this is not transferable knowledge as your program, setup, and pretty much everything  will be different. But to give an idea of the potential of the method: in our case, with 148 runs,  our cost function went from $0.0780/run with our initial guessed  configuration down to $0.0443/run with the best parameters — a reduction of the cost of 43%.  Unsurprisingly, the `machine_type` parameter plays a major role here, but even with the same  machine type as the one offering the best results, the (explored) portion of our cost function  ranges between $0.0443/run and $0.0531/run - a variation of 16%.  &lt;/p&gt;&lt;p&gt;The most promising runs are represented in Figure 3. All axes but the last 2 correspond to parameters. The last two, respectively, the objective `cost_dollar`, and represent whether the run completed or not. Lines represent the runs and connect the values for each axis together  corresponding to them.&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        &lt;a href="https://storage.googleapis.com/gweb-cloudblog-publish/images/5_Vertex_AI_Vizier.max-2800x2800.jpg" rel="external" target="_blank"&gt;
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/images/5_Vertex_AI_Vizier.max-1000x1000.jpg"
        
          alt="5 Vertex AI Vizier.jpg"&gt;
        
        &lt;/a&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;p&gt;To conclude on the study part, this helped us uncover substantial cost improvement with  almost no intervention from our end. Let's explore that aspect more in the next section.&lt;/p&gt;&lt;h2&gt;Learnings on the method &lt;/h2&gt;&lt;p&gt;One of the main advantages of this method is that: provided you have been through the initial  effort of setting things up suitably, it can run on its own and require little to no human  intervention.  &lt;/p&gt;&lt;p&gt;Black-box optimization assumes the evaluation of &lt;i&gt;f(x)&lt;/i&gt; only depends on x not on what else is going on at the same time. &lt;/p&gt;&lt;p&gt;We don't want to see interactions between the different evaluations of &lt;i&gt;f(x)&lt;/i&gt;. &lt;/p&gt;&lt;p&gt;One of the main applications of Vizier is deep learning model hyper-parameter optimization.  The training and evaluation are essentially devoid of side effects — cost aside, but we already  said black-box optimization methods assume the evaluation is costly and are designed to  reduce the number of runs needed to find the optimal parameters. Our scenario has definitively  side-effects: it is moving data from one place to another.  &lt;/p&gt;&lt;p&gt;So, if we ensure all side-effects are removed from our performance experiment, life should  be easy on us. Black-box optimization methods apply, and Vizier in particular can be used. This can be achieved by wrapping the execution of our scenario in some logic to setup and tear  down an isolated environment: making this whole new system essentially without side-effect. &lt;/p&gt;&lt;p&gt;Couple of lessons on running these kinds of tests we think worth highlighting: &lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;Parameterize everything even if there is a single value at first&lt;/b&gt;: if another value becomes  necessary it is easy to add, worst case: values are recorded along with your data making  it easier to compare things between different experiments if needed. &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;Isolation between runs and other things&lt;/b&gt;: if it is not parameterized and have an impact  on the objective, this will make the measurements noisier and make it harder for the  optimization process to be decisive about where to explore next. &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;Isolation between concurrent runs&lt;/b&gt;: so can run multiple experiments at once. &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;Robust runs&lt;/b&gt;: not all combinations of parameters are feasible, and Vizier supports  reporting them as so. &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;Enough runs&lt;/b&gt;: Vizier leverages the result of previous runs to decide what to explore next  and you can request for a number of experiments to run at once - without having to  provide the measurement yet. This is useful to start running experiments in parallel but  in our experience this is also useful to make sure initially you have a broad coverage or  the parameter space before the exploration starts to try to pinpoint local extrema. For  example, in the set of runs we described earlier in the post, 'n2-highcpu-4' didn't get  tried until run 107.  &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;Tools exist today&lt;/b&gt;: Vizier is one example available as a service. There are many python  libraries available too to do black-box optimization.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Definitely something to have in your toolbox if you don't want to spend hours with knobs and  you prefer a machine doing that. &lt;/p&gt;&lt;h2&gt;Conclusion and next steps &lt;/h2&gt;&lt;p&gt;Black-box optimization is unavoidable for ML hyper-parameter tuning. Google Vertex AI Vizier is a black-box optimization service with a wider range of applications. We believe it is also a great tool for the engineering of complex systems that are characterized by many parameters with essentially unknown or difficult to describe interactions. For small systems, manual and/or systematic exploration of the parameters might be possible, but the point of this post is that it can be automated!&lt;/p&gt;&lt;p&gt;Optimizing performance is a recurring challenge as everything keeps changing and new options  and/or new usage patterns appear. &lt;/p&gt;&lt;p&gt;The setup presented in this post is relatively simple and very static. There are natural  extensions of this setup to continuous online optimization that are worth exploring from a software  engineering perspective like multi-armed bandits. &lt;/p&gt;&lt;p&gt;What if the future of application optimization was already here but not very evenly distributed - to paraphrase William Gibson? &lt;/p&gt;&lt;p&gt;Think this is cool? F5 AI &amp;amp; Data group &lt;a href="https://www.f5.com/company/careers" target="_blank"&gt;hires&lt;/a&gt;! &lt;/p&gt;&lt;h2&gt;References &lt;/h2&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="https://research.google/pubs/pub46180/" target="_blank"&gt;Google Vizier: A Service for Black-Box Optimization&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://cloud.google.com/vertex-ai/docs/vizier/overview"&gt;Google Cloud Vertex AI Vizier&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;</description><pubDate>Wed, 26 Jan 2022 18:30:00 +0000</pubDate><guid>https://cloud.google.com/blog/products/ai-machine-learning/optimize-your-applications-using-google-vertex-ai-vizier/</guid><category>Data Analytics</category><category>Cost Management</category><category>Cloud Operations</category><category>AI &amp; Machine Learning</category><og xmlns:og="http://ogp.me/ns#"><type>article</type><title>Optimize your applications using Google Vertex AI Vizier</title><description></description><site_name>Google</site_name><url>https://cloud.google.com/blog/products/ai-machine-learning/optimize-your-applications-using-google-vertex-ai-vizier/</url></og><author xmlns:author="http://www.w3.org/2005/Atom"><name>Sebastien Soudan</name><title>Senior Architect - F5</title><department></department><company></company></author><author xmlns:author="http://www.w3.org/2005/Atom"><name>Laurent Querel</name><title>Distinguished Engineer - F5</title><department></department><company></company></author></item><item><title>Creating custom notifications with Cloud Monitoring and Cloud Run</title><link>https://cloud.google.com/blog/products/operations/write-and-deploy-cloud-monitoring-alert-notifications-to-third-party-services/</link><description>&lt;div class="block-paragraph"&gt;&lt;p&gt;The uniqueness of each organization in the enterprise IT space creates interesting challenges in how they need to handle alerts. With many commercial tools in the IT Service Management (ITSM) market, and lots of custom internal tools, we equip teams with tools that are both flexible and powerful.&lt;/p&gt;&lt;p&gt;This post is for Google Cloud customers who want to deliver &lt;a href="https://cloud.google.com/monitoring/alerts"&gt;Cloud Monitoring alert notifications&lt;/a&gt; to third-party services that don’t have &lt;a href="https://cloud.google.com/monitoring/support/notification-options"&gt;supported notification channels&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;It provides a working implementation of integrating Cloud Pub/Sub notification channels with the &lt;a href="https://developers.google.com/chat/quickstart/incoming-bot-python" target="_blank"&gt;Google Chat&lt;/a&gt; service to forward the alert notifications to Google Chat rooms and demonstrates how this is deployed on Google Cloud. Moreover, it outlines steps for continuous integration using &lt;a href="https://cloud.google.com/cloud-build"&gt;Cloud Build&lt;/a&gt;, &lt;a href="https://cloud.google.com/docs/terraform"&gt;Terraform&lt;/a&gt;, and GitHub. All the source code for this project can be found in &lt;a href="https://github.com/googlecloudplatform/cloud-alerting-notification-forwarding" target="_blank"&gt;this GitHub repository&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;It is worth noting that the tutorial provides a generic framework that can be adapted by Google Cloud customers to deliver alert notifications to any 3rd-party services that provide Webhook/Http API interfaces. &lt;/p&gt;&lt;p&gt;Instructions for how to modify the sample code to integrate with other 3rd-party services is explained in the section &lt;a href="https://docs.google.com/document/d/1Zqq6368E9gGAhPzwZJNtgdGnJcMN0GjBBqviTrMkqQI/edit?resourcekey=0-N6Y-cAc5TAHPbGeeA4ycgA#bookmark=id.7wkuzsqr0kki" target="_blank"&gt;“Extending to other 3rd-party services“&lt;/a&gt;. &lt;/p&gt;&lt;h2&gt;Objectives&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;Write a service to forward Google Cloud Monitoring alert notifications from Cloud Monitoring Pub/Sub notification channels to a third-party service.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Build and deploy the service to Cloud Run using Cloud Build, Terraform, and GitHub.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;Costs&lt;/h2&gt;&lt;p&gt;This tutorial uses billable components of Google Cloud:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;Cloud Build&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Cloud Compute Engine (GCE)&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Cloud Container Registry&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Cloud Pub/Sub&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Cloud Run&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Cloud Storage&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Use the &lt;a href="https://cloud.google.com/products/calculator"&gt;pricing calculator&lt;/a&gt; to generate a cost estimate based on your projected usage.&lt;/p&gt;&lt;h2&gt;Before you begin&lt;/h2&gt;&lt;p&gt;For this tutorial, you need a GCP &lt;a href="https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy#projects"&gt;project&lt;/a&gt;. You can create a new project or select a project that you've already created:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;Select or create a Google Cloud project.&lt;br/&gt;&lt;a href="https://pantheon.corp.google.com/projectselector2/home/dashboard" target="_blank"&gt;Go to the project selector page&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Enable billing for your project.&lt;br/&gt;&lt;a href="https://support.google.com/cloud/answer/6293499#enable-billing" target="_blank"&gt;Enable billing&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;When you finish this tutorial, you can avoid continued billing by deleting the resources you created. For details, see the "Cleaning up" section at the end of this tutorial.&lt;/p&gt;&lt;h2&gt;Integration with Google Chat&lt;/h2&gt;&lt;p&gt;This tutorial provides a sample integration to enable Google Cloud customers to forward alert notifications to their Google Chat rooms. The system architecture is as follows:&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        &lt;a href="https://storage.googleapis.com/gweb-cloudblog-publish/images/Creating_custom_notificat.0400033308000317.max-2800x2800.jpg" rel="external" target="_blank"&gt;
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/images/Creating_custom_notifications_with_Cloud_M.max-1000x1000.jpg"
        
          alt="Creating custom notifications with Cloud Monitoring and Cloud Run- fastlane blog post.jpg"&gt;
        
        &lt;/a&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;p&gt;In the example, two monitoring alerting policies are created using Terraform: one is based on the GCE instance CPU &lt;a href="https://cloud.google.com/monitoring/api/metrics_gcp#gcp-compute"&gt;usage_time&lt;/a&gt; metric and the other is based on the GCE instance disk &lt;a href="https://cloud.google.com/monitoring/api/metrics_gcp#gcp-compute"&gt;read_bytes_count&lt;/a&gt; metric. Both alert policies use Cloud Monitoring Pub/Sub notification channels to send alert notifications. A &lt;a href="https://cloud.google.com/pubsub/docs/push"&gt;Cloud Pub/Sub push subscription&lt;/a&gt; is configured for each Cloud Pub/Sub notification channel. The push endpoints of the Cloud Pub/Sub push subscriptions are pointed to the Cloud Run service we implement so that all the alert notifications sent to the Cloud Pub/Sub notification channels are forwarded to the Cloud Run service. The Cloud Run service is a simple Http server that transforms the incoming Cloud Pub/Sub messages into Google Chat messages and sends them to the configured Google Chat rooms via their &lt;a href="https://developers.google.com/chat/how-tos/webhooks" target="_blank"&gt;incoming Webhook URLs&lt;/a&gt;. &lt;/p&gt;&lt;p&gt;All the infrastructure components are automatically created and configured using Terraform, which include:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;Cloud Pub/Sub topics, push subscriptions, and service account setup.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Cloud Pub/Sub notification channels&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Cloud Monitoring Alerting policies&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Cloud Run service and service account setup. &lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The Terraform code can be found at &lt;a href="https://github.com/GoogleCloudPlatform/cloud-alerting-notification-forwarding/tree/main/tf-modules" target="_blank"&gt;./tf-modules&lt;/a&gt; and &lt;a href="https://github.com/GoogleCloudPlatform/cloud-alerting-notification-forwarding/tree/main/environments" target="_blank"&gt;./environments&lt;/a&gt;.&lt;/p&gt;&lt;h3&gt; Looking at the Cloud Run code&lt;/h3&gt;&lt;p&gt;The Cloud Run service is responsible for delivering the Cloud Pub/Sub alert notifications to the configured Google Chat rooms. The integration code is located in the &lt;a href="https://github.com/GoogleCloudPlatform/cloud-alerting-notification-forwarding/tree/main/notification_integration" target="_blank"&gt;&lt;code&gt;./notification_integration&lt;/code&gt;&lt;/a&gt;&lt;code&gt;folder&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;In this example, a basic Flask HTTP server is set up in main.py to handle incoming Cloud Monitoring alert notifications from Cloud Monitoring Pub/Sub channels. We use Cloud Pub/Sub push subscriptions to forward the Pub/Sub notification messages to the Flask server in real time. More information on Cloud Pub/Sub subscription can be found in the &lt;a href="https://cloud.google.com/pubsub/docs/subscriber#push_pull"&gt;Subscriber overview&lt;/a&gt;. &lt;/p&gt;&lt;p&gt;Below is a handler that processes the Pub/Sub message:&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-code"&gt;&lt;dl&gt;
    &lt;dt&gt;code_block&lt;/dt&gt;
    &lt;dd&gt;&amp;lt;ListValue: [StructValue([(&amp;#x27;code&amp;#x27;, &amp;#x27;@app.route(\&amp;#x27;/&amp;lt;config_id&amp;gt;\&amp;#x27;, methods=[\&amp;#x27;POST\&amp;#x27;])\r\ndef handle_pubsub_message(config_id):\r\n   try:\r\n       config_param = config_params_server.GetConfig(config_id)\r\n   except BaseException as e:\r\n       err_msg = \&amp;#x27;Failed to get config parameters for {}: {}\&amp;#x27;.format(config_id, e)\r\n       logging.error(err_msg)\r\n       return(f\&amp;#x27;500: {err_msg}\&amp;#x27;, 200)\r\n   if \&amp;#x27;service_name\&amp;#x27; not in config_param:\r\n       err_msg = \&amp;#x27;&amp;quot;service_name&amp;quot; not found in the config parameters: {}\&amp;#x27;.format(config_id)\r\n       logging.error(err_msg)\r\n       return(f\&amp;#x27;500: {err_msg}\&amp;#x27;, 200)\r\n   if config_param[\&amp;#x27;service_name\&amp;#x27;] not in service_names_to_handlers:\r\n       err_msg = \&amp;#x27;No handler found for the service {}\&amp;#x27;.format(config_param[\&amp;#x27;service_name\&amp;#x27;])\r\n       logging.error(err_msg)\r\n       return(f\&amp;#x27;500: {err_msg}\&amp;#x27;, 200)\r\n \r\n   handler = service_names_to_handlers[config_param[\&amp;#x27;service_name\&amp;#x27;]]\r\n \r\n   # Parse the Pub/Sub raw message to get the notification\r\n   pubsub_received_message = request.get_json()\r\n   try:\r\n       notification = pubsub.ExtractNotificationFromPubSubMsg(pubsub_received_message)\r\n       response, status_code = handler.SendNotification(config_param, notification)\r\n       logging.info(f\&amp;#x27;Notification was sent with the status code = {status_code}: {response}\&amp;#x27;)\r\n       return(f\&amp;#x27;{status_code}: {response}\&amp;#x27;, 200) \r\n   except pubsub.DataParseError as e:\r\n       logging.error(f\&amp;#x27;Pubsub message parse error: {e}\&amp;#x27;)\r\n       return(f\&amp;#x27;400: {e}\&amp;#x27;, 200)\r\n   except BaseException as e:\r\n       logging.error(f\&amp;#x27;Unexpected error when processing Pubsub message: {e}\&amp;#x27;)\r\n       return(f\&amp;#x27;400: {e}\&amp;#x27;, 200)&amp;#x27;), (&amp;#x27;language&amp;#x27;, &amp;#x27;&amp;#x27;), (&amp;#x27;caption&amp;#x27;, &amp;lt;wagtail.rich_text.RichText object at 0x7f2e26144fa0&amp;gt;)])]&amp;gt;&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;p&gt;The handler calls the &lt;code&gt;ExtractNotificationFromPubSubMsg()&lt;/code&gt; function in &lt;code&gt;utilities/pubsub.py&lt;/code&gt; to parse the relevant notification data from the Pub/Sub message, and then loads the notification data into a dictionary. The output is a json object with the schema defined &lt;a href="https://cloud.google.com/monitoring/support/notification-options#webhooks"&gt;here&lt;/a&gt;. &lt;/p&gt;&lt;/div&gt;
&lt;div class="block-code"&gt;&lt;dl&gt;
    &lt;dt&gt;code_block&lt;/dt&gt;
    &lt;dd&gt;&amp;lt;ListValue: [StructValue([(&amp;#x27;code&amp;#x27;, &amp;#x27;def ExtractNotificationFromPubSubMsg(pubsub_msg: Dict[Text, Any]) -&amp;gt; Dict[Text, Any]:\r\n &amp;quot;&amp;quot;&amp;quot;Parses notification messages from Pub/Sub.\r\n   Args:\r\n       pubsub_msg: Dictionary containing the Pub/Sub message.\r\n       The message itself should be a base64-encoded string.\r\n   Returns:\r\n       The decoded \&amp;#x27;data\&amp;#x27; value of the provided Pub/Sub message, returned as a json dictory.\r\n   Raises:\r\n       DataParseError: If data cannot be parsed.\r\n&amp;quot;&amp;quot;&amp;quot;\r\n   try:\r\n       data_base64_string = pubsub_msg[\&amp;#x27;message\&amp;#x27;][\&amp;#x27;data\&amp;#x27;]\r\n   except (KeyError, TypeError) as e:\r\n       raise DataParseError(\&amp;#x27;invalid Pub/Sub message format\&amp;#x27;) from e\r\n\r\n   try:\r\n    data_bytes = base64.b64decode(data_base64_string)\r\n   except (binascii.Error, ValueError) as e:\r\n       raise DataParseError(\&amp;#x27;data should be base64-encoded\&amp;#x27;) from e\r\n   except TypeError as e:\r\n       raise DataParseError(\&amp;#x27;data should be in a string format\&amp;#x27;) from e\r\n   data_string = data_bytes.decode(\&amp;#x27;utf-8\&amp;#x27;)\r\n   data_string = data_string.strip()\r\n\r\n   try:\r\n       data_json = json.loads(data_string)\r\n   except json.JSONDecodeError as e:\r\n       raise DataParseError(\&amp;#x27;data can not be loaded as a json object: {}\&amp;#x27;.format(e), 400)\r\n\r\n   return data_json&amp;#x27;), (&amp;#x27;language&amp;#x27;, &amp;#x27;&amp;#x27;), (&amp;#x27;caption&amp;#x27;, &amp;lt;wagtail.rich_text.RichText object at 0x7f2e261440d0&amp;gt;)])]&amp;gt;&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;p&gt;This notification dictionary is then passed to &lt;code&gt;SendNotification()&lt;/code&gt; which sends the notification along with config_params to the &lt;code&gt;_SendHttpRequest()&lt;/code&gt;, in &lt;code&gt;utilities/service_handler.py&lt;/code&gt;, which appropriately notifies the third-party service about the alert with an API client. There is a URL parameter “&lt;code&gt;config_id&lt;/code&gt;”, which is the configuration ID used by the Cloud Run service to retrieve the configuration data “config_params”. “Config_params” includes all the needed parameters (e.g. HTTP URL and user credentials) for the Cloud Run service to forward the incoming notification to the third-party service. In this example, “&lt;code&gt;config_id&lt;/code&gt;” corresponds to the Pub/Sub topics defined &lt;a href="https://github.com/GoogleCloudPlatform/cloud-alerting-notification-forwarding/blob/main/environments/main/main.tf#L17" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;You can modify this dispatch function to forward alerts to any third-party service.&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-code"&gt;&lt;dl&gt;
    &lt;dt&gt;code_block&lt;/dt&gt;
    &lt;dd&gt;&amp;lt;ListValue: [StructValue([(&amp;#x27;code&amp;#x27;, &amp;#x27;def _SendHttpRequest(self, config_params: Dict[str, Any], notification: Dict[Any, Any]) -&amp;gt; Tuple[httplib2.Response, Text]:\r\n       &amp;quot;&amp;quot;&amp;quot;Sends a http request to a 3rd-party service via a http request.&amp;quot;&amp;quot;&amp;quot;\r\n       http_url = self._GetHttpUrl(config_params, notification)\r\n       messages_headers = self._BuildHttpRequestHeaders(config_params, notification)\r\n       message_body = self._BuildHttpRequestBody(config_params, notification)\r\n       http_obj = httplib2.Http()\r\n       # content is a bytes object.\r\n       http_response, content = http_obj.request(\r\n           uri=http_url,\r\n           method=self._http_method,\r\n           headers=messages_headers,\r\n           body=message_body,\r\n       )\r\n       return http_response, content.decode(\&amp;#x27;utf-8\&amp;#x27;)&amp;#x27;), (&amp;#x27;language&amp;#x27;, &amp;#x27;&amp;#x27;), (&amp;#x27;caption&amp;#x27;, &amp;lt;wagtail.rich_text.RichText object at 0x7f2e26144610&amp;gt;)])]&amp;gt;&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;p&gt;Remember to acknowledge the Pub/Sub message on success by returning a success HTTP status code (&lt;code&gt;200&lt;/code&gt; or &lt;code&gt;204&lt;/code&gt;). See &lt;a href="https://cloud.google.com/pubsub/docs/push#receiving_push_messages"&gt;Receiving push messages&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;All the logs written in the Cloud Run service can be easily accessed either from the &lt;a href="https://cloud.google.com/logging/docs/view/logs-viewer-interface"&gt;Cloud Logging Logs Explorer&lt;/a&gt; or the Cloud Run UI. The logs are very useful for debugging the Cloud Run service. Moreover, users can create an extra pull subscription of the Pub/Sub topic used by the Cloud Pub/Sub notification channel to simplify the triage of notification delivery issues. For example, if some alert notifications were not delivered to users’ Google Chat room, users could first check if the pull subscription received the Cloud Pub/Sub messages of the missing alert notifications. If the pull subscription correctly received the missing alert notifications, then it means the alert notifications got lost in the Cloud Run service. Otherwise, it was the Cloud Pub/Sub notification channel issue.  &lt;/p&gt;&lt;p&gt;Finally, there is a Dockerfile containing instructions to build an image that hosts the Flask server when deployed to Cloud Run:&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-code"&gt;&lt;dl&gt;
    &lt;dt&gt;code_block&lt;/dt&gt;
    &lt;dd&gt;&amp;lt;ListValue: [StructValue([(&amp;#x27;code&amp;#x27;, &amp;#x27;# [START run_pubsub_dockerfile]\r\n \r\n# Use the official Python image.\r\n# https://hub.docker.com/_/python\r\nFROM python:3.8\r\n \r\n# Allow statements and log messages to immediately appear in the Cloud Run logs\r\nENV PYTHONUNBUFFERED True\r\n \r\n# Copy application dependency manifests to the container image.\r\n# Copying this separately prevents re-running pip install on every code change.\r\nCOPY requirements.txt ./\r\n \r\n# Install production dependencies.\r\nRUN pip install -r requirements.txt\r\n \r\n# Copy local code to the container image.\r\nENV APP_HOME /app\r\nWORKDIR $APP_HOME\r\nCOPY . ./\r\nARG PROJECT_ID\r\nENV PROJECT_ID=$PROJECT_ID\r\n# Flag to control what type of config server to use: in-memory or gcs.\r\nARG CONFIG_SERVER_TYPE\r\nENV CONFIG_SERVER_TYPE=$CONFIG_SERVER_TYPE\r\n \r\n# Run the web service on container startup. \r\n# Use gunicorn webserver with one worker process and 8 threads.\r\n# For environments with multiple CPU cores, increase the number of workers\r\n# to be equal to the cores available.\r\nCMD exec gunicorn --bind :$PORT --workers 1 --threads 8 --timeout 0 main:app\r\n \r\n# [END run_pubsub_dockerfile]&amp;#x27;), (&amp;#x27;language&amp;#x27;, &amp;#x27;&amp;#x27;), (&amp;#x27;caption&amp;#x27;, &amp;lt;wagtail.rich_text.RichText object at 0x7f2e26144ee0&amp;gt;)])]&amp;gt;&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;h2&gt;Deploying the app&lt;/h2&gt;&lt;p&gt;This section describes how to deploy and set up continuous integration using Cloud Build, Terraform, and GitHub, following the GitOps methodology. The instructions are based on &lt;a href="https://cloud.google.com/solutions/managing-infrastructure-as-code"&gt;Managing infrastructure as code with Terraform, Cloud Build, and GitOps&lt;/a&gt;, which also explains the GitOps methodology and architecture. Sections from the guide are also referenced in the steps below. An important difference is that this document assumes that separate Google Cloud projects are used for the dev and prod environments, whereas the referenced guide configures the environments as virtual private clouds (VPCs). As a result, the following deployment steps (with the exception of “Setting up your GitHub repository”) need to be executed for each of the dev and prod projects.&lt;/p&gt;&lt;h3&gt;Set up your GitHub repository&lt;/h3&gt;&lt;p&gt;To get all the code and understand the repository structure needed to deploy your app, follow the steps in &lt;a href="https://cloud.google.com/solutions/managing-infrastructure-as-code#setting_up_your_github_repository"&gt;Setting up your GitHub repository&lt;/a&gt;. &lt;/p&gt;&lt;h2&gt;Deploy the Google Chat integration&lt;/h2&gt;&lt;h2&gt;Setting up webhook urls&lt;/h2&gt;&lt;h3&gt;Hardcoded Webhook URLs&lt;/h3&gt;&lt;p&gt;We provided within &lt;code&gt;main.py&lt;/code&gt; a &lt;code&gt;config_map&lt;/code&gt; variable to store your webhook urls. You’ll first need to locate your Google Chat &lt;a href="https://developers.google.com/chat/how-tos/webhooks#define_an_incoming_webhook" target="_blank"&gt;webhook url&lt;/a&gt; and replace the value for the key ‘&lt;code&gt;webhook_url&lt;/code&gt;’ within the &lt;code&gt;config_map&lt;/code&gt; dictionary.&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-code"&gt;&lt;dl&gt;
    &lt;dt&gt;code_block&lt;/dt&gt;
    &lt;dd&gt;&amp;lt;ListValue: [StructValue([(&amp;#x27;code&amp;#x27;, &amp;quot;config_map = {\r\n   &amp;#x27;tf-topic-cpu&amp;#x27;: {\r\n       &amp;#x27;service_name&amp;#x27;: &amp;#x27;google_chat&amp;#x27;,\r\n       &amp;#x27;msg_format&amp;#x27;: &amp;#x27;card&amp;#x27;,\r\n       &amp;#x27;webhook_url&amp;#x27;: &amp;#x27;&amp;lt;YOUR_GOOGLE_CHAT_ROOM_WEBHOOK_URL&amp;gt;&amp;#x27;},\r\n   &amp;#x27;tf-topic-disk&amp;#x27;: {\r\n       &amp;#x27;service_name&amp;#x27;: &amp;#x27;google_chat&amp;#x27;,\r\n       &amp;#x27;msg_format&amp;#x27;: &amp;#x27;card&amp;#x27;,\r\n       &amp;#x27;webhook_url&amp;#x27;: &amp;#x27;&amp;lt;YOUR_GOOGLE_CHAT_ROOM_WEBHOOK_URL&amp;gt;&amp;#x27;}\r\n}&amp;quot;), (&amp;#x27;language&amp;#x27;, &amp;#x27;&amp;#x27;), (&amp;#x27;caption&amp;#x27;, &amp;lt;wagtail.rich_text.RichText object at 0x7f2e26144f70&amp;gt;)])]&amp;gt;&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;h3&gt;Manual GCS Bucket Webhook URLs&lt;/h3&gt;&lt;p&gt;Alternatively if you’d like to have a more secure option to store your webhook urls, you can create a GCS bucket to store your webhook urls.&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;Locate and store your Google Chat &lt;a href="https://developers.google.com/chat/how-tos/webhooks#define_an_incoming_webhook" target="_blank"&gt;webhook url&lt;/a&gt; for your gchat rooms in a json file named &lt;code&gt;config_params.json&lt;/code&gt; in the format of:&lt;/p&gt;&lt;/li&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;{“topic”: “webhook url”, “topic”: “webhook url”}&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;&lt;p&gt;&lt;a href="https://cloud.google.com/storage/docs/creating-buckets"&gt;Create a Cloud Storage bucket&lt;/a&gt; to store the json file with the name &lt;code&gt;gcs_config_bucket_{PROJECT_ID}&lt;/code&gt;. &lt;/p&gt;&lt;/li&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;You can also run this command in the cloud console: &lt;code&gt;gsutil mb gs://gcs_config_bucket_{PROJECT_ID}&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;Grant the read permissions (Storage Legacy Bucket Reader and Storage Legacy Object Reader) to the default Cloud Run service account &lt;code&gt;&amp;lt;PROJECT_NUMBER&amp;gt;&lt;/code&gt;&lt;a href="mailto:-compute@developer.gserviceaccount.com"&gt;&lt;code&gt;-compute@developer.gserviceaccount.com&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;To deploy the notification channel integration sample for the first time automatically, we’ve provided a script deploy.py that will handle a majority of the required actions for deployment. After completing the webhook url step above run the following command:&lt;/p&gt;&lt;p&gt;&lt;code&gt;Python3 deploy.py -p &amp;lt;PROJECT_ID&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;h3&gt;Manual Deployment&lt;/h3&gt;&lt;p&gt;To deploy the notification channel integration manually, you’ll have to complete the following steps:&lt;/p&gt;&lt;p&gt;1. Set the Cloud Platform Project in Cloud Shell. Replace &amp;lt;PROJECT_ID&amp;gt; with your Cloud Platform project id:&lt;br/&gt;&lt;code&gt;gcloud config set project &amp;lt;PROJECT_ID&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;2. Enable the Cloud Build Service:&lt;br/&gt;&lt;code&gt;gcloud services enable cloudbuild.googleapis.com&lt;/code&gt;&lt;/p&gt;&lt;p&gt;3. Enable the Cloud Resource Manager Service:&lt;br/&gt;&lt;code&gt;gcloud services enable cloudresourcemanager.googleapis.com&lt;/code&gt;&lt;/p&gt;&lt;p&gt;4. Enable the Cloud Service Usage Service:&lt;br/&gt;&lt;code&gt;gcloud services enable serviceusage.googleapis.com&lt;/code&gt;&lt;/p&gt;&lt;p&gt;5. Grant the required permissions to your Cloud Build service account:&lt;br/&gt;&lt;code&gt;CLOUDBUILD_SA="$(gcloud projects describe $PROJECT_ID --format 'value(projectNumber)')@cloudbuild.gserviceaccount.com"&lt;/code&gt;&lt;br/&gt;&lt;br/&gt;&lt;code&gt;gcloud projects add-iam-policy-binding $PROJECT_ID --member serviceAccount:$CLOUDBUILD_SA --role roles/iam.securityAdmin&lt;/code&gt;&lt;br/&gt;&lt;br/&gt;&lt;code&gt;gcloud projects add-iam-policy-binding $PROJECT_ID --member serviceAccount:$CLOUDBUILD_SA --role roles/run.admin&lt;/code&gt;&lt;br/&gt;&lt;br/&gt;&lt;code&gt;gcloud projects add-iam-policy-binding $PROJECT_ID --member serviceAccount:$CLOUDBUILD_SA --role roles/editor&lt;/code&gt;&lt;/p&gt;&lt;p&gt;6. Create Cloud Storage bucket to store Terraform states remotely:&lt;br/&gt;&lt;code&gt;PROJECT_ID=$(gcloud config get-value project)&lt;/code&gt;&lt;br/&gt;&lt;code&gt;gsutil mb gs://${PROJECT_ID}-tfstate&lt;/code&gt;&lt;/p&gt;&lt;p&gt;7. (Optional) You may enable Object Versioning to keep the history of your deployments:&lt;br/&gt;&lt;code&gt;gsutil versioning set on gs://${PROJECT_ID}-tfstate&lt;/code&gt;&lt;/p&gt;&lt;p&gt;8. Trigger a build and deploy to Cloud Run:&lt;br/&gt;If you used the in-memory config server, run (replace &amp;lt;BRANCH&amp;gt; with the current environment branch)&lt;br/&gt;&lt;code&gt;gcloud builds submit . --config cloudbuild.yaml --substitutions BRANCH_NAME=&amp;lt;BRANCH&amp;gt;,_CONFIG_SERVER_TYPE=in-memory&lt;/code&gt;&lt;/p&gt;&lt;p&gt;If you use the GCS based config server, run:&lt;br/&gt;&lt;code&gt;gcloud builds submit . --config cloudbuild.yaml --substitutions BRANCH_NAME=&amp;lt;BRANCH&amp;gt;,_CONFIG_SERVER_TYPE=gcs&lt;/code&gt;&lt;/p&gt;&lt;h2&gt;Continuous Deployment setup&lt;/h2&gt;&lt;p&gt;This is an optional flow and this section describes how to set up continuous deployment using Cloud Build through the use of &lt;a href="https://cloud.google.com/build/docs/automating-builds/create-manage-triggers"&gt;triggers&lt;/a&gt;. The flow is demonstrated in the following diagram: every time users push a new version to their Git repository, it will trigger the Cloud Build trigger; the Cloud Build will run the YAML file to rebuild the Cloud Run docker image, update the infrastructure setup, and redeploy the Cloud Run service.&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        &lt;a href="https://storage.googleapis.com/gweb-cloudblog-publish/images/Creating_custom_notifications_with_Cloud_M.max-2800x2800_rnh25rO.jpg" rel="external" target="_blank"&gt;
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/images/Creating_custom_notifications_with_Cloud_M.max-1000x1000_gobFWDM.jpg"
        
          alt="Creating custom notifications with Cloud Monitoring and Cloud Run- fastlane blog post (1).jpg"&gt;
        
        &lt;/a&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;p&gt;The instructions are based on &lt;a href="https://cloud.google.com/source-repositories/docs/integrating-with-cloud-build"&gt;Automating builds with Cloud Build&lt;/a&gt;. &lt;/p&gt;&lt;p&gt;Set up a code repository, this could be GitHub, Google Cloud Source repository or any private repository.  &lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;Clone the repository from our GitHub.  &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Switch to the new project and push the cloned repository to the remote repository.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;div class="block-code"&gt;&lt;dl&gt;
    &lt;dt&gt;code_block&lt;/dt&gt;
    &lt;dd&gt;&amp;lt;ListValue: [StructValue([(&amp;#x27;code&amp;#x27;, &amp;#x27;gcloud init &amp;amp;&amp;amp; gconfig –global credential.https//source.developers.google.com.helper gcloud.sh \r\n\r\ngit remote add &amp;lt;connection name&amp;gt; &amp;lt;repo url&amp;gt;\r\n\r\ngit push &amp;lt;connection name&amp;gt;&amp;#x27;), (&amp;#x27;language&amp;#x27;, &amp;#x27;&amp;#x27;), (&amp;#x27;caption&amp;#x27;, &amp;lt;wagtail.rich_text.RichText object at 0x7f2e26144be0&amp;gt;)])]&amp;gt;&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        &lt;a href="https://storage.googleapis.com/gweb-cloudblog-publish/images/cloud_source_repositories.max-2800x2800.jpg" rel="external" target="_blank"&gt;
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/images/cloud_source_repositories.max-1000x1000.jpg"
        
          alt="cloud source repositories.jpg"&gt;
        
        &lt;/a&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;p&gt;Next we create a new trigger in Cloud Build. &lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;Step 1: &lt;a href="https://screenshot.googleplex.com/7VdXghFD93biGVr" target="_blank"&gt;Go to Cloud Build and Click “Triggers”&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Step 2: &lt;a href="https://screenshot.googleplex.com/5g8B95FA2HZu3pm" target="_blank"&gt;Click “Create Trigger”&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Step 3: &lt;a href="https://screenshot.googleplex.com/C7DXNq7xGFB9ekb" target="_blank"&gt;Select “Push to a branch” and set up the repository and branch you want to use, don’t forget to add the cloud run YAML file in the branch.&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;Cleaning up&lt;/h2&gt;&lt;p&gt;If you created a new project for this tutorial, delete the project. If you used an existing project and wish to keep it without the changes added in this tutorial, delete resources created for the tutorial.&lt;/p&gt;&lt;h3&gt;Delete the project&lt;/h3&gt;&lt;p&gt;The easiest way to eliminate billing is to delete the project you created for the tutorial.&lt;/p&gt;&lt;p&gt;Deleting a project has the following effects:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;Everything in the project is deleted. If you used an existing project for this tutorial, when you delete it, you also delete any other work you've done in the project.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Custom project IDs are lost. When you created this project, you might have created a custom project ID that you want to use in the future. To preserve the URLs that use the project ID, such as an appspot.com URL, delete selected resources inside the project instead of deleting the whole project.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;If you plan to explore multiple tutorials and quickstarts, reusing projects can help you avoid exceeding project quota limits.&lt;/p&gt;&lt;p&gt;To delete a project, do the following:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;h2&gt;&lt;p&gt;In the Cloud Console, go to the Manage resources page.&lt;/p&gt;&lt;a href="https://console.cloud.google.com/iam-admin/projects"&gt;Go to the Manage resources page&lt;/a&gt;&lt;/h2&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;In the project list, select the project that you want to delete and then click Delete.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;In the dialog, type the project ID and then click Shut down to delete the project.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3&gt;Delete tutorial resources&lt;/h3&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;Delete the Cloud resources provisioned by Terraform:&lt;br/&gt;terraform destroy&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;a href="https://cloud.google.com/storage/docs/deleting-buckets"&gt;Delete the Cloud Storage bucket&lt;/a&gt; called {PROJECT_ID}-tfstate.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Delete permissions that were granted to the Cloud Build service account:&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;gcloud projects remove-iam-policy-binding $PROJECT_ID --member serviceAccount:$CLOUDBUILD_SA --role roles/iam.securityAdmin&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;gcloud projects remove-iam-policy-binding $PROJECT_ID --member serviceAccount:$CLOUDBUILD_SA --role roles/run.admin&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;gcloud projects remove-iam-policy-binding $PROJECT_ID --member serviceAccount:$CLOUDBUILD_SA --role roles/storage.admin&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Delete permission for the service account to publish to tf-topic:&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;gcloud pubsub topics remove-iam-policy-binding \ projects/[PROJECT_NUMBER]/topics/tf-topic --role=roles/pubsub.publisher \ --member=serviceAccount:service-[PROJECT_NUMBER]@gcp-sa-monitoring-notification.iam.gserviceaccount.com&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;a href="https://cloud.google.com/monitoring/support/notification-options#editing_and_deleting_channels"&gt;Delete the notification channel&lt;/a&gt; that uses tf-topic.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;a href="https://docs.github.com/en/github/administering-a-repository/deleting-a-repository" target="_blank"&gt;Delete your forked GitHub repository&lt;/a&gt; notification_integration.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Disconnect the GitHub repository from Cloud Build by &lt;a href="https://cloud.google.com/cloud-build/docs/automating-builds/create-manage-triggers#deleting_a_build_trigger"&gt;deleting the Cloud Build triggers&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;a href="https://cloud.google.com/service-usage/docs/enable-disable#disabling"&gt;Disable Google Cloud APIs&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h2&gt;Expanding to other 3rd-party services&lt;/h2&gt;&lt;p&gt;The sample code in the tutorial provides a generic framework and can be easily customized for Google Cloud customers to deliver alert notifications to any 3rd-party services that provide Webhook/Http API interfaces.&lt;/p&gt;&lt;p&gt;To integrate with a new 3rd-party service, we can create a new derived class of the abstract class &lt;code&gt;HttpRequestBasedHandler&lt;/code&gt; defined in ./notification_channel/service_handler.py and updated the following member functions:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;code&gt;CheckConfigParams(): A function that checks if a given integration configuration is valid, e.g. a required API key is given.&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;code&gt;_GetHttpUrl(): A function to get the Http url (where to send Http requests) from the configuration data&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;code&gt;_BuildHttpRequestHeaders(): A function that constructs the Http request header.&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;code&gt;_BuildHttpRequestBody(): A function that constructs the Http request message body based on the incoming Cloud Pub/Sub message.&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;code&gt;SendNotification(): You can reuse the one defined in the GchatHandler class. &lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;There is no need to update the Terraform code, except you need to customize your alert policies. If you have additional suggestions, community feedback is always welcome. Please submit pull requests to continue to build the &lt;a href="https://github.com/googlecloudplatform/cloud-alerting-notification-forwarding" target="_blank"&gt;GitHub repository&lt;/a&gt; together.&lt;/p&gt;&lt;/div&gt;</description><pubDate>Wed, 19 Jan 2022 17:00:00 +0000</pubDate><guid>https://cloud.google.com/blog/products/operations/write-and-deploy-cloud-monitoring-alert-notifications-to-third-party-services/</guid><category>Compute</category><category>Open Source</category><category>Management Tools</category><category>DevOps &amp; SRE</category><category>Cloud Operations</category><og xmlns:og="http://ogp.me/ns#"><type>article</type><title>Creating custom notifications with Cloud Monitoring and Cloud Run</title><description></description><site_name>Google</site_name><url>https://cloud.google.com/blog/products/operations/write-and-deploy-cloud-monitoring-alert-notifications-to-third-party-services/</url></og><author xmlns:author="http://www.w3.org/2005/Atom"><name>Dong Wang</name><title>Software Engineer</title><department></department><company></company></author></item><item><title>Webhook, Pub/Sub, and Slack Alerting notification channels launched</title><link>https://cloud.google.com/blog/products/operations/pub-sub-webook-and-slack-notifications-are-now-available/</link><description>&lt;div class="block-paragraph"&gt;&lt;p&gt;When an alert fires from your applications, your team needs to know as soon as possible to mitigate any user-facing issues. Customers with complex operating environments rely on incident management or related services to organize and coordinate their responses to issues. They need the flexibility to route alert notifications to platforms or services in the formats that they can accept. &lt;/p&gt;&lt;p&gt;We’re excited to share that Google Cloud Monitoring’s Webhooks, Pub/Sub, and Slack notification channels for alerting are now Generally Available (GA). Along with our existing notification channels of email, SMS, mobile, and PagerDuty (currently in Beta), Google Cloud alerts can now be routed to many widely used services.  These new notification channels can be used to integrate alerts with the most popular Collaboration, ITSM, Incident Management, and virtually any other service or software that support Webhooks or Pub/Sub integration.&lt;/p&gt;&lt;p&gt;You can configure your Google Cloud alerts to be sent to any vendor or custom-built tool used by your team. For example, your GKE cluster uptime checks can send the alert data to a 3rd party communication tool via the pub/sub notification channel. Or if you’re tracking security concerns such as unexpected IP addresses, you can send a &lt;a href="https://cloud.google.com/logging/docs/alerting/log-based-alerts"&gt;log-based alert&lt;/a&gt; to your incident management provider. &lt;/p&gt;&lt;h3&gt;How to Configure Webhook, Pub/Sub, or Slack Notifications&lt;/h3&gt;&lt;p&gt;For custom integrations, &lt;a href="https://cloud.google.com/monitoring/support/notification-options#pubsub"&gt;Pub/Sub&lt;/a&gt; is the recommended approach for sending notifications to a private network. &lt;a href="https://cloud.google.com/monitoring/support/notification-options#webhooks"&gt;Webhooks&lt;/a&gt; are supported for public endpoints and are available with basic and token authentication. Both of these notification channels can be enabled programmatically through an automation tool like &lt;a href="https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/monitoring_notification_channel" target="_blank"&gt;Terraform&lt;/a&gt;.  &lt;/p&gt;&lt;p&gt;If you’re using Slack, you can enable Cloud Monitoring access to your Slack channel/workspace and then create the notification channel. If you'd like to automate Slack channel notification deployments, you'll need to &lt;a href="https://api.slack.com/authentication/basics" target="_blank"&gt;create and install your own Slack app&lt;/a&gt; and reuse the OAuth token instead of using the Google Cloud Monitoring app.&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        &lt;a href="https://storage.googleapis.com/gweb-cloudblog-publish/images/cloud_console.max-2800x2800.jpg" rel="external" target="_blank"&gt;
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/images/cloud_console.max-1000x1000.jpg"
        
          alt="cloud console.jpg"&gt;
        
        &lt;/a&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;h3&gt;What’s Next &lt;/h3&gt;If you’d like to learn more, check out our &lt;a href="https://cloud.google.com/blog/products/operations/write-and-deploy-cloud-monitoring-alert-notifications-to-third-party-services"&gt;example tutorial blog&lt;/a&gt; on how to send pub/sub notifications to external vendors using Cloud Run and Cloud Build. Please feel free to share your comments and feedback with us in the &lt;a href="https://www.googlecloudcommunity.com/gc/Google-Cloud-s-operations-suite/bd-p/cloud-operations" target="_blank"&gt;Google Cloud Community&lt;/a&gt;.  &lt;p&gt;&lt;/p&gt;&lt;/div&gt;</description><pubDate>Wed, 19 Jan 2022 17:00:00 +0000</pubDate><guid>https://cloud.google.com/blog/products/operations/pub-sub-webook-and-slack-notifications-are-now-available/</guid><category>Events</category><category>DevOps &amp; SRE</category><category>Cloud Operations</category><og xmlns:og="http://ogp.me/ns#"><type>article</type><title>Webhook, Pub/Sub, and Slack Alerting notification channels launched</title><description></description><site_name>Google</site_name><url>https://cloud.google.com/blog/products/operations/pub-sub-webook-and-slack-notifications-are-now-available/</url></og><author xmlns:author="http://www.w3.org/2005/Atom"><name>Alisa Goldstein</name><title>Product Manager</title><department></department><company></company></author><author xmlns:author="http://www.w3.org/2005/Atom"><name>Kyle Benson</name><title>Product Manager, Cloud Ops</title><department></department><company></company></author></item><item><title>Patterns for better insights and troubleshooting with hybrid cloud logs</title><link>https://cloud.google.com/blog/products/operations/get-better-hybrid-and-multicloud-log-insights/</link><description>&lt;div class="block-paragraph"&gt;&lt;p&gt;Hybrid and multi-cloud environments produce a boundless array of logs including application and server logs, logs related to cloud services, APIs, orchestrators, gateways and just about anything else running in the environment. Due to this high volume, logging systems may become slow and unmanageable when you urgently need them to troubleshoot an issue, and even harder to use them to get insights. &lt;/p&gt;&lt;p&gt;&lt;a href="https://cloud.google.com/products/operations"&gt;Google Cloud's operations suite&lt;/a&gt; plays a vital role in any application modernization framework and is essential to assuring a reliable and secure application, providing monitoring, logging and alerting — the baseline of SRE and Google’s holistic approach to operations.&lt;/p&gt;&lt;p&gt;As customer engineers, we see many organizations with hybrid and multi-cloud applications who want to integrate &lt;b&gt;logs&lt;/b&gt; and &lt;b&gt;metrics&lt;/b&gt; from various sources into a single console. &lt;b&gt;Metrics&lt;/b&gt; of all critical services can be collected not just for daily operations but also to measure internal and external SLIs, SLOs and SLAs of modern applications. &lt;/p&gt;&lt;h3&gt;Improving customer operations&lt;/h3&gt;&lt;p&gt;We recently worked with two customers - a large media-processing customer and a large telecom provider -- that have applications running on Google Cloud, other clouds and on-premises. Each customer faced issues with their logs:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;Customer 1, large media-process company: their existing logging environment was too slow to effectively support real-time troubleshooting using system and application logs from across all their environments, and&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Customer 2, large telecom provider: they did not feel they were getting valuable insights from the many terabytes of network logs they were ingesting per day. These insights did not need to be real-time.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Both customers used self-managed, popular open source products for ingesting, storage and retrieval. But as the volume of their logs grew, the cost of their infrastructure and operational overhead to support logs rose too. They shared other characteristics:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;Both setups required SSD storage as well as large VMs for ingestion pipelines, storage and retrieval. &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Both faced risk due to dependencies on a single resource for elements of their log management.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;And finally, both had data pipeline queues piling up, which for one of them meant they were not getting the logs when they needed them most, when application/infrastructure failures impacted the SLA of their products and services. &lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;They needed to reduce costs, reduce failures and determine the volume of logs they need to ingest and store to get analytical insights from them. We looked at different patterns and proposed the following two options:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;Customer 1: Route system and application logs from their hybrid and multi-cloud services to Cloud Logging for &lt;b&gt;real-time&lt;/b&gt; troubleshooting at scale, reducing cost and operational burden.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Customer 2: Route their network logs directly to BigQuery, so they could manage costs and get better insights from their data.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Let’s take a deeper look at the two patterns:&lt;/p&gt;&lt;h3&gt;Pattern 1: Cloud Logging for resource management and troubleshooting &lt;/h3&gt;&lt;p&gt;This pattern fits well in the scenarios where the primary objective is to troubleshoot based on real time logs. Here the main focus is on important logs &amp;amp; metrics, while logs that are not needed for real-time troubleshooting are sampled and filtered as needed. Customer 1 had a large volume of logs, so scale and timely ingestion were critical for troubleshooting problems. To help them meet their objective, we proposed the following pattern:&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        &lt;a href="https://storage.googleapis.com/gweb-cloudblog-publish/images/Pattern_1.max-2800x2800.jpg" rel="external" target="_blank"&gt;
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/images/Pattern_1.max-1000x1000.jpg"
        
          alt="Pattern 1.jpg"&gt;
        
        &lt;/a&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;p&gt;In this pattern, the customer uses &lt;a href="https://cloud.google.com/logging"&gt;Cloud Logging&lt;/a&gt; to collect the logs from Google Cloud, other clouds and VMs. Google Cloud resources such as Google Kubernetes Engine (GKE), Compute Engine with the Ops Agent, and Cloud Storage automatically send logs to Cloud Logging, while logging agents such as &lt;a href="https://cloud.google.com/logging/docs/agent/logging/configuration#third-party_application_log_input_configuration"&gt;fluentd&lt;/a&gt; and &lt;a href="https://github.com/observIQ/stanza-plugins" target="_blank"&gt;stanza&lt;/a&gt; brings in application and system logs from other sources such as other clouds and on-prem systems (Additionally, partner tools such as &lt;a href="https://cloud.google.com/blog/products/management-tools/extending-stackdriver-logging-across-clouds-and-providers-with-new-bindplane-integration"&gt;BlueMedora&lt;/a&gt; can be used to bring logs from a wide range of other sources including Azure Kubernetes Service).&lt;/p&gt;&lt;p&gt;Logging agents collect and send the logs using Cloud Logging API to the &lt;a href="https://cloud.google.com/logging/docs/routing/overview#log-router"&gt;Logs Router&lt;/a&gt;, where you can apply filters to capture only the important logs. Our customer’s hybrid deployment was generating 20 TB of logs every day, so we identified logs which were not important for real-time troubleshooting (in their case detailed network logs and debug logs) and applied filters at both the agent and Logs Router level. Further, we advised them that they could export their network logs to BigQuery or other third party tools for future analysis for deriving patterns and insights.&lt;/p&gt;&lt;p&gt;This pattern suited the customer’s requirements as their use case was primarily focused on troubleshooting and detailed network logs were only needed for analytics. It had the following advantages&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;Fully managed so they could focus on app development&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Cost effective with combination of Cloud Logging and BigQuery&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Provided the basis for future self healing operations with logs-based metrics&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Pattern 2: BigQuery for log analytics in hybrid and multi-cloud scenarios &lt;/h3&gt;&lt;p&gt;This pattern fits well in Customer 2’s scenario where logs volumes are high and leveraged primarily for analytics. In this customer’s case, they wanted deeper insights into their network logs.&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        &lt;a href="https://storage.googleapis.com/gweb-cloudblog-publish/images/Pattern_2.max-2800x2800.jpg" rel="external" target="_blank"&gt;
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/images/Pattern_2.max-1000x1000.jpg"
        
          alt="Pattern 2.jpg"&gt;
        
        &lt;/a&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;p&gt;This pattern is recommended for customers that need to run models for anomaly detection, pattern recognition, etc., specifically related to their network logs. Network logs tend to be high volume, and since these logs were primarily used for analytics, the customer did not really benefit from capabilities like sorting, filtering, dashboarding, etc. This is where &lt;a href="https://cloud.google.com/bigquery"&gt;BigQuery&lt;/a&gt; was useful, with low costs, built-in AI/ML, and global scale. Google's fully managed data warehouse and analytical engine performed queries on terabytes of logs in tens of seconds making it ideal for the customer’s advanced analytics needs.&lt;/p&gt;&lt;p&gt;In this pattern, the Log Collector agent uses an output &lt;a href="https://docs.fluentd.org/output" target="_blank"&gt;plugin&lt;/a&gt; that configures &lt;a href="https://www.fluentd.org/plugins#google-cloud-platform" target="_blank"&gt;BigQuery as a destination&lt;/a&gt; for storing the logs collected from hybrid cloud, other cloud providers and from Google Cloud. Using the plugin, the customer can directly load logs into BigQuery in near-real-time from many servers. BigQuery automatically creates the schema for incoming logs, giving the customer more control over defining the schema and data format for the metrics. Once the logs are in BigQuery, the customer can make use of &lt;a href="https://cloud.google.com/looker"&gt;Looker&lt;/a&gt; to perform basic RegEx and build machine learning models on top of it. The customer can also visualize their log data by creating a dashboard that's updated frequently using &lt;a href="https://datastudio.google.com/" target="_blank"&gt;Data Studio&lt;/a&gt;, Looker or any visualization tool. &lt;/p&gt;&lt;p&gt;This pattern provides the following advantages:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;A cost-effective solution for high-volume networking logs &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Built-in analytics engine for log insights &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Use of the BigQuery API to display data to a dashboard and consume analytical insights&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Final Thoughts&lt;/h3&gt;&lt;p&gt;Google Cloud’s operations suite is easy to use right out of the box for Google Cloud users, but as we demonstrate for our customers everyday, it supports a variety of other use cases. As shown in the two patterns above, if you did need to troubleshoot with a subset of the logs and need analytical capabilities with another subset of your logs, you can use the Cloud Logging API to send the first part of your logs to Cloud Logging and the other part of your logs directly to BigQuery! &lt;/p&gt;&lt;p&gt;Furthermore, there is work ongoing to simplify many of these tasks. For example, we recently released the preview of &lt;a href="https://cloud.google.com/logging/docs/log-analytics"&gt;Log Analytics&lt;/a&gt;, which automatically imports logs from Google Cloud services into BigQuery, and gives you the ability to analyze that data directly from the Cloud Logging interface.&lt;/p&gt;&lt;h3&gt;Get started today &lt;/h3&gt;&lt;p&gt;If you want to achieve the maximum benefit from your logs without the cost and operational overhead, set up time with your account team today or &lt;a href="https://cloud.google.com/contact"&gt;click here&lt;/a&gt; to contact our sales team.&lt;/p&gt;&lt;p&gt;If you have any questions or topics that you want to discuss with the operations community at Google Cloud, please visit our &lt;a href="https://www.googlecloudcommunity.com/gc/Google-Cloud-s-operations-suite/bd-p/cloud-operations" target="_blank"&gt;Google Cloud Community site&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-related_article_tout_external"&gt;





&lt;div class="uni-related-article-tout h-c-page"&gt;
  &lt;section class="h-c-grid"&gt;
    &lt;a href=""
       data-analytics='{
                       "event": "page interaction",
                       "category": "article lead",
                       "action": "related article - inline",
                       "label": "article: {slug}"
                     }'
       class="uni-related-article-tout__wrapper h-c-grid__col h-c-grid__col--8 h-c-grid__col-m--6 h-c-grid__col-l--6
        h-c-grid__col--offset-2 h-c-grid__col-m--offset-3 h-c-grid__col-l--offset-3 uni-click-tracker"&gt;
      &lt;div class="uni-related-article-tout__inner-wrapper"&gt;
        &lt;p class="uni-related-article-tout__eyebrow h-c-eyebrow"&gt;Related Article&lt;/p&gt;

        &lt;div class="uni-related-article-tout__content-wrapper"&gt;
          &lt;div class="uni-related-article-tout__image-wrapper"&gt;
            &lt;div class="uni-related-article-tout__image" style="background-image: url('')"&gt;&lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="uni-related-article-tout__content"&gt;
            &lt;h4 class="uni-related-article-tout__header h-has-bottom-margin"&gt;&lt;/h4&gt;
            &lt;p class="uni-related-article-tout__body"&gt;&lt;/p&gt;
            &lt;div class="cta module-cta h-c-copy  uni-related-article-tout__cta muted"&gt;
              &lt;span class="nowrap"&gt;Read Article
                &lt;svg class="icon h-c-icon" role="presentation"&gt;
                  &lt;use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#mi-arrow-forward"&gt;&lt;/use&gt;
                &lt;/svg&gt;
              &lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;/section&gt;
&lt;/div&gt;

&lt;/div&gt;</description><pubDate>Tue, 18 Jan 2022 17:00:00 +0000</pubDate><guid>https://cloud.google.com/blog/products/operations/get-better-hybrid-and-multicloud-log-insights/</guid><category>Data Analytics</category><category>Hybrid &amp; Multicloud</category><category>DevOps &amp; SRE</category><category>Cloud Operations</category><og xmlns:og="http://ogp.me/ns#"><type>article</type><title>Patterns for better insights and troubleshooting with hybrid cloud logs</title><description></description><site_name>Google</site_name><url>https://cloud.google.com/blog/products/operations/get-better-hybrid-and-multicloud-log-insights/</url></og><author xmlns:author="http://www.w3.org/2005/Atom"><name>Meenaxi Gunjati</name><title>Customer Engineer</title><department></department><company></company></author><author xmlns:author="http://www.w3.org/2005/Atom"><name>Tinu Anand Chandrasekar</name><title>Customer Engineer, Google Cloud</title><department></department><company></company></author></item><item><title>How to deploy the Google Cloud Ops Agent with Ansible</title><link>https://cloud.google.com/blog/products/operations/use-ansible-to-deploy-the-google-cloud-ops-agent/</link><description>&lt;div class="block-paragraph"&gt;&lt;p&gt;Site Reliability Engineering (SRE) and Operations teams responsible for operating virtual machines (VMs) are always looking for ways to provide a more reliable, more scalable environment for their development partners. Part of providing that stable experience is having telemetry data (metrics, logs and traces) from systems and applications so you can monitor and troubleshoot effectively. Many Google Cloud services, including Google Compute Engine, provide basic system metrics out of the box. However, if you want in-depth metrics about your VMs or application telemetry, installing the Google Cloud Ops Agent is necessary.&lt;/p&gt;&lt;p&gt;At Cloud Ops we make it easy to install the Ops Agent in our UI on one or a handful of VMs, but installing, configuring, and managing an agent on a fleet of VMs, especially when many are hosting production workloads at an enterprise organization can be incredibly taxing. There are simply too many configuration and provisioning tools and often simply too much complexity. In that vein, we at Cloud Operations want to meet our users where they are in their process of digital transformation. That’s why we’ve introduced support for the &lt;a href="https://cloud.google.com/monitoring/agent/monitoring/fleet-installation"&gt;most common automation tools&lt;/a&gt; in the configuration and provisioning space to deploy the &lt;a href="https://cloud.google.com/blog/products/operations/ops-agent-now-ga-and-it-includes-opentelemetry"&gt;Cloud Ops Agent&lt;/a&gt;. This lets our users prioritize automation as a way to reduce operational toil so they can  focus on building and managing reliable and highly performant infrastructure.&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        &lt;a href="https://storage.googleapis.com/gweb-cloudblog-publish/images/agent_installation.max.max-2800x2800.jpg" rel="external" target="_blank"&gt;
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/images/agent_installation.max.max-1000x1000.jpg"
        
          alt="agent installation.jpg"&gt;
        
        &lt;/a&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;p&gt;Today we’ll be taking a look at how to deploy the Cloud Ops agent in an automated fashion across a fleet of VMs, and in this example we’ll use Ansible. Ansible is a popular open source configuration management tool that provides a lightweight way to get started automating your infrastructure. We’ll also look at a more advanced example, using some templating tools available to streamline your automation code. But first let's talk a little about what Ansible is, and how it works.&lt;/p&gt;&lt;h3&gt;What is Ansible, and how does it work?&lt;/h3&gt;&lt;p&gt;&lt;a href="https://www.ansible.com/" target="_blank"&gt;Ansible&lt;/a&gt; is an open source tool written in Python which provides an agentless framework for connecting and interacting with machines. To do this it leverages the native connection protocols for Linux and Windows, SSH and Powershell respectively. The key benefit of using existing connection protocols is that it helps to reduce overhead on the systems, while benefiting from the security of these longstanding and heavily adopted protocols. When working with Ansible, one of the simplest units of work is a playbook:&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-code"&gt;&lt;dl&gt;
    &lt;dt&gt;code_block&lt;/dt&gt;
    &lt;dd&gt;&amp;lt;ListValue: [StructValue([(&amp;#x27;code&amp;#x27;, &amp;#x27;---\r\n- name: Sample playbook\r\n  hosts: localhost\r\n  tasks:\r\n    - ansible.builtin.debug:\r\n        msg: &amp;quot;Hello World!&amp;quot;&amp;#x27;), (&amp;#x27;language&amp;#x27;, &amp;#x27;&amp;#x27;), (&amp;#x27;caption&amp;#x27;, &amp;lt;wagtail.rich_text.RichText object at 0x7f2e278a28e0&amp;gt;)])]&amp;gt;&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;p&gt;This really simple playbook runs against your localhost, and executes a task essentially equivalent to echoing “Hello World!”&lt;/p&gt;&lt;h3&gt;Deploying the Ops Agent to monitor and troubleshoot VMs&lt;/h3&gt;&lt;p&gt;The new Google Cloud Ops Agent makes it really easy to immediately start collecting telemetry data from your systems at a high level. By simply installing the agent we can immediately ingest standard system logs and additional telemetry about the system beyond the defaults, including running processes.&lt;/p&gt;&lt;h3&gt;Adding workload specifics to your configuration&lt;/h3&gt;&lt;p&gt;Now let’s take a look at a more complex example, like a playbook that will deploy Nginx and a custom configuration for the Ops Agent to collect telemetry.&lt;/p&gt;&lt;p&gt;Here’s what the simple custom configuration file looks like for the Ops Agent, to collect default metrics and logs from Nginx, also written in YAML format:&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-code"&gt;&lt;dl&gt;
    &lt;dt&gt;code_block&lt;/dt&gt;
    &lt;dd&gt;&amp;lt;ListValue: [StructValue([(&amp;#x27;code&amp;#x27;, &amp;#x27;logging:\r\n  receivers:\r\n    nginx_default_access:\r\n      type: nginx_access\r\n    nginx_default_error:\r\n      type: nginx_error\r\n  service:\r\n    pipelines:\r\n      nginx:\r\n        receivers:\r\n          - nginx_default_access\r\n          - nginx_default_error\r\nmetrics:\r\n  receivers:\r\n    nginx_metrics:\r\n      type: nginx\r\n      stub_status_url: http://127.0.0.1:80/status\r\n      collection_interval: 60s\r\n  service:\r\n    pipelines:\r\n      nginx_pipeline:\r\n        receivers:\r\n          - nginx_metrics&amp;#x27;), (&amp;#x27;language&amp;#x27;, &amp;#x27;&amp;#x27;), (&amp;#x27;caption&amp;#x27;, &amp;lt;wagtail.rich_text.RichText object at 0x7f2e278a2070&amp;gt;)])]&amp;gt;&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;p&gt;And here’s a playbook, specifying the custom `ops_agent.yaml` configuration file in the role: &lt;/p&gt;&lt;/div&gt;
&lt;div class="block-code"&gt;&lt;dl&gt;
    &lt;dt&gt;code_block&lt;/dt&gt;
    &lt;dd&gt;&amp;lt;ListValue: [StructValue([(&amp;#x27;code&amp;#x27;, &amp;#x27;---\r\n- name: Deploy and configure Cloud Ops Agent\r\n  hosts: all\r\n  become: true\r\n  roles:\r\n    - role: googlecloudplatform.google_cloud_ops_agents\r\n      vars:\r\n        agent_type: ops-agent\r\n        version: 1.0.1\r\n        main_config_file: ops_agent.yaml\r\n     notify:\r\n        - Restart Ops Agent\r\n\r\n  tasks:\r\n    - name: Install nginx\r\n      ansible.builtin.package: \r\n        name: nginx\r\n        state: present\r\n\r\n    - name: Customize nginx config for telemetry\r\n      ansible.builtin.template:\r\n        src: ansible_templates/status.conf\r\n        dest: /etc/nginx/conf.d/status.conf\r\n      notify:\r\n        - Restart Nginx\r\n\r\n\r\n    - name: Start nginx\r\n      ansible.builtin.service:\r\n        name: nginx\r\n        state: started\r\n        enabled: yes\r\n\r\n    - name: Start Ops Agent\r\n      ansible.builtin.service:\r\n        name: google-cloud-ops-agent\r\n        state: started\r\n        enabled: yes\r\n        \r\n  handlers:\r\n    - name: Restart Nginx\r\n      ansible.builtin.service:\r\n        name: nginx\r\n        state: restarted\r\n        enabled: yes\r\n\r\n    - name: Restart Ops Agent\r\n      ansible.builtin.service:\r\n        name: google-cloud-ops-agent\r\n        state: restarted\r\n        enabled: yes&amp;#x27;), (&amp;#x27;language&amp;#x27;, &amp;#x27;&amp;#x27;), (&amp;#x27;caption&amp;#x27;, &amp;lt;wagtail.rich_text.RichText object at 0x7f2e278a29d0&amp;gt;)])]&amp;gt;&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;p&gt;After running this playbook we should have successfully installed NGINX in all hosts within our inventory, and should be submitting both metrics and data from Nginx! To copy the example playbook check out this &lt;a href="https://gist.github.com/kyleabenson/4f218e74f98d9fef01ca6166de9c9033" target="_blank"&gt;GitHub sample&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Now it’s time to visualize some of this information! We provide an out of the box dashboard for Nginx, that you can import like so:&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/original_images/nginx_demo.gif"
        
          alt="nginx_demo.gif"&gt;
        
        &lt;/a&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;p&gt;And that’s it! Now we can see the metrics we’ve been collecting from Nginx with the Cloud Ops Agent&lt;/p&gt;&lt;h3&gt;Get started today&lt;/h3&gt;&lt;p&gt;Whether you are managing a handful of VMs or an entire fleet, ensuring robust observability data is available from systems and applications is key to effective monitoring and troubleshooting. With the VM Instances dashboard in Cloud Monitoring, Agent Policies, or use of open source tooling such as Ansible, Chef, Puppet and Terraform, you have many options to install agents on your Google Cloud VMs. The &lt;a href="https://cloud.google.com/stackdriver/docs/solutions/agents/ops-agent"&gt;Ops Agent&lt;/a&gt; helps you gather data to keep your infrastructure and applications performing their very best, and automating the deployment makes day to day management all that much easier. &lt;/p&gt;&lt;p&gt;If you’d like to watch a video where I walk through these steps, &lt;a href="https://www.youtube.com/watch?v=GQgNygd-XJU&amp;amp;feature=youtu.be" target="_blank"&gt;check out our YouTube video&lt;/a&gt; that demonstrates this blog post, and see the rest of our &lt;a href="https://www.youtube.com/playlist?list=PLBgogxgQVM9uB-hc8aFYedHrXGf688N9O" target="_blank"&gt;O11y In Depth playlist&lt;/a&gt;!&lt;/p&gt;&lt;p&gt;Or if you’d like to get started with a tutorial, you can also use our &lt;a href="https://github.com/GoogleCloudPlatform/google-cloud-ops-agents-ansible/tree/master/tutorial" target="_blank"&gt;Cloud Ops Agent tutorial for Ansible&lt;/a&gt; to walkthrough a simple deployment in Google Cloud Shell.&lt;/p&gt;&lt;p&gt;Lastly, if you have feedback or want to ask us questions, drop us a line on the &lt;a href="https://www.googlecloudcommunity.com/gc/Google-Cloud-s-operations-suite/bd-p/cloud-operations" target="_blank"&gt;Google Cloud Community Cloud Ops&lt;/a&gt; area!&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-video"&gt;



&lt;div class="article-module article-video "&gt;
  &lt;figure&gt;
    &lt;a class="h-c-video h-c-video--marquee"
      href="https://youtube.com/watch?v=GQgNygd-XJU"
      data-glue-modal-trigger="uni-modal-GQgNygd-XJU-"
      data-glue-modal-disabled-on-mobile="true"&gt;

      
        &lt;img src="//img.youtube.com/vi/GQgNygd-XJU/maxresdefault.jpg"
             alt="Learn to use the new Ops Agent to isolate, troubleshoot, and resolve issues on third party applications. Get out-of-the-box support and dashboards for Apache, NGINX, MySQL, and more, to better understand what&amp;#x27;s happening with apps running on your VMs."/&gt;
      
      &lt;svg role="img" class="h-c-video__play h-c-icon h-c-icon--color-white"&gt;
        &lt;use xlink:href="#mi-youtube-icon"&gt;&lt;/use&gt;
      &lt;/svg&gt;
    &lt;/a&gt;

    
  &lt;/figure&gt;
&lt;/div&gt;

&lt;div class="h-c-modal--video"
     data-glue-modal="uni-modal-GQgNygd-XJU-"
     data-glue-modal-close-label="Close Dialog"&gt;
   &lt;a class="glue-yt-video"
      data-glue-yt-video-autoplay="true"
      data-glue-yt-video-height="99%"
      data-glue-yt-video-vid="GQgNygd-XJU"
      data-glue-yt-video-width="100%"
      href="https://youtube.com/watch?v=GQgNygd-XJU"
      ng-cloak&gt;
   &lt;/a&gt;
&lt;/div&gt;

&lt;/div&gt;
&lt;div class="block-related_article_tout"&gt;





&lt;div class="uni-related-article-tout h-c-page"&gt;
  &lt;section class="h-c-grid"&gt;
    &lt;a href="https://cloud.google.com/blog/products/operations/ops-agent-now-ga-and-it-includes-opentelemetry/"
       data-analytics='{
                       "event": "page interaction",
                       "category": "article lead",
                       "action": "related article - inline",
                       "label": "article: {slug}"
                     }'
       class="uni-related-article-tout__wrapper h-c-grid__col h-c-grid__col--8 h-c-grid__col-m--6 h-c-grid__col-l--6
        h-c-grid__col--offset-2 h-c-grid__col-m--offset-3 h-c-grid__col-l--offset-3 uni-click-tracker"&gt;
      &lt;div class="uni-related-article-tout__inner-wrapper"&gt;
        &lt;p class="uni-related-article-tout__eyebrow h-c-eyebrow"&gt;Related Article&lt;/p&gt;

        &lt;div class="uni-related-article-tout__content-wrapper"&gt;
          &lt;div class="uni-related-article-tout__image-wrapper"&gt;
            &lt;div class="uni-related-article-tout__image" style="background-image: url('')"&gt;&lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="uni-related-article-tout__content"&gt;
            &lt;h4 class="uni-related-article-tout__header h-has-bottom-margin"&gt;The Ops Agent is now GA and it leverages OpenTelemetry&lt;/h4&gt;
            &lt;p class="uni-related-article-tout__body"&gt;Today, we’re happy to announce the General Availability of the new Ops Agent, which replaces both the Logging and Monitoring agents and s...&lt;/p&gt;
            &lt;div class="cta module-cta h-c-copy  uni-related-article-tout__cta muted"&gt;
              &lt;span class="nowrap"&gt;Read Article
                &lt;svg class="icon h-c-icon" role="presentation"&gt;
                  &lt;use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#mi-arrow-forward"&gt;&lt;/use&gt;
                &lt;/svg&gt;
              &lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;/section&gt;
&lt;/div&gt;

&lt;/div&gt;</description><pubDate>Wed, 12 Jan 2022 17:00:00 +0000</pubDate><guid>https://cloud.google.com/blog/products/operations/use-ansible-to-deploy-the-google-cloud-ops-agent/</guid><category>Compute</category><category>Open Source</category><category>Management Tools</category><category>DevOps &amp; SRE</category><category>Cloud Operations</category><og xmlns:og="http://ogp.me/ns#"><type>article</type><title>How to deploy the Google Cloud Ops Agent with Ansible</title><description></description><site_name>Google</site_name><url>https://cloud.google.com/blog/products/operations/use-ansible-to-deploy-the-google-cloud-ops-agent/</url></og><author xmlns:author="http://www.w3.org/2005/Atom"><name>Kyle Benson</name><title>Product Manager, Cloud Ops</title><department></department><company></company></author><author xmlns:author="http://www.w3.org/2005/Atom"><name>Rahul Harpalani</name><title>Product Manager</title><department></department><company></company></author></item><item><title>How Sabre is using SRE to lead a successful digital transformation</title><link>https://cloud.google.com/blog/products/devops-sre/sabre-leverages-google-cloud-and-site-reliability-engineering/</link><description>&lt;div class="block-paragraph"&gt;&lt;p&gt;&lt;i&gt;&lt;b&gt;Editor’s note&lt;/b&gt;: Today we hear from Kenny Kon, an SRE Director at Sabre. Kenny shares about how they have been able to successfully adopt Google’s SRE framework by leveraging their partnership with Google Cloud. &lt;/i&gt;&lt;/p&gt;&lt;p&gt;As a leader in the travel industry, Sabre Corporation is driving innovation in the global travel industry and developing solutions that help airlines, hotels, and travel agencies transform the traveler experience and satisfy the ever-evolving needs of its customers. &lt;/p&gt;&lt;p&gt;In order to build these solutions, we joined forces with Google Cloud as our preferred cloud provider to accelerate our digital transformation. We chose Google because they understand the industry we are in as they also manage travel products such as Google Travel. Google also created &lt;a href="http://cloud.google.com/sre"&gt;SRE (Site Reliability Engineering)&lt;/a&gt;, and operates with SRE principles at the Google scale, which is what intrigued us the most.&lt;/p&gt;&lt;p&gt;Initially we started with a multi-cloud model, but that didn’t help us move faster so we consolidated to just Google Cloud. To speed our transformation along, we have adopted Google SRE (Site Reliability Engineering) practices which enables us to balance reliability and speed. We have been able to make this transformation with the direct help of Google Cloud’s &lt;a href="https://cloud.google.com/consulting"&gt;Professional Services Organization (PSO)&lt;/a&gt; along with Google Cloud’s tooling, like &lt;a href="https://cloud.google.com/monitoring"&gt;Cloud Monitoring&lt;/a&gt; and &lt;a href="https://cloud.google.com/logging"&gt;Cloud Logging&lt;/a&gt;, and operating on &lt;a href="https://cloud.google.com/kubernetes-engine"&gt;Google Kubernetes Engine (GKE)&lt;/a&gt;, and &lt;a href="https://cloud.google.com/spanner"&gt;Cloud Spanner&lt;/a&gt;. &lt;/p&gt;&lt;p&gt;In adopting SRE at Sabre, we’d like to highlight three key takeaways from the journey: &lt;/p&gt;&lt;h3&gt;1. Find colleagues who are also passionate about shifting culture and adopting SRE&lt;/h3&gt;&lt;p&gt;Create a community within your organization who is dedicated to the SRE journey and motivated to make things happen. As we adopted SRE at Sabre I saw more and more people rallying and coming together to support the culture change. With some momentum built it was great to bring shared experiences to the team as we all spoke in the same language talking about SLOs, SLIs, and about how we measure things. &lt;/p&gt;&lt;p&gt;Some of the ways in which we built our community was by hosting monthly brown bag sessions. This is an informal gathering where teams come in and share their experiences and challenges, or teach on specific SRE topics such as SLOs or toil. We also created a &lt;a href="https://gdg.community.dev/gdg-cloud-southlake/" target="_blank"&gt;public Google Developer Group (GDG)&lt;/a&gt; and have hosted several Google SRE subject matter experts to speak on SRE principles and best practices. &lt;/p&gt;&lt;h3&gt;2. Get your mid level leadership stakeholders on board&lt;/h3&gt;&lt;p&gt;We know how important &lt;a href="https://cloud.google.com/blog/products/devops-sre/sre-success-starts-with-getting-leadership-on-board"&gt;getting leadership buy in&lt;/a&gt; is to creating a successful SRE movement within an organization. That top-level buy-in is highly important to get resources and drive transformation across the organization, but what is sometimes missed is making it a priority to get mid-level leadership on board as well. It’s difficult to enact change from the ground up starting with practitioners at the bottom, and it’s also difficult to just have leadership buy in, as once it gets down to the middle, things may fall apart. It is imperative to have mid-level leaders on board as well, as they directly affect the culture and decisions of their teams. To avoid resistance, it is also important that the mid-level leadership (product, operations and engineering managers), i.e. people managers, will understand the motivations behind change so they will be onboard. Without that understanding, it will hinder mid-level leadership’s ability to communicate changes to the practitioners level and can impact the teams' goal and allocated bandwidth.&lt;/p&gt;&lt;h3&gt;3. Don’t be afraid to get help from professionals&lt;/h3&gt;&lt;p&gt;Adopting SRE at a large organization is no simple feat. Partnering with &lt;a href="https://services.google.com/fh/files/misc/pso_sre_google_cloud.pdf" target="_blank"&gt;Google’s SRE consulting experts&lt;/a&gt; has brought about a huge shift at Sabre. The value PSO brings is not just training, it's also listening. We’ve had experienced Googlers who understand our problems and have been at our stage in the SRE journey listen, analyze and tailor the approach specific to our team's goals. PSO helped us by shifting our engineering teams to be more customer centric, and aligning our product, operations, and development teams. But most importantly, they’ve helped to make our current teams happier, because they're not spinning their wheels, waiting around on blocked requests.&lt;/p&gt;&lt;p&gt;When we partnered with PSO we were aware of who the key stakeholders in our organization are: the mid-level leadership and people managers. We made sure to bring them into our PSO discussions and decision making sessions and as a result, helped us to get more traction and solve the gap we had, enabling the middle-level and bringing them on board.&lt;/p&gt;&lt;p&gt;Some of the actions we have taken with help from our PSO SRE partners include adding a &lt;a href="https://cloud.google.com/blog/products/devops-sre/how-sre-teams-are-organized-and-how-to-get-started"&gt;tiers of service&lt;/a&gt; approach, improving incident management through &lt;a href="https://cloud.google.com/blog/products/management-tools/shrinking-the-time-to-mitigate-production-incidents"&gt;wheels of misfortune (WoM)&lt;/a&gt;, defining &lt;a href="https://cloud.google.com/blog/products/management-tools/practical-guide-to-setting-slos"&gt;critical user journeys (CUJs)&lt;/a&gt;, and implementing &lt;a href="https://cloud.google.com/blog/products/management-tools/sre-error-budgets-and-maintenance-windows"&gt;error budgets&lt;/a&gt;. &lt;/p&gt;&lt;p&gt;Since putting these SRE practices into place, our business is more aligned to customer experience. We now invest org resources according to the needs of our customers and with that have reduced silos across our teams. Our Ops team is much happier since they can move faster and not have to block requests. SRE has taught us a common language, a common framework. Moreover, it gives this whole discipline a culture and meaning.&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-related_article_tout"&gt;





&lt;div class="uni-related-article-tout h-c-page"&gt;
  &lt;section class="h-c-grid"&gt;
    &lt;a href="https://cloud.google.com/blog/products/devops-sre/four-steps-to-jumpstarting-your-sre-practice/"
       data-analytics='{
                       "event": "page interaction",
                       "category": "article lead",
                       "action": "related article - inline",
                       "label": "article: {slug}"
                     }'
       class="uni-related-article-tout__wrapper h-c-grid__col h-c-grid__col--8 h-c-grid__col-m--6 h-c-grid__col-l--6
        h-c-grid__col--offset-2 h-c-grid__col-m--offset-3 h-c-grid__col-l--offset-3 uni-click-tracker"&gt;
      &lt;div class="uni-related-article-tout__inner-wrapper"&gt;
        &lt;p class="uni-related-article-tout__eyebrow h-c-eyebrow"&gt;Related Article&lt;/p&gt;

        &lt;div class="uni-related-article-tout__content-wrapper"&gt;
          &lt;div class="uni-related-article-tout__image-wrapper"&gt;
            &lt;div class="uni-related-article-tout__image" style="background-image: url('')"&gt;&lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="uni-related-article-tout__content"&gt;
            &lt;h4 class="uni-related-article-tout__header h-has-bottom-margin"&gt;Four steps to jumpstarting your SRE practice&lt;/h4&gt;
            &lt;p class="uni-related-article-tout__body"&gt;Once you have leadership buy-in, there are some things you can do to get the SRE ball rolling, fast.&lt;/p&gt;
            &lt;div class="cta module-cta h-c-copy  uni-related-article-tout__cta muted"&gt;
              &lt;span class="nowrap"&gt;Read Article
                &lt;svg class="icon h-c-icon" role="presentation"&gt;
                  &lt;use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#mi-arrow-forward"&gt;&lt;/use&gt;
                &lt;/svg&gt;
              &lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;/section&gt;
&lt;/div&gt;

&lt;/div&gt;</description><pubDate>Mon, 22 Nov 2021 17:00:00 +0000</pubDate><guid>https://cloud.google.com/blog/products/devops-sre/sabre-leverages-google-cloud-and-site-reliability-engineering/</guid><category>Cloud Operations</category><category>Customers</category><category>DevOps &amp; SRE</category><og xmlns:og="http://ogp.me/ns#"><type>article</type><title>How Sabre is using SRE to lead a successful digital transformation</title><description></description><site_name>Google</site_name><url>https://cloud.google.com/blog/products/devops-sre/sabre-leverages-google-cloud-and-site-reliability-engineering/</url></og><author xmlns:author="http://www.w3.org/2005/Atom"><name>Kenny Kon</name><title>SRE Director at Sabre</title><department></department><company></company></author></item><item><title>Get planet-scale monitoring with Managed Service for Prometheus</title><link>https://cloud.google.com/blog/products/operations/introducing-google-cloud-managed-service-for-prometheus/</link><description>&lt;div class="block-paragraph"&gt;&lt;p&gt;&lt;i&gt;&lt;b&gt;Editor’s note, &lt;/b&gt;&lt;/i&gt;&lt;i&gt;&lt;b&gt;March 01, 2022:&lt;/b&gt; &lt;/i&gt;&lt;i&gt;We are pleased to announce that Managed Service for Prometheus has now reached General Availability! For more information, see our &lt;a href="https://cloud.google.com/blog/products/devops-sre/easy-managed-prometheus-metrics-service-for-kubernetes"&gt;announcement blog&lt;/a&gt; or visit the &lt;a href="https://cloud.google.com/managed-prometheus"&gt;website&lt;/a&gt;.&lt;/i&gt;&lt;/p&gt;&lt;hr/&gt;&lt;p&gt;&lt;a href="http://prometheus.io" target="_blank"&gt;Prometheus&lt;/a&gt;, the de facto standard for Kubernetes monitoring, works well for many basic deployments, but managing Prometheus infrastructure can become challenging at scale. As Kubernetes deployments continue to play a &lt;a href="https://cloud.google.com/blog/products/containers-kubernetes/building-the-future-with-google-kubernetes-engine"&gt;bigger role&lt;/a&gt; in enterprise IT, scaling Prometheus for a large number of metrics across a global footprint has become a pressing need for many organizations. Today, we’re excited to announce the public preview of &lt;a href="http://cloud.google.com/managed-prometheus"&gt;Google Cloud Managed Service for Prometheus&lt;/a&gt;, a new monitoring offering designed for scale and ease of use that maintains compatibility with the open-source Prometheus ecosystem. &lt;/p&gt;&lt;p&gt;With Google Cloud Managed Service for Prometheus, you have an alternative to taking on the toil of self-managing a Prometheus or &lt;a href="http://thanos.io" target="_blank"&gt;Thanos&lt;/a&gt; stack in perpetuity. Instead, you can get global and globally scalable monitoring with Prometheus interfaces, letting you keep open-source ecosystem compatibility and portability.&lt;/p&gt;&lt;h3&gt;Details about Google Cloud Managed Service for Prometheus, currently in preview&lt;/h3&gt;&lt;p&gt;Managed Service for Prometheus is Google Cloud's fully managed collection, storage, and query service for Prometheus metrics. It is built on top of Monarch, the same &lt;a href="https://research.google/pubs/pub50652/" target="_blank"&gt;globally scalable data store&lt;/a&gt; that powers all application monitoring at Google. Managed Service for Prometheus lets you monitor and alert on your Kubernetes deployments using Prometheus without having to manually manage and operate Prometheus infrastructure at scale. The service is built as a drop-in replacement for Prometheus and eliminates the need for self-managed solutions like Thanos or Cortex.&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/images/Google_Cloud_Managed_Service_for_Prometheu.max-1000x1000.jpg"
        
          alt="Google Cloud Managed Service for Prometheus.jpg"&gt;
        
        &lt;/a&gt;
      
        &lt;figcaption class="article-image__caption "&gt;&lt;i&gt;Google Cloud Managed Service for Prometheus is built on Monarch, which powers all application monitoring at Google&lt;/i&gt;&lt;/figcaption&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;h3&gt;An easy to use service with open source interfaces&lt;/h3&gt;&lt;p&gt;As a drop-in replacement for Prometheus, Managed Service for Prometheus was designed to have easy onboarding by letting you reuse your existing Prometheus configs. You can also opt to deploy managed collectors for even greater simplicity. It has hybrid- and multi-cloud compatibility, meaning you can monitor any environment where Prometheus can run.&lt;/p&gt;&lt;p&gt;Looking beyond data collection, you can keep your existing dashboards in Grafana and PromQL-based rules and alerts without modifying any queries. This means you maintain portability with open source-compatible interfaces that proprietary managed solutions usually do not support.&lt;/p&gt;&lt;p&gt;Managed Service for Prometheus is built on the same global and globally scalable backend that Google uses for its own metrics. Collecting over 2 trillion active time series holding 65 quadrillion points, the service can support practically any metric volume that your business produces. The system supports ad-hoc global aggregations at query time over regionally-stored raw metric data. Plus, you get 2-year data retention by default, at no extra cost. &lt;/p&gt;&lt;p&gt;Being on the same backend as the rest of Google Cloud’s monitoring services means Managed Service for Prometheus is compatible with Cloud Monitoring. In fact, &lt;a href="https://cloud.google.com/monitoring/api/metrics_gcp?hl=en"&gt;free Google Cloud platform metrics&lt;/a&gt; can be queried alongside your Managed Service for Prometheus metrics within Cloud Monitoring.&lt;/p&gt;&lt;h3&gt;Customers already seeing success in preview&lt;/h3&gt;&lt;p&gt;When we first announced the preview at Next 2021, &lt;a href="https://youtu.be/7m3CzLULM-8?t=578" target="_blank"&gt;we were joined&lt;/a&gt; by Bartosz Jakubski from OpenX, who described how Managed Service for Prometheus was supporting the growth of their business by offloading the management of Prometheus and Thanos. &lt;/p&gt;&lt;p&gt;Horizon Blockchain Games is another customer that is previewing the service, and they’re already seeing benefits. "We have been running Prometheus ourselves for GKE metrics, but the ongoing maintenance took up too many development hours and we did not want to deal with scaling our metrics infrastructure with our growing business,” said Peter Kieltyka, CEO and Chief Architect. “We started using Google Cloud Managed Service for Prometheus and it just works. It can handle whatever volume we have because it's built on the same backend that Google uses itself, and we get to keep using the same Grafana dashboards as before while keeping open standards and protocols."&lt;/p&gt;&lt;h3&gt;How to get started&lt;/h3&gt;&lt;p&gt;Configuring ingestion for Managed Service for Prometheus is straightforward. Just swap out your existing Prometheus binaries with the Managed Service for Prometheus binary, and set up a new data source so you can configure Grafana to read your metrics. See Managed Service for Prometheus &lt;a href="https://cloud.google.com/stackdriver/docs/managed-prometheus"&gt;documentation&lt;/a&gt; to get started.&lt;/p&gt;&lt;/div&gt;</description><pubDate>Mon, 15 Nov 2021 17:00:00 +0000</pubDate><guid>https://cloud.google.com/blog/products/operations/introducing-google-cloud-managed-service-for-prometheus/</guid><category>Containers &amp; Kubernetes</category><category>Open Source</category><category>Google Cloud</category><category>DevOps &amp; SRE</category><category>Cloud Operations</category><media:content height="540" url="https://storage.googleapis.com/gweb-cloudblog-publish/images/Prometheus.max-600x600.jpg" width="540"></media:content><og xmlns:og="http://ogp.me/ns#"><type>article</type><title>Get planet-scale monitoring with Managed Service for Prometheus</title><description></description><image>https://storage.googleapis.com/gweb-cloudblog-publish/images/Prometheus.max-600x600.jpg</image><site_name>Google</site_name><url>https://cloud.google.com/blog/products/operations/introducing-google-cloud-managed-service-for-prometheus/</url></og><author xmlns:author="http://www.w3.org/2005/Atom"><name>Lee Yanco</name><title>Senior Product Manager</title><department></department><company></company></author></item><item><title>Enabling SRE best practices: new contextual traces in Cloud Logging</title><link>https://cloud.google.com/blog/products/operations/faster-debugging-with-traces-and-logs-together/</link><description>&lt;div class="block-paragraph"&gt;&lt;p&gt;The need for relevant and contextual telemetry data to support online services has grown in the last decade as businesses undergo digital transformation. These data are typically the difference between proactively remediating application performance issues or &lt;a href="https://cloud.google.com/blog/products/application-development/show-me-the-money-how-you-can-see-returns-up-to-259m-with-a-devops-transformation"&gt;costly service downtime&lt;/a&gt;. Distributed tracing is a key capability for improving application performance and reliability, as noted in &lt;a href="https://sre.google/" target="_blank"&gt;SRE best practices&lt;/a&gt;. Today, we’re making it easier for you to understand what is happening within your applications by making trace information available directly in &lt;a href="http://cloud.google.com/logging"&gt;Cloud Logging&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Tracing provides critical insight into the overall performance of applications running in a distributed architecture by stitching together relevant information about events from the propagated request’s point of view.  These events are referred to as spans, and they are the building blocks for trace objects. &lt;/p&gt;&lt;h3&gt;Faster insights and correlations with logs and traces&lt;/h3&gt;&lt;p&gt;Distributed tracing offers the unique ability to reduce Mean Time To Repair (MTTR) by correlating log information with the sources latency in a distributed system. This capability is especially critical when users have workloads running in, or interacting with, distributed compute environments like Google Kubernetes Engine (GKE). &lt;/p&gt;&lt;p&gt;When your applications are instrumented to generate &lt;a href="https://cloud.google.com/logging/docs/structured-logging?hl=hr"&gt;structured log outputs&lt;/a&gt; especially with &lt;a href="https://cloud.google.com/logging/docs/reference/libraries#using_the_client_library"&gt;Google Cloud Logging libraries&lt;/a&gt; and &lt;a href="https://cloud.google.com/learn/what-is-opentelemetry"&gt;OpenTelemetry&lt;/a&gt; to generate &lt;a href="https://cloud.google.com/trace/docs/setup#recommended_client_libraries"&gt;traces&lt;/a&gt;, trace facets will automatically appear on log lines within Cloud Logging. This makes it easy for you to quickly understand causally related events.&lt;/p&gt;&lt;p&gt;To illustrate this capability, consider the simplicity of troubleshooting the situation below. This is a Cloud Run instance making search invocations to a GKE cluster and then to a database layer managed by Cloud SQL. The application performing the invocation in Cloud Run is deployed using Go and the middle tier in GKE is deployed using Python (Flask).&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        &lt;a href="https://storage.googleapis.com/gweb-cloudblog-publish/images/1_Cloud_Logging.max-2800x2800.jpg" rel="external" target="_blank"&gt;
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/images/1_Cloud_Logging.max-1000x1000.jpg"
        
          alt="1 Cloud Logging.jpg"&gt;
        
        &lt;/a&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;p&gt;In this example, a member of the support staff observes a notification in the activity log of their Google Cloud console, that their microservices-based application has slowed down considerably. One typical way of troubleshooting this is to dig through all the solutions logs for that timeframe to find the root cause. However, if the operations team has instrumented all workloads to generate traces, the application owners can use that information to narrow down which service is the source of the issue. After identifying the lagging service, they can follow up with the service owners to troubleshoot, drastically reducing MTTR.&lt;/p&gt;&lt;p&gt;The video capture below showcases the integration of trace information in the Logs Explorer of the Cloud Logging product:&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/original_images/2_Cloud_Logging.gif"
        
          alt="2 Cloud Logging.gif"&gt;
        
        &lt;/a&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;h3&gt;How traces are generated in Google Cloud services&lt;/h3&gt;&lt;p&gt;To create the trace in the sample above, the Cloud Trace backend stitched together all the spans that were generated as the request propagated through the different Google Cloud services (Cloud Run, GKE and Cloud SQL). Then it surfaced that data into the Logs Explorer in Cloud Logging. A summary of how spans were created in each service is below: &lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;Cloud Run: the generated spans are an out-of-the-box (OOTB) feature and are representative of the ingress and egress out of the preceding load balancers and Cloud Run compute instances. &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;GKE pods: the Python Flask application generates spans as a result of the developer implementing the OpenTelemetry Flask Instrumentor into their application.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Cloud SQL: spans are generated automatically for its query execution time when the SQL statements are augmented with &lt;a href="https://cloud.google.com/blog/topics/developers-practitioners/introducing-sqlcommenter-open-source-orm-auto-instrumentation-library"&gt;Sqlcommenter&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;A sample of the resulting trace hierarchy embedded in the log line is shown below.&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        &lt;a href="https://storage.googleapis.com/gweb-cloudblog-publish/images/3_Cloud_Logging.max-2800x2800.jpg" rel="external" target="_blank"&gt;
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/images/3_Cloud_Logging.max-1000x1000.jpg"
        
          alt="3 Cloud Logging.jpg"&gt;
        
        &lt;/a&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;h3&gt;Get started today&lt;/h3&gt;&lt;p&gt;To view traces in Cloud Logging, you need to first instrument your applications running on Google Cloud to generate &lt;a href="https://cloud.google.com/logging/docs/structured-logging?hl=hr"&gt;structured log outputs&lt;/a&gt; and &lt;a href="https://cloud.google.com/trace/docs/setup#recommended_client_libraries"&gt;traces&lt;/a&gt;. GKE will automatically capture logs written to stdout and stderr or you can use our &lt;a href="https://cloud.google.com/logging/docs/reference/libraries#using_the_client_library"&gt;Google Cloud Logging libraries&lt;/a&gt; to use the Cloud Logging API. To capture traces, we recommend instrumenting your applications with &lt;a href="https://cloud.google.com/learn/what-is-opentelemetry"&gt;OpenTelemetry&lt;/a&gt;. Check out this &lt;a href="https://codelabs.developers.google.com/codelabs/otel-cloudtrace#0" target="_blank"&gt;codelab&lt;/a&gt; to experience instrumenting an application with OpenTelemetry and sending the traces to Cloud Trace.&lt;/p&gt;&lt;p&gt;If you have questions or want to provide feedback, please visit our &lt;a href="https://www.googlecloudcommunity.com/gc/Google-Cloud-s-operations-suite/bd-p/cloud-operations" target="_blank"&gt;Google Cloud Community page&lt;/a&gt; and leave a comment.&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-related_article_tout"&gt;





&lt;div class="uni-related-article-tout h-c-page"&gt;
  &lt;section class="h-c-grid"&gt;
    &lt;a href="https://cloud.google.com/blog/products/operations/opentelemetry-specification-enables-standardized-tracing/"
       data-analytics='{
                       "event": "page interaction",
                       "category": "article lead",
                       "action": "related article - inline",
                       "label": "article: {slug}"
                     }'
       class="uni-related-article-tout__wrapper h-c-grid__col h-c-grid__col--8 h-c-grid__col-m--6 h-c-grid__col-l--6
        h-c-grid__col--offset-2 h-c-grid__col-m--offset-3 h-c-grid__col-l--offset-3 uni-click-tracker"&gt;
      &lt;div class="uni-related-article-tout__inner-wrapper"&gt;
        &lt;p class="uni-related-article-tout__eyebrow h-c-eyebrow"&gt;Related Article&lt;/p&gt;

        &lt;div class="uni-related-article-tout__content-wrapper"&gt;
          &lt;div class="uni-related-article-tout__image-wrapper"&gt;
            &lt;div class="uni-related-article-tout__image" style="background-image: url('https://storage.googleapis.com/gweb-cloudblog-publish/images/opentelemetry.max-500x500.jpg')"&gt;&lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="uni-related-article-tout__content"&gt;
            &lt;h4 class="uni-related-article-tout__header h-has-bottom-margin"&gt;OpenTelemetry Trace 1.0 is now available&lt;/h4&gt;
            &lt;p class="uni-related-article-tout__body"&gt;Google Cloud continues to invest in OpenTelemetry with many of our partners to provide standardized metrics, logs and traces for our users.&lt;/p&gt;
            &lt;div class="cta module-cta h-c-copy  uni-related-article-tout__cta muted"&gt;
              &lt;span class="nowrap"&gt;Read Article
                &lt;svg class="icon h-c-icon" role="presentation"&gt;
                  &lt;use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#mi-arrow-forward"&gt;&lt;/use&gt;
                &lt;/svg&gt;
              &lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;/section&gt;
&lt;/div&gt;

&lt;/div&gt;</description><pubDate>Wed, 10 Nov 2021 17:00:00 +0000</pubDate><guid>https://cloud.google.com/blog/products/operations/faster-debugging-with-traces-and-logs-together/</guid><category>Containers &amp; Kubernetes</category><category>DevOps &amp; SRE</category><category>Cloud Operations</category><og xmlns:og="http://ogp.me/ns#"><type>article</type><title>Enabling SRE best practices: new contextual traces in Cloud Logging</title><description></description><site_name>Google</site_name><url>https://cloud.google.com/blog/products/operations/faster-debugging-with-traces-and-logs-together/</url></og><author xmlns:author="http://www.w3.org/2005/Atom"><name>Eyamba Ita</name><title>Product Manager</title><department></department><company></company></author><author xmlns:author="http://www.w3.org/2005/Atom"><name>Yoshi Yamaguchi</name><title>Developer Advocate, Cloud Developer Relations</title><department></department><company></company></author></item><item><title>Google Cloud Monitoring 101: Understanding metric types</title><link>https://cloud.google.com/blog/products/operations/in-depth-explanation-of-operational-metrics-at-google-cloud/</link><description>&lt;div class="block-paragraph"&gt;&lt;p&gt;Whether you are moving your applications to the cloud or modernizing them using Kubernetes, observing cloud-based workloads is more challenging than observing traditional deployments.  When monitoring on-prem monoliths, operations teams had full visibility over the entire stack and full control over how/what telemetry data is collected (from infrastructure to platform to application data). In cloud-based applications, aggregating, integrating, and analyzing telemetry for full visibility is more complex because:   &lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;Data originates from more sources: in addition to telemetry data from your application/workload components, there is a need to integrate telemetry data from the cloud infrastructure (VM, Load balancers etc.), cloud platform (Kubernetes, docker etc.), and cloud services (storage, databases etc.). &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Systems have different levels of visibility: the variety of sources from which telemetry data is collected provides different mechanisms for data collection. Some expose this data through APIs, others require users to install agents. While some services push data to an endpoint, others require users to pull data from an endpoint.  &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;The granularity of data collection, retention, and aggregation can differ: for some sources, data can be collected with fine granularity (seconds) while other sources still only expose data at coarser granularity (minutes). Some telemetry data is retained for short periods of time (days) while other data is retained for much longer periods (years).&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;In addition to these technical dimensions, the cost of running an observability solution can be a concern. Given that you have control over only some of the metric data you can collect, you may ask yourself: “What telemetry data do I have to pay for and what telemetry data is available at no cost as a part of the service I am using?” &lt;/p&gt;&lt;p&gt;While observability encompasses different signals, including metrics, events, traces, and logs, this blog focuses on collecting metrics in Google Cloud. This blog will describe three aspects of metric collection in Google Cloud:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;The variety of types of metrics that are collected.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;How different types of metrics are collected.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Which metrics are chargeable and which are non-chargeable.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;We will explore these aspects through three offerings: Google Compute Engine (GCE), Google Kubernetes Engine (GKE) and Google BigQuery (BQ). These three examples represent the different levels of control users have on the level of visibility into Google Cloud Services.  &lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;GCE: almost full control over deploying agents to collect metrics &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;GKE: some control over deploying agents to collect metrics&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;BQ: no control over deploying agents to collect metrics&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3&gt;Types of Metrics&lt;/h3&gt;&lt;p&gt;There are many types of metrics collected across these three classes of services, but they can be broadly grouped into four categories: System metrics, Agent metrics, User-defined metrics and Logs-based metrics.&lt;/p&gt;&lt;p&gt;&lt;b&gt;1. System metrics:&lt;br/&gt;&lt;/b&gt;System metrics are instrumented and collected by Google Cloud to provide visibility into how platform-managed services are behaving. You do not need to deploy an agent to collect them, and they are automatically sent to Google Cloud Monitoring.&lt;/p&gt;&lt;p&gt;Depending on the usage context, these metrics may be referred to by different names, but broadly speaking they are all grouped into System Metrics. System Metrics are also commonly called &lt;a href="https://cloud.google.com/monitoring/api/metrics_gcp"&gt;Google Cloud Metrics&lt;/a&gt;, GCP Metrics, “built-in” metrics, system-defined metrics, platform metrics, or Infrastructure metrics. Different service types may also refer to them with different terms:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;Infrastructure as a service (IaaS) users may refer to them as infrastructure metrics. &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Platform as a service (PaaS)/containers as a service (CaaS) users may refer to them as platform metrics. &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Software as a service (SaaS) users may refer to them as service metrics. &lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Regardless of the usage context, they are all “built-in metrics.” When the usage context is for a specific Google Cloud service, sometimes you also see them referred to as:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;Kubernetes metrics&lt;/b&gt;: collected from GKE. Older versions of GKE called them container metrics. Metric names of this type are prefixed with kubernetes.io. These are resource metrics for containers, pods, and nodes in your Kubernetes cluster. &lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;Anthos metrics&lt;/b&gt;: collected from Anthos on-prem and Anthos on bare metal. Metrics of this type are prefixed with kubernetes.io/anthos.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;Istio metrics&lt;/b&gt;: collected from Istio on Google Kubernetes Engine. Metrics of this type are prefixed with istio.io. &lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;Knative metrics&lt;/b&gt;: collected from Knative on Google Kubernetes Engine. Metrics of this type are prefixed with knative.dev.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;b&gt;2. Agent metrics: &lt;br/&gt;&lt;/b&gt;Agent metrics refer to a broad set of metric types. As the name suggests, Agent Metrics require you to install an agent (either the Cloud Monitoring agent or the unified &lt;a href="https://cloud.google.com/stackdriver/docs/solutions/agents/ops-agent"&gt;Ops Agent&lt;/a&gt;) for metric collection. Agent-based metrics do not require application developers to instrument metrics and are available as pre-packaged receivers/collectors that need to be configured in the agent. User-installed agents collect metrics of the following types:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;Resource metrics&lt;/b&gt;: metrics about any resource, including compute, network, or storage for a virtual machine (VM). These resources could be Google Cloud managed (like a GCE VM), customer managed (e.g an on-prem host) or a resource on a different cloud (AWS VM).&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;Process metrics&lt;/b&gt;: resource metrics provide high level visibility, at the VM-level, for example. Process metrics are fine grained and include measurements such as CPU, memory, I/O, number of threads, and more for specific processes (like a data backup process) running in VMs.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;Third-party metrics&lt;/b&gt;: metrics about any third-party or open source software running in a VM (GCE or somewhere else) or a container (Nginx, Kafka, MySQL etc.) These metrics provide purpose-built visibility into the internal operations of these software components.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;b&gt;Note&lt;/b&gt;: the Ops Agent can also collect metrics about itself, prefixed by &lt;b&gt;&lt;i&gt;agent.googleapis.com/agent&lt;/i&gt;&lt;/b&gt;. Metrics collected by the agent about other software components are prefixed by &lt;b&gt;&lt;i&gt;agent.googleapis.com/&amp;lt;name of component&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;3. User-defined metrics: &lt;br/&gt;&lt;/b&gt;User-defined metrics provide visibility into your deployed applications or workloads and are defined and instrumented by you. User-defined metrics can include:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;Custom metrics&lt;/b&gt;: custom metrics can be ingested either by using the client libraries, the Cloud Monitoring API, or by deploying the Ops Agent to collect metrics and then ingest them into Cloud Monitoring. They are identified with the prefix custom.googleapis.com. &lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;Workload metrics&lt;/b&gt;: workload metrics encompass a wide range of data produced by applications running on your resources. Whether these applications are monoliths, containers, or data processing ETL jobs, you have to instrument your code to generate metrics specifically relevant to the task at hand. These metrics capture something about the resources the workload is using (e.g. memory consumption by application objects, or the number of data records processed by a SPARC job) or possibly some business metrics (number of users placing orders or total dollar volume processed). Workload metric names are identified with the prefix workload.googleapis.com. Again, depending on the context, workload metrics may also be referred to as “Application metrics” or “Job metrics.” &lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;External metrics&lt;/b&gt;: collected from open source or third party applications. Metrics sent to Google Cloud projects with a metric type beginning with external.googleapis.com are known as external metrics. &lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;Prometheus metrics&lt;/b&gt;: some Kubernetes users use Prometheus to monitor their Kubernetes environments. In addition, they propagate Prometheus metrics to Google Cloud Monitoring to take advantage of its rich capabilities. You can configure Prometheus with Cloud Monitoring. In that case metrics exported by Prometheus are converted to Cloud Monitoring metric types.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;b&gt;4. Logs-based metrics: &lt;br/&gt;&lt;/b&gt;Logs-based metrics are generated from logs ingested into Cloud Logging. These metrics can be created either by counting log events that match a certain pattern or by extracting and aggregating the fields in specific log events. Logs-based metrics are then written to Cloud Monitoring and can be used for alerting, charting, and dashboarding. Logs-based metrics can be of two types: user-defined (where the definition is created by you) and system-defined (where the definition is available out of the box and you cannot modify them).&lt;/p&gt;&lt;h3&gt;Metric Collection&lt;/h3&gt;&lt;p&gt;Metrics are collected from Google services and your applications running on Google services in several different ways. Let’s take a look at the different collection mechanisms without going into each specific metric. &lt;/p&gt;&lt;p&gt;&lt;b&gt;1. Collecting metrics from GCE:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;GCE metrics are collected using two different mechanisms:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;As mentioned earlier, system metrics (or infrastructure metrics) for GCE do not require you to install any metric collection agents. Google automatically collects and pushes these metrics to your project (See Figure 1). System metrics are generally batched before ingestion into Cloud Monitoring.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;The second mechanism for collecting GCE metrics is to install the Ops Agent or legacy Monitoring agent. Installing the agent gives you specific advantages in two areas:&lt;/p&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Collect system metrics with much finer granularity (less than 1 minute) or access to process metrics for individual Linux or Windows processes.&lt;/li&gt;&lt;li&gt;As your developers deploy their applications in GCE VMs, they can also generate application metrics. The agent collects and loads metrics into your projects almost instantly for faster analysis, alerting and dashboarding.&lt;/li&gt;&lt;/ul&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        &lt;a href="https://storage.googleapis.com/gweb-cloudblog-publish/images/1_GCE_Matric_data_collection.max-2800x2800.jpg" rel="external" target="_blank"&gt;
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/images/1_GCE_Matric_data_collection.max-1000x1000.jpg"
        
          alt="1 GCE Matric data collection.jpg"&gt;
        
        &lt;/a&gt;
      
        &lt;figcaption class="article-image__caption "&gt;&lt;i&gt;Figure 1&lt;/i&gt;&lt;/figcaption&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;p&gt;&lt;b&gt;2. Collecting metrics from GKE (without Prometheus):&lt;br/&gt;&lt;/b&gt;GKE metrics are also collected using two different mechanisms when you are not using Prometheus. The metric collection scenario is a bit complex because a GKE cluster has some nodes that are user managed and others, like the control plane nodes, that are Google managed. Much like the GCE environment, system metrics are collected without deploying an agent.&lt;/p&gt;&lt;p&gt;For GKE nodes that are customer managed, metrics can be collected for different resources and workloads. For the GCE VM (underlying the Kubernetes nodes), system metrics are captured by Google collectors and sent to your Cloud project. For collecting platform metrics, Google collectors are automatically deployed in the GKE customer managed nodes when the Kubernetes cluster is created. These collectors gather Kubernetes metrics via the Kubelet and publish them to your project.&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        &lt;a href="https://storage.googleapis.com/gweb-cloudblog-publish/images/2_GKE_metric_data_collection.max-2800x2800.jpg" rel="external" target="_blank"&gt;
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/images/2_GKE_metric_data_collection.max-1000x1000.jpg"
        
          alt="2 GKE metric data collection.jpg"&gt;
        
        &lt;/a&gt;
      
        &lt;figcaption class="article-image__caption "&gt;&lt;i&gt;Figure 2&lt;/i&gt;&lt;/figcaption&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;p&gt;For the GKE control plane, the nodes are Google managed and metrics from these nodes are not published to Cloud Monitoring. However, these metrics are collected automatically and used for scaling and resource management decisions by the Kubernetes scheduler. Again, for collecting these metrics, the user does not need to deploy any agent software. These Google collectors are deployed and managed by Google when the clusters are created.&lt;/p&gt;&lt;p&gt;Lastly, your developers can collect Prometheus-compatible metrics emitted from workloads, such as CronJobs or Deployments, on GKE clusters using a &lt;a href="https://cloud.google.com/blog/products/operations/managed-metric-collection-for-google-kubernetes-engine"&gt;fully managed, configurable pipeline&lt;/a&gt; from Cloud Monitoring. Your developers configure which metrics to collect, and GKE does everything else.  &lt;/p&gt;&lt;p&gt;&lt;b&gt;3. Collecting metrics from GKE (with Prometheus):&lt;br/&gt;&lt;/b&gt;Prometheus is a popular choice for monitoring Kubernetes environments. Customers deploying their applications in GKE can continue to use Prometheus for monitoring. Metrics generated by services using the Prometheus exposition format can be exported from the cluster and made visible in Cloud Monitoring.&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        &lt;a href="https://storage.googleapis.com/gweb-cloudblog-publish/images/3_GKE_metra_data_collection.max-2800x2800.jpg" rel="external" target="_blank"&gt;
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/images/3_GKE_metra_data_collection.max-1000x1000.jpg"
        
          alt="3 GKE metra data collection.jpg"&gt;
        
        &lt;/a&gt;
      
        &lt;figcaption class="article-image__caption "&gt;&lt;i&gt;Figure 3&lt;/i&gt;&lt;/figcaption&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;p&gt;Collecting metrics from the control plane nodes in this use case is quite similar to the non-Prometheus use case. However, metric collection from the worker nodes is different. Prometheus is deployed on one of the Kubernetes worker nodes (Figure 3) and scrapes metrics from the pods and through the Kubelet API. An adapter collects the metrics from Prometheus and uploads them to Cloud Monitoring.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;h3&gt;Chargeable and nonchargeable metrics&lt;/h3&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Operations teams are always concerned about IT costs and need general clarity on what is chargeable and what is not chargeable in their monitoring, logging, diagnostics, and troubleshooting tools. Visit the Google Cloud’s operations suite &lt;a href="https://cloud.google.com/stackdriver/pricing"&gt;pricing page&lt;/a&gt; for definitive and current guidance on what is chargeable and what is non chargeable, setting consumption alert thresholds and more. Of the four broad categories of metrics mentioned above, system metrics are non-chargeable. All other categories of metrics are chargeable. There are two exceptions to the above general statement. While Agent collected metrics are chargeable, metrics about the agent itself (in the &lt;b&gt;&lt;i&gt;agent.googleapis.com/agent&lt;/i&gt;&lt;/b&gt; namespace) are not chargeable. Similarly, while logs-based metrics are chargeable, system-defined logs-based metrics are not chargeable.&lt;/p&gt;&lt;p&gt;Always refer to the &lt;a href="https://cloud.google.com/stackdriver/pricing"&gt;pricing page&lt;/a&gt; for more details and latest updates.&lt;/p&gt;&lt;h3&gt;Summary&lt;/h3&gt;&lt;p&gt;Observability of cloud-based services and workloads requires an understanding of a diverse set of metrics that need to be collected and analyzed. These metrics are categorized into system metrics, agent metrics, user defined metrics, and logs-based metrics. This blog discussed metric types, the general architectures used for collecting these metrics and a brief summary on which of these metrics are chargeable metrics and which metrics are non chargeable metrics when using Google Cloud Monitoring.&lt;/p&gt;&lt;p&gt;If you have questions or feedback, please share it in the &lt;a href="https://www.googlecloudcommunity.com/gc/Google-Cloud-s-operations-suite/bd-p/cloud-operations" target="_blank"&gt;operations suite section&lt;/a&gt; of the Google Cloud Community.&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-related_article_tout"&gt;





&lt;div class="uni-related-article-tout h-c-page"&gt;
  &lt;section class="h-c-grid"&gt;
    &lt;a href="https://cloud.google.com/blog/products/operations/troubleshoot-gke-faster-with-monitoring-data-in-your-logs/"
       data-analytics='{
                       "event": "page interaction",
                       "category": "article lead",
                       "action": "related article - inline",
                       "label": "article: {slug}"
                     }'
       class="uni-related-article-tout__wrapper h-c-grid__col h-c-grid__col--8 h-c-grid__col-m--6 h-c-grid__col-l--6
        h-c-grid__col--offset-2 h-c-grid__col-m--offset-3 h-c-grid__col-l--offset-3 uni-click-tracker"&gt;
      &lt;div class="uni-related-article-tout__inner-wrapper"&gt;
        &lt;p class="uni-related-article-tout__eyebrow h-c-eyebrow"&gt;Related Article&lt;/p&gt;

        &lt;div class="uni-related-article-tout__content-wrapper"&gt;
          &lt;div class="uni-related-article-tout__image-wrapper"&gt;
            &lt;div class="uni-related-article-tout__image" style="background-image: url('')"&gt;&lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="uni-related-article-tout__content"&gt;
            &lt;h4 class="uni-related-article-tout__header h-has-bottom-margin"&gt;Troubleshoot GKE apps faster with monitoring data in Cloud Logging&lt;/h4&gt;
            &lt;p class="uni-related-article-tout__body"&gt;View contextual Monitoring data in your GKE log lines. Easily see the relevant pod, node and cluster events and metrics for your pod.&lt;/p&gt;
            &lt;div class="cta module-cta h-c-copy  uni-related-article-tout__cta muted"&gt;
              &lt;span class="nowrap"&gt;Read Article
                &lt;svg class="icon h-c-icon" role="presentation"&gt;
                  &lt;use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#mi-arrow-forward"&gt;&lt;/use&gt;
                &lt;/svg&gt;
              &lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;/section&gt;
&lt;/div&gt;

&lt;/div&gt;</description><pubDate>Mon, 18 Oct 2021 16:00:00 +0000</pubDate><guid>https://cloud.google.com/blog/products/operations/in-depth-explanation-of-operational-metrics-at-google-cloud/</guid><category>Containers &amp; Kubernetes</category><category>GKE</category><category>Compute</category><category>DevOps &amp; SRE</category><category>Cloud Operations</category><og xmlns:og="http://ogp.me/ns#"><type>article</type><title>Google Cloud Monitoring 101: Understanding metric types</title><description></description><site_name>Google</site_name><url>https://cloud.google.com/blog/products/operations/in-depth-explanation-of-operational-metrics-at-google-cloud/</url></og><author xmlns:author="http://www.w3.org/2005/Atom"><name>Rakesh Dhoopar</name><title>Director, Outbound Product Management</title><department></department><company></company></author></item><item><title>Better Kubernetes application monitoring with GKE workload metrics</title><link>https://cloud.google.com/blog/products/operations/managed-metric-collection-for-google-kubernetes-engine/</link><description>&lt;div class="block-paragraph"&gt;&lt;p&gt;&lt;i&gt;&lt;b&gt;Editor’s note (12/15/21)&lt;/b&gt;: The date that we will begin charging for GKE workload metrics has been rescheduled from December 1, 2021 to February 1, 2022. Please see &lt;a href="https://cloud.google.com/monitoring/docs/release-notes#November_24_2021"&gt;this page&lt;/a&gt; for more information.&lt;br/&gt;&lt;/i&gt;&lt;/p&gt;&lt;hr/&gt;&lt;p&gt;The newly released &lt;a href="https://cloud.google.com/blog/products/devops-sre/announcing-dora-2021-accelerate-state-of-devops-report"&gt;2021 Accelerate State of DevOps Report&lt;/a&gt; found that teams who excel at modern operational practices are 1.4 times more likely to report greater software delivery and operational performance and 1.8 times more likely to report better business outcomes. A foundational element of modern operational practices is having monitoring tooling in place to track, analyze, and alert on important metrics. Today, we’re announcing a new capability that makes it easier than ever to monitor your Google Kubernetes Engine (GKE) deployments: GKE workload metrics.&lt;/p&gt;&lt;h3&gt;Introducing GKE workload metrics, currently in preview&lt;/h3&gt;&lt;p&gt;For applications running on GKE, we're excited to introduce the preview of &lt;a href="https://cloud.google.com/stackdriver/docs/solutions/gke/managing-metrics#workload-metrics"&gt;GKE workload metrics&lt;/a&gt;. This fully managed and highly configurable pipeline collects Prometheus-compatible metrics emitted by workloads running on GKE and sends them to &lt;a href="https://cloud.google.com/monitoring"&gt;Cloud Monitoring&lt;/a&gt;. GKE workload metrics simplifies the collection of metrics exposed by any GKE workload, such as a CronJob or a Deployment, so you don’t need to dedicate any time to the management of your metrics collection pipeline. Simply configure which metrics to collect, and GKE does everything else.&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/images/gke_node.max-1000x1000.jpg"
        
          alt="gke node.jpg"&gt;
        
        &lt;/a&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;p&gt;Benefits of GKE workload metrics include:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;Easy setup&lt;/b&gt;: With a single &lt;code&gt;kubectl apply&lt;/code&gt; command to deploy a PodMonitor custom resource, you can start collecting metrics. No manual installation of an agent is required.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;Highly configurable&lt;/b&gt;: Adjust scrape endpoints, frequency and other parameters.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;Fully managed&lt;/b&gt;: Google maintains the pipeline, lowering total cost of ownership.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;Control cost&lt;/b&gt;s: Easily manage Cloud Monitoring costs through flexible metric filtering.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;Open standard&lt;/b&gt;: Configure workload metrics using the PodMonitor custom resource, which is modeled after the Prometheus Operator’s PodMonitor resource.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;HPA support&lt;/b&gt;: Compatible with the Stackdriver Custom Metrics Adapter to &lt;a href="https://cloud.google.com/kubernetes-engine/docs/tutorials/workload-metrics-autoscaling"&gt;enable horizontal scaling on custom metrics&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;Better pricing&lt;/b&gt;: More intuitive, predictable, and lower &lt;a href="https://cloud.google.com/stackdriver/pricing#monitoring-costs"&gt;pricing&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;Autopilot support&lt;/b&gt;: GKE workload metrics is available for both GKE Standard and GKE Autopilot clusters.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Customers are already seeing the benefits of this simplified model.&lt;/p&gt;&lt;p&gt;&lt;i&gt;&amp;quot;With GKE workload metrics, we no longer need to deploy and manage a separate Prometheus server to scrape our custom metrics - it's all managed by Google. We can now focus on leveraging the value of our custom metrics without hassle!&amp;quot; - Carlos Alexandre, Cloud Architect, NOS SGPS S.A., a Portuguese telecommunications and media company.&lt;/i&gt;&lt;/p&gt;&lt;h3&gt;How to get started&lt;/h3&gt;&lt;p&gt;​​Follow these instructions to enable the GKE workload metrics pipeline in your GKE cluster:&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-code"&gt;&lt;dl&gt;
    &lt;dt&gt;code_block&lt;/dt&gt;
    &lt;dd&gt;&amp;lt;ListValue: [StructValue([(&amp;#x27;code&amp;#x27;, &amp;#x27;gcloud beta container clusters update YOUR_CLUSTER_NAME \\\r\n  --zone=YOUR_ZONE\r\n  --project=YOUR_PROJECT\r\n  --monitoring=SYSTEM,WORKLOAD&amp;#x27;), (&amp;#x27;language&amp;#x27;, &amp;#x27;&amp;#x27;), (&amp;#x27;caption&amp;#x27;, &amp;lt;wagtail.rich_text.RichText object at 0x7f2e271ae0a0&amp;gt;)])]&amp;gt;&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;p&gt;GKE workload metrics is currently available in Preview, so be sure to use the &lt;code&gt;gcloud &lt;b&gt;beta&lt;/b&gt;&lt;/code&gt; command.&lt;/p&gt;&lt;p&gt;See the &lt;a href="https://cloud.google.com/stackdriver/docs/solutions/gke/managing-metrics#workload-metrics"&gt;GKE workload metrics guide&lt;/a&gt; for details about how to configure which metrics are collected as well as a guide for &lt;a href="https://cloud.google.com/stackdriver/docs/solutions/gke/sidecar-to-workload-metrics"&gt;migrating to GKE workload metrics&lt;/a&gt; from the &lt;a href="https://cloud.google.com/stackdriver/docs/solutions/gke/prometheus"&gt;Stackdriver Prometheus sidecar&lt;/a&gt;.&lt;/p&gt;&lt;h3&gt;Pricing&lt;/h3&gt;&lt;p&gt;Ingestion of GKE workload metrics into Cloud Monitoring is not currently charged, but it will be charged starting February 1, 2022 (see Editor’s note above. Previous version of the blog noted December 1, 2021 as the start date). See more about &lt;a href="https://cloud.google.com/stackdriver/pricing#monitoring-costs"&gt;Cloud Monitoring pricing&lt;/a&gt;.&lt;br/&gt;&lt;/p&gt;&lt;h3&gt;Cloud Monitoring for modern operations&lt;/h3&gt;&lt;p&gt;Once GKE workload metrics are ingested into Cloud Monitoring, you can start using all of the great features of the service including global scalability, long-term (24 month) storage options, integration with &lt;a href="https://cloud.google.com/logging"&gt;Cloud Logging&lt;/a&gt;, &lt;a href="https://cloud.google.com/monitoring/dashboards"&gt;custom dashboards&lt;/a&gt;, &lt;a href="https://cloud.google.com/monitoring/alerts"&gt;alerting&lt;/a&gt;, and &lt;a href="https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring"&gt;SLO monitoring&lt;/a&gt;. These same benefits already exist for &lt;a href="https://cloud.google.com/stackdriver/docs/solutions/gke/managing-metrics#system-metrics"&gt;GKE system metrics&lt;/a&gt;, which are non-chargeable and are collected by default from GKE clusters and made available to you in the &lt;a href="https://console.cloud.google.com/monitoring/dashboards/resourceList/kubernetes"&gt;GKE Dashboard&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;If you have any questions or want to provide feedback, please visit the &lt;a href="https://www.googlecloudcommunity.com/gc/Google-Cloud-s-operations-suite/bd-p/cloud-operations" target="_blank"&gt;operations suite page&lt;/a&gt; on the Google Cloud Community.&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-related_article_tout"&gt;





&lt;div class="uni-related-article-tout h-c-page"&gt;
  &lt;section class="h-c-grid"&gt;
    &lt;a href="https://cloud.google.com/blog/products/operations/troubleshoot-gke-faster-with-monitoring-data-in-your-logs/"
       data-analytics='{
                       "event": "page interaction",
                       "category": "article lead",
                       "action": "related article - inline",
                       "label": "article: {slug}"
                     }'
       class="uni-related-article-tout__wrapper h-c-grid__col h-c-grid__col--8 h-c-grid__col-m--6 h-c-grid__col-l--6
        h-c-grid__col--offset-2 h-c-grid__col-m--offset-3 h-c-grid__col-l--offset-3 uni-click-tracker"&gt;
      &lt;div class="uni-related-article-tout__inner-wrapper"&gt;
        &lt;p class="uni-related-article-tout__eyebrow h-c-eyebrow"&gt;Related Article&lt;/p&gt;

        &lt;div class="uni-related-article-tout__content-wrapper"&gt;
          &lt;div class="uni-related-article-tout__image-wrapper"&gt;
            &lt;div class="uni-related-article-tout__image" style="background-image: url('')"&gt;&lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="uni-related-article-tout__content"&gt;
            &lt;h4 class="uni-related-article-tout__header h-has-bottom-margin"&gt;Troubleshoot GKE apps faster with monitoring data in Cloud Logging&lt;/h4&gt;
            &lt;p class="uni-related-article-tout__body"&gt;View contextual Monitoring data in your GKE log lines. Easily see the relevant pod, node and cluster events and metrics for your pod.&lt;/p&gt;
            &lt;div class="cta module-cta h-c-copy  uni-related-article-tout__cta muted"&gt;
              &lt;span class="nowrap"&gt;Read Article
                &lt;svg class="icon h-c-icon" role="presentation"&gt;
                  &lt;use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#mi-arrow-forward"&gt;&lt;/use&gt;
                &lt;/svg&gt;
              &lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;/section&gt;
&lt;/div&gt;

&lt;/div&gt;</description><pubDate>Tue, 05 Oct 2021 16:00:00 +0000</pubDate><guid>https://cloud.google.com/blog/products/operations/managed-metric-collection-for-google-kubernetes-engine/</guid><category>Containers &amp; Kubernetes</category><category>DevOps &amp; SRE</category><category>Cloud Operations</category><og xmlns:og="http://ogp.me/ns#"><type>article</type><title>Better Kubernetes application monitoring with GKE workload metrics</title><description></description><site_name>Google</site_name><url>https://cloud.google.com/blog/products/operations/managed-metric-collection-for-google-kubernetes-engine/</url></og><author xmlns:author="http://www.w3.org/2005/Atom"><name>Nathan Beach</name><title>Group Product Manager, Google Kubernetes Engine</title><department></department><company></company></author></item><item><title>To the cloud and beyond! Migration Enablement with Google Cloud’s Professional Services Organization</title><link>https://cloud.google.com/blog/products/gcp/google-cloud-pso-enabling-google-cloud-migration/</link><description>&lt;div class="block-paragraph"&gt;&lt;p&gt;Google Cloud’s &lt;a href="https://cloud.google.com/consulting"&gt;Professional Services Organization (PSO)&lt;/a&gt; engages with customers to ensure effective and efficient operations in the cloud, from the time they begin considering how cloud can help them overcome their operational, business or technical challenges, to the time they’re looking to optimize their cloud workloads. &lt;/p&gt;&lt;p&gt;We know that all parts of the &lt;a href="https://cloud.google.com/solutions/migration-center"&gt;cloud journey&lt;/a&gt; are important and can be complex.  In this blog post, we want to focus specifically on the migration process and how PSO engages in a myriad of activities to ensure a successful migration.&lt;/p&gt;&lt;p&gt;As a team of trusted technical advisors, PSO will approach migrations in three phases:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="https://cloud.google.com/resources/cloud-migration-checklist"&gt;Pre-Migration Planning&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Cutover Activities&lt;/li&gt;&lt;li&gt;Post-Migration Operations&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;While this post will not cover in detail all of the steps required for a migration, it will focus on how PSO engages in specific activities to meet customer objectives, manage risk, and deliver value.  We will discuss the assets, processes and tools that we leverage to ensure success.&lt;/p&gt;&lt;h2&gt;Pre-Migration Planning&lt;/h2&gt;&lt;h3&gt;Assess Scope&lt;/h3&gt;&lt;p&gt;Before the migration happens, you will need to understand and clarify the future state that you’re working towards.  From a logistical perspective, PSO will be helping you with &lt;b&gt;capacity planning&lt;/b&gt; to ensure sufficient resources are available for your envisioned future state.&lt;/p&gt;&lt;p&gt;While migration into the cloud does allow you to eliminate many of the considerations for the physical, logistical, and financial concerns of traditional data centers and co-locations, it does not remove the need for active management of quotas, preparation for large migrations, and forecasting.  PSO will help you forecast your needs in advance and work with the capacity team to adjust quotas, manage resources, and ensure availability. &lt;/p&gt;&lt;p&gt;Once the future state has been determined, PSO will also work with the product teams to determine any gaps in functionality.  PSO captures&lt;b&gt; feature requests&lt;/b&gt; across Google Cloud services and makes sure they are understood, logged, tracked, and prioritized appropriately with the relevant product teams.  From there, they work closely with the customer to determine any interim workarounds that can be leveraged while waiting for the feature to land, as well as providing updates on the upcoming roadmap.  &lt;/p&gt;&lt;h3&gt;Develop Migration Approach and Tooling&lt;/h3&gt;&lt;p&gt;Within Google Cloud, &lt;a href="https://cloud.google.com/solutions/application-migration"&gt;we have a library of assets and tools we use to assist in the migration process&lt;/a&gt;.  We have seen these assets help us successfully complete migrations for other customers efficiently and effectively.&lt;/p&gt;&lt;p&gt;Based on the scoping requirements and tooling available to assist in the migration, &lt;a href="https://cloud.google.com/resources/understanding-cloud-migration-frameworks-whitepaper"&gt;PSO will help recommend a migration approach&lt;/a&gt;.  We understand that enterprises have specific needs; differing levels of complexity and scale; regulatory, operational, or organization challenges that will need to be factored into the migration.  PSO will help customers think through the different migration options and how all of the considerations will play out.&lt;/p&gt;&lt;p&gt;PSO will work with the customer team to determine the best migration approach for moving servers from on-prem to Google Cloud. PSO will walk customers through different migration approaches, such as refactoring, lift-shift, or new installs. From there, the customer can determine the best fit for their migration. PSO will provide guidance on best practices and use cases from other customers with similar use cases. &lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Google offers a variety of cloud native tools that can assist with asset discovery, the migration itself, and post-migration optimization. PSO, as one example, will help work with project managers to determine the best tooling that accommodates the customer's requirements for migrating servers. PSO will also engage Google product team to ensure the customer fully understands the capabilities of each tool and the best fit for the use case. Google understands from a tooling perspective, one size does not fit all, thus PSO will work with the customer on determining the best migration approach and tooling for different requirements. &lt;/p&gt;&lt;h2&gt;Cutover Activities&lt;/h2&gt;&lt;p&gt;Once all of the planning activities have been completed, PSO will assist in making sure the cutover is successful.&lt;/p&gt;&lt;p&gt;During and leading up to critical customer events, PSO can provide proactive &lt;b&gt;event management services&lt;/b&gt; which deliver increased support and readiness for key workloads.  Beyond having a solid architecture and infrastructure on the platform, support for this infrastructure is essential and TAMs will help ensure that there are additional resources to support and unblock the customer where challenges arise.&lt;/p&gt;&lt;p&gt;As part of event management activities, PSO liaises with the Google Cloud Support Organization to ensure quick remediation and high resilience for situations where challenges arise.  A war room is usually created to facilitate quick communication about the critical activities and roadblocks that arise.  These war rooms can give customers a direct line to the support and engineering teams that will triage and resolve their issues.&lt;/p&gt;&lt;h2&gt;Post-Migration Activities&lt;/h2&gt;&lt;p&gt;Once cutover is complete, PSO will continue to provide support in areas such incident management, capacity planning, continuous operational support, and optimization to ensure the customer is successful from start to finish.&lt;/p&gt;&lt;p&gt;PSO will serve as the liaison between the customer and Google engineers. If support cases need to be escalated, PSO will ensure the appropriate parties are involved and work to get the case resolved in a timely manner. Through operational rigor, PSO will work with the customer in determining if certain Google Cloud services will be beneficial to the customer objectives. If services will add value to the customer, PSO will help enable the services so it aligns with the customer's goal and current cloud architecture. In cases where there are missing gaps in services, PSO will proactively work with the customer and Google engineering teams to close the gaps by enabling additional functionality in the services.  &lt;/p&gt;&lt;p&gt;PSO will continue to work with the engineering teams to consistently review and provide recommendations on the customer’s cloud architecture in ensuring the most optimal and cost efficient design along with adhering to Google's best practices guidelines. &lt;/p&gt;&lt;p&gt;Aside from migrations, PSO is also responsible for providing continuous training of Google Cloud to customers. To ensure consistent development of Google Cloud, PSO will work with the customer to jointly develop a learning roadmap to ensure the customer has the necessary skills to succeed in delivering successful projects in Google Cloud.&lt;/p&gt;&lt;h2&gt;Conclusion&lt;/h2&gt;&lt;p&gt;Google PSO will be actively engaged throughout the customer’s cloud journey to ensure the necessary guidance, methodology, and tools are presented to the customer. PSO will engage in a series of activities from pre-migration planning to post migration in key areas such as capacity planning to ensure sufficient resources are allocated for future workloads to providing support on technical cases for troubleshooting. PSO will serve as a long-term trusted advisor who will be the voice of the  customer and provide the reliability and stability of the customer's Google Cloud environment.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="https://cloud.google.com/consulting"&gt;Click here if you’d like to engage with our PSO team on your migration&lt;/a&gt;. Or, you can also &lt;a href="https://inthecloud.withgoogle.com/tco-assessment-19/form.html" target="_blank"&gt;get started with a free discovery and assessment&lt;/a&gt; of your current IT landscape.&lt;/p&gt;&lt;/div&gt;</description><pubDate>Thu, 09 Sep 2021 16:00:00 +0000</pubDate><guid>https://cloud.google.com/blog/products/gcp/google-cloud-pso-enabling-google-cloud-migration/</guid><category>Cloud Migration</category><category>Cloud Operations</category><category>Google Cloud</category><og xmlns:og="http://ogp.me/ns#"><type>article</type><title>To the cloud and beyond! Migration Enablement with Google Cloud’s Professional Services Organization</title><description></description><site_name>Google</site_name><url>https://cloud.google.com/blog/products/gcp/google-cloud-pso-enabling-google-cloud-migration/</url></og><author xmlns:author="http://www.w3.org/2005/Atom"><name>Nelson Lam</name><title>Technical Account Manager, Google Cloud</title><department></department><company></company></author><author xmlns:author="http://www.w3.org/2005/Atom"><name>Charlotte Wen</name><title>Technical Account Manager,  Google Cloud</title><department></department><company></company></author></item><item><title>How Lowe’s SRE reduced its mean time to recovery (MTTR) by over 80 percent</title><link>https://cloud.google.com/blog/products/devops-sre/how-lowes-improved-incident-response-processes-with-sre/</link><description>&lt;div class="block-paragraph"&gt;&lt;p&gt;&lt;i&gt;&lt;b&gt;Editor’s Note: &lt;/b&gt;In a &lt;a href="https://cloud.google.com/blog/products/devops-sre/how-lowes-leverages-google-sre-practices"&gt;previous blog&lt;/a&gt;, we discussed how home improvement retailer Lowe’s was able to increase the number of releases it supports by &lt;a href="https://cloud.google.com/sre"&gt;adopting Google’s Site Reliability Engineering (SRE) framework on Google Cloud&lt;/a&gt;. Lowe’s went from one release every two weeks to 20+ releases daily, helping meet its customer needs faster and more effectively. Today, the Lowe’s SRE team shares how they used SRE principles to decrease their mean-time-to-recovery (MTTR) by over 80 percent.&lt;/i&gt;&lt;/p&gt;&lt;p&gt;The stakes of managing Lowes.com have never been higher, and that means spotting, troubleshooting and recovering from incidents as quickly as possible, so that customers can continue to do business on our site. &lt;/p&gt;&lt;p&gt;To do that, it’s crucial to have solid incident engineering practices in place. Resolving an incident means mitigating the impact and/or restoring the service to its previous condition. The average time it takes to do this is called mean time to recovery (MTTR). Tracking this metric helps us stay on top of the overall reliability of our systems at Lowe’s, while simultaneously improving the speed with which we recover. Our goal is to keep the MTTR metric as low as possible, so that failures don’t negatively impact our business. Here are the four areas we addressed to drive holistic improvement in our MTTR.&lt;/p&gt;&lt;h3&gt;Lowe’s incident reporting process&lt;/h3&gt;&lt;p&gt;To reduce MTTR, we created a seamless incident reporting process following SRE principles. Our incident reporting process is a workflow that starts at the time an incident occurs, and ends with an SRE captain who closes the action items after a postmortem report. With this approach, we are able to limit the number of critical incidents. The reporting process involves three core components: monitoring, alerting, and blameless postmortems.&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Monitoring and alerting&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Having proper monitoring and alerting in place is crucial when it comes to incident management. Monitoring and alerting tools let you detect issues as soon as they occur, and notify the right person in the shortest possible time to take action. From a measurement standpoint, we track this as our mean time to acknowledge (MTTA). This is the average time it takes from when an alert is triggered, to when work on the issue begins.&lt;br/&gt;&lt;/p&gt;&lt;p&gt;At the time of an incident, our &lt;a href="https://cloud.google.com/monitoring"&gt;monitoring and alerting tools&lt;/a&gt; notify the on-call SRE first responder via &lt;a href="https://cloud.google.com/monitoring/support/notification-options"&gt;PagerDuty&lt;/a&gt; in the form of a phone call, text message and email. Our SRE software engineering team has done a lot of automation to enable various &lt;a href="https://cloud.google.com/blog/products/devops-sre/sre-fundamentals-sli-vs-slo-vs-sla"&gt;Service Level Indicator (SLI) alerts and Service Level Agreement (SLA)&lt;/a&gt; notifications. The on-call SRE then initiates a triage call with our service/domain stakeholders to resolve the incident. As a result, we reduced our MTTA from 30 minutes in 2019, to one minute – a 97 percent decrease. &lt;/p&gt;&lt;p&gt;&lt;b&gt;Blameless postmortems: learning from incidents&lt;/b&gt;&lt;/p&gt;&lt;p&gt;A postmortem is a written record of an incident, its impact, the actions taken to resolve it, the root cause and the follow-up actions to prevent the incident from recurring (&lt;a href="https://sre.google/sre-book/example-postmortem/" target="_blank"&gt;see example here&lt;/a&gt;). A blameless postmortem builds on that and is a core part of an SRE culture, and our culture at Lowe’s. We ensure that individuals are not singled out, and the outcome for all postmortems are directed toward learnings and process improvement.&lt;/p&gt;&lt;p&gt;For us, the postmortem process is the biggest part of our incident workflow. When an SRE creates a new postmortem report, the first step is to conduct a &lt;a href="https://cloud.google.com/blog/products/gcp/getting-the-most-out-of-shared-postmortems-cre-life-lessons"&gt;postmortem session&lt;/a&gt; with domain stakeholders to review the report. The postmortem then goes into the review stage and gets reviewed by more stakeholders in our weekly postmortem meeting. In the final stage of this process, the SRE captain will close the report once everyone in the weekly meeting agrees that the report is complete.&lt;/p&gt;&lt;p&gt;To conduct a successful postmortem, it is critical to keep the focus on identifying gaps and issues with the system and operations processes, rather than an individual, and generate concrete actions to address the problems we’ve identified. To ensure this, we follow a couple of best practices:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;We start by gathering the facts from the person who identified the problem, and each SLI owner has to identify a gap or the next SLI upstream owner who created the impact for them.&lt;/li&gt;&lt;li&gt;Every SLI owner is provided full opportunity to present their case, and identifying the issue is done as a community exercise. &lt;/li&gt;&lt;li&gt;Once action items and process changes are identified, an owner is nominated to complete the actions, or they will volunteer. &lt;/li&gt;&lt;li&gt;For easy reference, we publish and store postmortems in our incident knowledge base. This process helps SREs continuously improve as future incidents arise. &lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Continuous Improvement &lt;/b&gt;&lt;/p&gt;&lt;p&gt;Encouraging a culture of honest, transparent and direct feedback that you need for blameless postmortems is often an iterative process that needs sponsorship from executives, empowering incident captains to lead the entirety of the discussion and outcomes. Running successful postmortems, and completing action items from them, needs to be recognized and accounted for in SRE performance objective assessment. As shared in &lt;a href="https://sre.google/sre-book/postmortem-culture/" target="_blank"&gt;Google’s SRE book&lt;/a&gt;, the best practice is to ensure that writing effective postmortems is a rewarded and celebrated practice, with leadership’s acknowledgement and participation. This is possibly the hardest part to accomplish in an effective postmortem during a cultural transformation unless you have full buy-in from leadership.&lt;/p&gt;&lt;p&gt;However, it’s all well worth it. This process is a key part of how we were able to improve our MTTR over time—from two hours in 2019 to just 17 minutes! &lt;/p&gt;&lt;p&gt;Our SRE incident reporting process has also transformed how our company solves issues. By streamlining this workflow from alerting, to solving an issue, to blameless postmortems, we have reduced our MTTR by 82 percent and our MTTA by 97 percent. Most importantly, our team is learning from every incident and becoming better engineers as a result. Visit the &lt;a href="https://cloud.google.com/sre"&gt;SRE Google Cloud website&lt;/a&gt; to learn more about implementing SRE best practices in the cloud.&lt;/p&gt;&lt;hr/&gt;&lt;p&gt;&lt;i&gt;Acknowledgement&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;i&gt;Special thanks to Rahul Mohan Kola Kandy, Vivek Balivada, and the Digital SRE team at Lowe’s for contributing to this blog post. &lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-related_article_tout"&gt;





&lt;div class="uni-related-article-tout h-c-page"&gt;
  &lt;section class="h-c-grid"&gt;
    &lt;a href="https://cloud.google.com/blog/products/devops-sre/how-lowes-leverages-google-sre-practices/"
       data-analytics='{
                       "event": "page interaction",
                       "category": "article lead",
                       "action": "related article - inline",
                       "label": "article: {slug}"
                     }'
       class="uni-related-article-tout__wrapper h-c-grid__col h-c-grid__col--8 h-c-grid__col-m--6 h-c-grid__col-l--6
        h-c-grid__col--offset-2 h-c-grid__col-m--offset-3 h-c-grid__col-l--offset-3 uni-click-tracker"&gt;
      &lt;div class="uni-related-article-tout__inner-wrapper"&gt;
        &lt;p class="uni-related-article-tout__eyebrow h-c-eyebrow"&gt;Related Article&lt;/p&gt;

        &lt;div class="uni-related-article-tout__content-wrapper"&gt;
          &lt;div class="uni-related-article-tout__image-wrapper"&gt;
            &lt;div class="uni-related-article-tout__image" style="background-image: url('')"&gt;&lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="uni-related-article-tout__content"&gt;
            &lt;h4 class="uni-related-article-tout__header h-has-bottom-margin"&gt;How Lowe’s meets customer demand with Google SRE practices&lt;/h4&gt;
            &lt;p class="uni-related-article-tout__body"&gt;Lowe’s has adopted Google SRE practices to help developer and operations teams keep up with ecommerce demand.&lt;/p&gt;
            &lt;div class="cta module-cta h-c-copy  uni-related-article-tout__cta muted"&gt;
              &lt;span class="nowrap"&gt;Read Article
                &lt;svg class="icon h-c-icon" role="presentation"&gt;
                  &lt;use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#mi-arrow-forward"&gt;&lt;/use&gt;
                &lt;/svg&gt;
              &lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;/section&gt;
&lt;/div&gt;

&lt;/div&gt;</description><pubDate>Tue, 07 Sep 2021 16:00:00 +0000</pubDate><guid>https://cloud.google.com/blog/products/devops-sre/how-lowes-improved-incident-response-processes-with-sre/</guid><category>Google Cloud</category><category>Cloud Operations</category><category>Customers</category><category>Retail</category><category>DevOps &amp; SRE</category><og xmlns:og="http://ogp.me/ns#"><type>article</type><title>How Lowe’s SRE reduced its mean time to recovery (MTTR) by over 80 percent</title><description></description><site_name>Google</site_name><url>https://cloud.google.com/blog/products/devops-sre/how-lowes-improved-incident-response-processes-with-sre/</url></og><author xmlns:author="http://www.w3.org/2005/Atom"><name>Shyam Palani</name><title>Sr. Manager, E-commerce SRE, Lowe’s Companies, Inc.</title><department></department><company></company></author><author xmlns:author="http://www.w3.org/2005/Atom"><name>Nishanth Prasad</name><title>Lead Software Engineer, Digital SRE, Lowe’s Companies, Inc.</title><department></department><company></company></author></item><item><title>Zero effort performance insights for popular serverless offerings</title><link>https://cloud.google.com/blog/products/operations/find-serverless-application-performance-issues-easier/</link><description>&lt;div class="block-paragraph"&gt;&lt;p&gt;Inevitably, in the lifetime of a service or application, developers, DevOps, and SREs will need to investigate the cause of latency. Usually you will start by determining whether it is the application or the underlying infrastructure causing the latency. You have to look for signals that indicate the performance of those resources when the issue occurred. &lt;/p&gt;&lt;h3&gt;Using traces as your latency signals&lt;/h3&gt;&lt;p&gt;In most instances, the signals that provide the richest information for latency are traces. Traces represent the total time it takes for a request to propagate through every layer of a distributed system, including the load balancer, computes, databases and more during execution. The subset of traces used to represent each layer of the execution are referred to as spans.&lt;/p&gt;&lt;p&gt;The difficulty of generating traces has prevented many users from accessing this useful troubleshooting resource. To make them more easily available to developers, we've started instrumenting our most popular serverless compute options, &lt;a href="https://cloud.google.com/appengine"&gt;App Engine&lt;/a&gt;, &lt;a href="https://cloud.google.com/run"&gt;Cloud Run&lt;/a&gt; and &lt;a href="https://cloud.google.com/functions"&gt;Cloud Functions&lt;/a&gt; to generate traces by default. While this will not provide the full picture of what is going on in a complex distributed system, it will provide crucial pieces of information needed to decide which area to focus on during troubleshooting. &lt;/p&gt;&lt;h3&gt;What do I need to do to get this benefit today?&lt;/h3&gt;&lt;p&gt;The simple answer is, nothing!  Once your code is deployed in any serverless compute like App Engine, Cloud Run or Cloud Functions, any ingress or egress traffic through the compute automatically generates spans that are captured and stored in &lt;a href="https://cloud.google.com/trace"&gt;Cloud Trace&lt;/a&gt;.  These spans are stored for 30 days at no additional cost.  See additional terms &lt;a href="https://cloud.google.com/stackdriver/pricing#trace-costs"&gt;here&lt;/a&gt;. The resulting traces can be visualized as waterfall graphs with representative values of latency. In addition, we have extended this capability to Google Cloud databases, with &lt;a href="https://cloud.google.com/sql/docs/postgres/using-query-insights#identifying_the_source_of_the_problem_using_tracing"&gt;Cloud SQL Insights&lt;/a&gt; generating traces representative of query plans for PostgreSQL and sending them to Cloud Trace. &lt;/p&gt;&lt;p&gt;The screenshot below is a Day 1 trace captured from a simple “Helloworld'' application deployed in Cloud Run. The load balancer span (i.e. root span) is indicative of the total time through Google Cloud’s infrastructure and the Cloud Run span is indicative of the time it took for the compute to execute and service the request. &lt;/p&gt;&lt;p&gt;As you can see in the graphic below, the loadbalancer span is roughly equal to the Cloud Run span, so we can conclude that any observed latency is not being caused by Google’s infrastructure. At this point you can focus more on your code.&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        &lt;a href="https://storage.googleapis.com/gweb-cloudblog-publish/images/trace_list.max-2800x2800.jpg" rel="external" target="_blank"&gt;
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/images/trace_list.max-1000x1000.jpg"
        
          alt="trace list.jpg"&gt;
        
        &lt;/a&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;h3&gt;This is awesome, how do I extend it?&lt;/h3&gt;&lt;p&gt;You must still instrument your application if you want it to generate more granular spans representative of the code's execution. You can start &lt;a href="https://cloud.google.com/trace/docs/setup#recommended_client_libraries"&gt;here&lt;/a&gt; to pick the library that matches your development language and for instructions on how to instrument your code. Once this is done, your traces will get richer, encompassing more spans with information about both the performance of the infrastructure and application in one single waterfall view.  &lt;/p&gt;&lt;h3&gt;Cloud Trace – Google Cloud’s hub for Infrastructure traces&lt;/h3&gt;&lt;p&gt;We are excited about the future of telemetry in Google Cloud. Upcoming releases in the next six months will touch on infrastructure instrumentation and areas like trace analysis, metrics, integrations to other Google Cloud products and integrations with third party APM products. &lt;/p&gt;&lt;h3&gt;Next Steps&lt;/h3&gt;&lt;p&gt;Explore the traces from your infrastructure in &lt;a href="https://console.cloud.google.com/traces/overview"&gt;your Cloud Trace console&lt;/a&gt; and explore the available &lt;a href="https://cloud.google.com/trace/docs/setup#recommended_client_libraries"&gt;libraries and procedures&lt;/a&gt; for application instrumentation. If you have questions or feedback about this new feature, head to the &lt;a href="https://www.googlecloudcommunity.com/gc/Cloud-Operations/bd-p/cloud-operations" target="_blank"&gt;Cloud Operations Community page&lt;/a&gt; and let us know!&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-video"&gt;



&lt;div class="article-module article-video "&gt;
  &lt;figure&gt;
    &lt;a class="h-c-video h-c-video--marquee"
      href="https://youtube.com/watch?v=CjGv1bDy9rI"
      data-glue-modal-trigger="uni-modal-CjGv1bDy9rI-"
      data-glue-modal-disabled-on-mobile="true"&gt;

      
        &lt;img src="//img.youtube.com/vi/CjGv1bDy9rI/maxresdefault.jpg"
             alt="Google Cloud offers many tools that can help you manage your application services. In this video, we teach you how to set up and utilize Cloud Trace, Cloud Profiler, and Cloud Debugger to collect latency data across different services, memory-allocation information, and inspect application code locations without compromising the performance of your web application."/&gt;
      
      &lt;svg role="img" class="h-c-video__play h-c-icon h-c-icon--color-white"&gt;
        &lt;use xlink:href="#mi-youtube-icon"&gt;&lt;/use&gt;
      &lt;/svg&gt;
    &lt;/a&gt;

    
  &lt;/figure&gt;
&lt;/div&gt;

&lt;div class="h-c-modal--video"
     data-glue-modal="uni-modal-CjGv1bDy9rI-"
     data-glue-modal-close-label="Close Dialog"&gt;
   &lt;a class="glue-yt-video"
      data-glue-yt-video-autoplay="true"
      data-glue-yt-video-height="99%"
      data-glue-yt-video-vid="CjGv1bDy9rI"
      data-glue-yt-video-width="100%"
      href="https://youtube.com/watch?v=CjGv1bDy9rI"
      ng-cloak&gt;
   &lt;/a&gt;
&lt;/div&gt;

&lt;/div&gt;</description><pubDate>Fri, 20 Aug 2021 16:00:00 +0000</pubDate><guid>https://cloud.google.com/blog/products/operations/find-serverless-application-performance-issues-easier/</guid><category>GKE</category><category>Compute Engine</category><category>Google Cloud</category><category>App Engine</category><category>Serverless</category><category>DevOps &amp; SRE</category><category>Cloud Operations</category><og xmlns:og="http://ogp.me/ns#"><type>article</type><title>Zero effort performance insights for popular serverless offerings</title><description></description><site_name>Google</site_name><url>https://cloud.google.com/blog/products/operations/find-serverless-application-performance-issues-easier/</url></og><author xmlns:author="http://www.w3.org/2005/Atom"><name>Eyamba Ita</name><title>Product Manager</title><department></department><company></company></author></item><item><title>Use Process Metrics for troubleshooting and resource attribution</title><link>https://cloud.google.com/blog/products/operations/troubleshoot-and-manage-your-vms-with-process-metrics/</link><description>&lt;div class="block-paragraph"&gt;&lt;p&gt;When you are experiencing an issue with your application or service, having deep visibility into both the infrastructure and the software powering your apps and services is critical. Most monitoring services provide insights at the Virtual Machine (VM) level, but few go further. To get a full picture of the state of your application or service, you need to know what processes are running on your infrastructure. That visibility into the processes running on your VMs is provided out of the box by the new &lt;a href="https://cloud.google.com/stackdriver/docs/solutions/agents/ops-agent"&gt;Ops Agent&lt;/a&gt; and made available by default in &lt;a href="https://cloud.google.com/monitoring"&gt;Cloud Monitoring&lt;/a&gt;. Today we will cover how to access process metrics and why you should start monitoring them. &lt;/p&gt;&lt;h3&gt;Better visibility with process metrics&lt;/h3&gt;&lt;p&gt;The data gathered by process metrics include CPU, memory, I/O, number of threads, and &lt;a href="https://cloud.google.com/monitoring/api/metrics_agent#agent-processes"&gt;more&lt;/a&gt;, for any running processes and services on your VMs. When the Ops Agent or the Cloud Monitoring agent is installed, these metrics are captured at 60-second intervals and sent to Cloud Monitoring so you can visualize, analyze, track, and alert on them. A single VM may run tens or hundreds of processes, while you may have tens of thousands running across your fleet of VMs. &lt;/p&gt;&lt;p&gt;As a developer, you may only care about seeing inside a single VM to &lt;b&gt;troubleshoot&lt;/b&gt; and identify memory leaks or the source of performance issues.&lt;/p&gt;&lt;p&gt;As an operator or IT Admin, you may be interested in aggregate &lt;b&gt;resource consumption&lt;/b&gt;, building baseline views of compute, storage, and networking usage across your VM fleet. Then, when those baseline consumption levels break normal behaviors, you will know when to investigate your systems.&lt;/p&gt;&lt;h3&gt;Built for scale and ease of use&lt;/h3&gt;&lt;p&gt;Cloud Monitoring is built on the same advanced backend that powers metrics across Google. This proven scalability means your metrics ingestion will be supported despite the extremely high cardinality. Additionally, our agents do not require any config file changes to turn on process metric monitoring.&lt;/p&gt;&lt;p&gt;Lastly, our goal is to provide you the observability and telemetry data where, and when, you need it. So, like the &lt;a href="https://cloud.google.com/blog/products/operations/better-access-to-observability-data-for-virtual-machines"&gt;rest of the operations suite&lt;/a&gt;, we deliver process metrics in the context of your infrastructure, directly in the VM admin console.&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/original_images/Navigating_to_a_single_VMs_in-context_process_monitoring_in_GCE.gif"
        
          alt="Navigating to a single VM’s in-context process monitoring in GCE.gif"&gt;
        
        &lt;/a&gt;
      
        &lt;figcaption class="article-image__caption "&gt;&lt;i&gt;Navigating to a single VM’s in-context process monitoring in GCE&lt;/i&gt;&lt;/figcaption&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;p&gt;The navigation is simple. Once you have the Ops Agent or the Cloud Monitoring agent installed in your VMs:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;Go to the Compute Engine console page and click on &lt;a href="https://console.cloud.google.com/compute/instances"&gt;VM Instances&lt;/a&gt; &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Select the VM that you want to investigate&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;In the navigation menu on the top, click Observability&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Click on Metrics&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Lastly, click on Processes&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;In the window on the right you will see a chart and a table with all of the processes in your VM. You can also filter by time frame and sort by name or value. You do not need to do anything, other than have the agent installed, for the process to be detected and displayed.&lt;/p&gt;&lt;h3&gt;Fleet-wide metrics monitoring&lt;/h3&gt;&lt;p&gt;Cloud Monitoring gives you a look across your fleet of VMs so you can identify the aggregated usage of resources by processes. This level of broad, yet granular, insight can drive your decisions around which software to run or how many VMs you need to optimally power your apps and services. Admins can perform a cost-savings analysis if they determine that certain processes are slowing down the work of a large number of VMs. The larger numbers of less powerful VMs can be replaced by fewer, more capable VMs.   &lt;/p&gt;&lt;p&gt;To get this fleet-wide view:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;Navigate to &lt;a href="https://console.cloud.google.com/monitoring"&gt;Cloud Monitoring&lt;/a&gt; &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Click Dashboards in the left menu&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;In the All Dashboards list, click on VM Instances&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Towards the top of the window, click on &lt;a href="https://console.cloud.google.com/monitoring/dashboards/resourceList/gce_instance"&gt;Processes&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p/&gt;&lt;p&gt;This provides many charts detailing the processes running across your fleet of VMs.&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/original_images/new_Cloud_Monitoring_VM_Fleet-wide_Process_view.gif"
        
          alt="new Cloud Monitoring VM Fleet-wide Process view.gif"&gt;
        
        &lt;/a&gt;
      
        &lt;figcaption class="article-image__caption "&gt;&lt;i&gt;The new Cloud Monitoring VM Fleet-wide Process view in the VM Instance Dashboard&lt;/i&gt;&lt;/figcaption&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;h3&gt;Get started today&lt;/h3&gt;&lt;p&gt;To start identifying and monitoring your process metrics, you must first &lt;a href="https://cloud.google.com/stackdriver/docs/solutions/agents/ops-agent"&gt;install the Ops Agent&lt;/a&gt;, or have installed the legacy Cloud Monitoring agent. Once that is complete, the process metrics data will automatically be ingested into Cloud Monitoring and the &lt;a href="https://console.cloud.google.com/compute/instances"&gt;VM admin console&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;If you have any questions, or to join the conversation with other developers, operators, DevOps, and SREs, visit the &lt;a href="https://www.googlecloudcommunity.com/gc/Cloud-Operations/bd-p/cloud-operations" target="_blank"&gt;Cloud Operations page&lt;/a&gt; in the Google Cloud Community.&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-related_article_tout"&gt;





&lt;div class="uni-related-article-tout h-c-page"&gt;
  &lt;section class="h-c-grid"&gt;
    &lt;a href="https://cloud.google.com/blog/products/operations/ops-agent-now-ga-and-it-includes-opentelemetry/"
       data-analytics='{
                       "event": "page interaction",
                       "category": "article lead",
                       "action": "related article - inline",
                       "label": "article: {slug}"
                     }'
       class="uni-related-article-tout__wrapper h-c-grid__col h-c-grid__col--8 h-c-grid__col-m--6 h-c-grid__col-l--6
        h-c-grid__col--offset-2 h-c-grid__col-m--offset-3 h-c-grid__col-l--offset-3 uni-click-tracker"&gt;
      &lt;div class="uni-related-article-tout__inner-wrapper"&gt;
        &lt;p class="uni-related-article-tout__eyebrow h-c-eyebrow"&gt;Related Article&lt;/p&gt;

        &lt;div class="uni-related-article-tout__content-wrapper"&gt;
          &lt;div class="uni-related-article-tout__image-wrapper"&gt;
            &lt;div class="uni-related-article-tout__image" style="background-image: url('')"&gt;&lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="uni-related-article-tout__content"&gt;
            &lt;h4 class="uni-related-article-tout__header h-has-bottom-margin"&gt;The Ops Agent is now GA and it leverages OpenTelemetry&lt;/h4&gt;
            &lt;p class="uni-related-article-tout__body"&gt;Today, we’re happy to announce the General Availability of the new Ops Agent, which replaces both the Logging and Monitoring agents and s...&lt;/p&gt;
            &lt;div class="cta module-cta h-c-copy  uni-related-article-tout__cta muted"&gt;
              &lt;span class="nowrap"&gt;Read Article
                &lt;svg class="icon h-c-icon" role="presentation"&gt;
                  &lt;use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#mi-arrow-forward"&gt;&lt;/use&gt;
                &lt;/svg&gt;
              &lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;/section&gt;
&lt;/div&gt;

&lt;/div&gt;</description><pubDate>Wed, 18 Aug 2021 16:00:00 +0000</pubDate><guid>https://cloud.google.com/blog/products/operations/troubleshoot-and-manage-your-vms-with-process-metrics/</guid><category>Compute</category><category>Google Cloud</category><category>DevOps &amp; SRE</category><category>Cloud Operations</category><og xmlns:og="http://ogp.me/ns#"><type>article</type><title>Use Process Metrics for troubleshooting and resource attribution</title><description></description><site_name>Google</site_name><url>https://cloud.google.com/blog/products/operations/troubleshoot-and-manage-your-vms-with-process-metrics/</url></og><author xmlns:author="http://www.w3.org/2005/Atom"><name>Rahul Harpalani</name><title>Product Manager</title><department></department><company></company></author></item><item><title>Verify GKE Service Availability with new dedicated uptime checks</title><link>https://cloud.google.com/blog/products/operations/verify-gke-services-are-up-with-dedicated-uptime-checks/</link><description>&lt;div class="block-paragraph"&gt;&lt;p&gt;Keeping the experience of your end user in mind is important when developing applications. Observability tools help your team measure important performance indicators that are important to your users, like uptime. It’s generally a good practice to measure your service internally via metrics and logs which can give you indications of uptime, but an external signal is very useful as well, wherever feasible. &lt;/p&gt;&lt;p&gt;One of the easiest ways to measure your services externally is to use an established and trusted technology, an uptime check. Uptime checks closely monitor the availability of your service and can serve as a leading indicator of a problem. This can hopefully help you reduce or eliminate the time an issue affects your users. &lt;/p&gt;&lt;h3&gt;Uptime checks for GKE services &lt;/h3&gt;&lt;p&gt;With the proliferation of the microservices architecture, more services means more endpoints to measure. Trying to track, isolate, and resolve issues can be increasingly complex. That’s why we’re excited to introduce the new uptime check for Google Kubernetes Engine (GKE) LoadBalancer services. &lt;/p&gt;&lt;p&gt;Google Cloud has offered &lt;a href="https://cloud.google.com/monitoring/uptime-checks"&gt;uptime checks&lt;/a&gt; for different types of resources, but none of these provided a direct association with GKE. With our new integration, the GKE LoadBalancer uptime check directly associates a service load balancer with an uptime check, helping to ensure the uptime check is managed dynamically. As the underlying network for a service changes the uptime check changes with it, allowing you to quickly correlate a service with an uptime failure. &lt;/p&gt;&lt;p&gt;You can also set up an alert policy based on your uptime check, allowing your SRE or Ops team to be notified of a meaningful issue that’s impacting your service.Once notified, you can jump straight into the associated &lt;a href="https://cloud.google.com/stackdriver/docs/solutions/gke/observing#skm-dashboard"&gt;GKE Dashboard&lt;/a&gt; to better isolate the root cause. &lt;/p&gt;&lt;h3&gt;Creating a new uptime check&lt;/h3&gt;&lt;p&gt;To get started, you can head to Monitoring &amp;gt; Uptime and select “+ Create Uptime Check” and then select the new Kubernetes Loadbalancer Service option.&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/original_images/uptime_check.gif"
        
          alt="uptime_check.gif"&gt;
        
        &lt;/a&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;h3&gt;More information&lt;/h3&gt;&lt;p&gt;Visit our &lt;a href="https://cloud.google.com/monitoring/uptime-checks"&gt;documentation for Managing uptime checks&lt;/a&gt;, where you can get additional information and step by step instructions for creating your first uptime check.&lt;/p&gt;&lt;p&gt;Lastly, if you have questions or feedback about this new feature, head to the &lt;a href="https://www.googlecloudcommunity.com/gc/Cloud-Operations/bd-p/cloud-operations" target="_blank"&gt;Cloud Operations Community page&lt;/a&gt; and let us know!&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-video"&gt;



&lt;div class="article-module article-video "&gt;
  &lt;figure&gt;
    &lt;a class="h-c-video h-c-video--marquee"
      href="https://youtube.com/watch?v=--4WWwx4Log"
      data-glue-modal-trigger="uni-modal---4WWwx4Log-"
      data-glue-modal-disabled-on-mobile="true"&gt;

      
        &lt;img src="//img.youtube.com/vi/--4WWwx4Log/maxresdefault.jpg"
             alt="In this episode of Stack Doctor, we show you how to use the alerts timeline on your GKE monitoring dashboards to troubleshoot your services. Watch to learn how you can easily spot and resolve issues in your applications and infrastructure!"/&gt;
      
      &lt;svg role="img" class="h-c-video__play h-c-icon h-c-icon--color-white"&gt;
        &lt;use xlink:href="#mi-youtube-icon"&gt;&lt;/use&gt;
      &lt;/svg&gt;
    &lt;/a&gt;

    
  &lt;/figure&gt;
&lt;/div&gt;

&lt;div class="h-c-modal--video"
     data-glue-modal="uni-modal---4WWwx4Log-"
     data-glue-modal-close-label="Close Dialog"&gt;
   &lt;a class="glue-yt-video"
      data-glue-yt-video-autoplay="true"
      data-glue-yt-video-height="99%"
      data-glue-yt-video-vid="--4WWwx4Log"
      data-glue-yt-video-width="100%"
      href="https://youtube.com/watch?v=--4WWwx4Log"
      ng-cloak&gt;
   &lt;/a&gt;
&lt;/div&gt;

&lt;/div&gt;</description><pubDate>Fri, 13 Aug 2021 16:00:00 +0000</pubDate><guid>https://cloud.google.com/blog/products/operations/verify-gke-services-are-up-with-dedicated-uptime-checks/</guid><category>GKE</category><category>Containers &amp; Kubernetes</category><category>DevOps &amp; SRE</category><category>Cloud Operations</category><og xmlns:og="http://ogp.me/ns#"><type>article</type><title>Verify GKE Service Availability with new dedicated uptime checks</title><description></description><site_name>Google</site_name><url>https://cloud.google.com/blog/products/operations/verify-gke-services-are-up-with-dedicated-uptime-checks/</url></og><author xmlns:author="http://www.w3.org/2005/Atom"><name>Roy Nuriel</name><title>Product Manager, Cloud Ops</title><department></department><company></company></author><author xmlns:author="http://www.w3.org/2005/Atom"><name>Kyle Benson</name><title>Product Manager, Cloud Ops</title><department></department><company></company></author></item><item><title>Monitor and troubleshoot your VMs in context for faster resolution</title><link>https://cloud.google.com/blog/products/operations/better-access-to-observability-data-for-virtual-machines/</link><description>&lt;div class="block-paragraph"&gt;&lt;p&gt;Troubleshooting production issues with virtual machines (VMs) can be complex and often requires correlating multiple data points and signals across infrastructure and application metrics, as well as raw logs. When your end users are experiencing latency, downtime, or errors, switching between different tools and UIs to perform a root cause analysis can slow your developers down. Saving time when accessing the necessary data, deploying fixes, and verifying those fixes can save your organization money and keep the confidence of your users.&lt;/p&gt;&lt;p&gt;We are happy to announce the general availability of an enhanced “in-context” set of UI-based tools for &lt;a href="https://cloud.google.com/compute"&gt;Compute Engine&lt;/a&gt; users to help make the troubleshooting journey easier and more intuitive. From the Google Console, developers can click into any VM and access a rich set of pre-built visualizations designed to give insights into common scenarios and issues associated with CPU, Disk, Memory, Networking, and live processes. With access to all of this data in one location, you can easily correlate between signals over a given timeframe. &lt;/p&gt;&lt;h3&gt;Bringing more operations data to your VMs&lt;/h3&gt;&lt;p&gt;A collection of high-level metrics has always been available in the Compute Engine console page. However, your feedback let us know that you still had to navigate between different tools to perform a proper root cause analysis. For example, seeing that CPU utilization peaked during a certain time frame might be a helpful starting point, but resolving the issue will require a deeper understanding of what is driving the utilization. Furthermore, you will want to correlate this data with &lt;a href="https://cloud.google.com/monitoring/agent/process-metrics"&gt;processes&lt;/a&gt;, and other signals such as I/O wait time versus user space versus kernel space. &lt;/p&gt;&lt;p&gt;With this in mind, we added metrics, charts, and a variety of new visualizations to the Compute Engine page, many requiring zero setup time. Some of these new additions are populated with in-depth metrics provided by the Google Cloud &lt;a href="https://cloud.google.com/blog/products/operations/ops-agent-now-ga-and-it-includes-opentelemetry"&gt;Ops Agent&lt;/a&gt; (or legacy agents if you’re currently using them), which can easily be installed via &lt;a href="https://cloud.google.com/stackdriver/docs/solutions/agents/ops-agent/install-index"&gt;Terraform, Puppet, Ansible or an install script&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        &lt;a href="https://storage.googleapis.com/gweb-cloudblog-publish/images/observability_data_available.max-2800x2800.jpg" rel="external" target="_blank"&gt;
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/images/observability_data_available.max-1000x1000.jpg"
        
          alt="observability data available.jpg"&gt;
        
        &lt;/a&gt;
      
        &lt;figcaption class="article-image__caption "&gt;&lt;i&gt;Some of the observability data available when you click into your VM&lt;/i&gt;&lt;/figcaption&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;p&gt;New charts that leverage the metrics from the Ops Agent include: CPU utilization as reported by the OS, Memory Utilization, Memory breakdown by User, Kernel, and Disk Cache, I/O Latency, Disk Utilization and Queue Length, Process Metrics, and many more.&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/original_images/oic_hgaron.gif"
        
          alt="oic hgaron.gif"&gt;
        
        &lt;/a&gt;
      
        &lt;figcaption class="article-image__caption "&gt;&lt;i&gt;A more detailed look at the data available when you click into the VM, including metrics and logs&lt;/i&gt;&lt;/figcaption&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;p&gt;While no single troubleshooting journey fits all needs, this enhanced set of observability tools should make the following scenarios faster and more intuitive:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;Identifying networking changes via metrics and logs&lt;/b&gt;. By comparing unexpected increases in network traffic, network packet size, or spikes in new network connections against logs by severity, developers might identify a correlation between this traffic increase and critical logs errors. By further navigating to the Logs section of the tools, one can quickly filter to critical logs only and expand sample log messages to discover detailed logs around timeout messages or errors caused by the increased load. Deep links to the &lt;a href="https://cloud.google.com/logging/docs/view/logs-viewer-interface"&gt;Logs Explorer&lt;/a&gt; filtered to the VM of interest allows for fast and seamless navigation between Compute Engine and Cloud Logging.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;Determining the impact of specific processes on utilization&lt;/b&gt;. By comparing times of high CPU or memory utilization against top processes, operators can determine whether a specific process (as denoted by command line or PID) is over-consuming. They can then refactor or terminate a process altogether, or choose to run a process on a machine better suited for its compute and memory requirements. Alternatively, there may be many short-lived processes that do not show up in the processes snapshot, but are visible as a spike in the Process Creation Rate chart. This can lead to a decision to refactor so that process duration is distributed more efficiently.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;Choosing appropriate disk size for workloads&lt;/b&gt;. A developer may notice that the "Peak 1-second IOPS" have begun to hit a flat line, indicating the disk is hitting a performance limit. If the "I/O Latency Avg" also shows a corresponding increase, this could indicate that I/O throttling is occurring. Finally, breaking this down the Peak IOPS by Storage Type, one might see that Persistent Disk SSD is responsible for the majority of the peak IOPS, which could lead to a decision to increase the size of the disk to get a &lt;a href="https://cloud.google.com/compute/docs/disks/performance#performance_factors"&gt;higher block storage performance limit&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;Security Operations and Data Sovereignty&lt;/b&gt;. Operators may be in charge of enforcing security protocols around external data access, or creating technical architecture for keeping data within specific regions for privacy and regulatory compliance. Using the Network Summary, operators can determine at a glance whether a VM is establishing connections and sending traffic primarily to VMs and Google services within the same project, or whether connections and traffic ingress / egress may be occurring externally. Likewise, operators can determine whether new connections are being established or traffic is being sent to different regions or zones, which may lead to new protocols to block inter-region data transfer. &lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;Cost optimization via networking changes&lt;/b&gt;. A developer may notice that the majority of VM to VM traffic is being sent inter-region, as opposed to traffic remaining in the same region. Because this inter-region traffic is slower and is &lt;a href="https://cloud.google.com/vpc/network-pricing#egress-within-gcp"&gt;charged at an inter-region rate&lt;/a&gt;, the developer can choose to reconfigure the VM to communicate instead with local replicas of the data it needs in its same region, thus reducing both latency and cost.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;b&gt;Measuring and tuning memory performance&lt;/b&gt;. The Ops Agent is required for most VM families to collect memory utilization. By examining the memory usage by top processes, a developer may detect a memory leak, and reconfigure or terminate the offending process. Additionally, an operator may examine the breakdown of memory usage by type and notice that disk cache usage has hit the limit of using all memory not in use by applications, correlating with an increase in disk latency. They may choose to &lt;a href="https://cloud.google.com/blog/products/compute/choose-the-right-google-compute-engine-machine-type-for-you"&gt;upsize to a memory-optimized VM&lt;/a&gt; to allow enough memory for both applications and disk caching.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;These are just a few of the use cases where your team may leverage these new capabilities to spend less time troubleshooting, optimize for costs, and improve your overall experience with Compute Engine. &lt;/p&gt;&lt;h3&gt;Get Started Today&lt;/h3&gt;&lt;p&gt;To get started, navigate to &lt;b&gt;Compute Engine &amp;gt; VM Instances&lt;/b&gt;, click into a specific VM of interest, and navigate to the &lt;b&gt;Observability&lt;/b&gt; tab. You can also check out our &lt;a href="https://cloud.google.com/compute/docs/troubleshooting/troubleshooting-performance"&gt;developer docs&lt;/a&gt; for additional guidance on how to use these tools to troubleshoot VM performance, and we recommend &lt;a href="https://cloud.google.com/stackdriver/docs/solutions/agents/ops-agent/install-index"&gt;installing the Ops Agent&lt;/a&gt; on your Compute Engine VMs to get the most out of these new tools.  If you have specific questions or feedback, please join the discussion on our Google Cloud Community, &lt;a href="https://www.googlecloudcommunity.com/gc/Cloud-Operations/bd-p/cloud-operations" target="_blank"&gt;Cloud Operations page&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-related_article_tout"&gt;





&lt;div class="uni-related-article-tout h-c-page"&gt;
  &lt;section class="h-c-grid"&gt;
    &lt;a href="https://cloud.google.com/blog/products/operations/agent-installation-options-google-cloud-vms/"
       data-analytics='{
                       "event": "page interaction",
                       "category": "article lead",
                       "action": "related article - inline",
                       "label": "article: {slug}"
                     }'
       class="uni-related-article-tout__wrapper h-c-grid__col h-c-grid__col--8 h-c-grid__col-m--6 h-c-grid__col-l--6
        h-c-grid__col--offset-2 h-c-grid__col-m--offset-3 h-c-grid__col-l--offset-3 uni-click-tracker"&gt;
      &lt;div class="uni-related-article-tout__inner-wrapper"&gt;
        &lt;p class="uni-related-article-tout__eyebrow h-c-eyebrow"&gt;Related Article&lt;/p&gt;

        &lt;div class="uni-related-article-tout__content-wrapper"&gt;
          &lt;div class="uni-related-article-tout__image-wrapper"&gt;
            &lt;div class="uni-related-article-tout__image" style="background-image: url('')"&gt;&lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="uni-related-article-tout__content"&gt;
            &lt;h4 class="uni-related-article-tout__header h-has-bottom-margin"&gt;Agent installation options for Google Cloud VMs&lt;/h4&gt;
            &lt;p class="uni-related-article-tout__body"&gt;Google Cloud makes it easy to install agents on your single VMs or your whole fleet of VMs so you can collect data for monitoring and tro...&lt;/p&gt;
            &lt;div class="cta module-cta h-c-copy  uni-related-article-tout__cta muted"&gt;
              &lt;span class="nowrap"&gt;Read Article
                &lt;svg class="icon h-c-icon" role="presentation"&gt;
                  &lt;use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#mi-arrow-forward"&gt;&lt;/use&gt;
                &lt;/svg&gt;
              &lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;/section&gt;
&lt;/div&gt;

&lt;/div&gt;</description><pubDate>Thu, 12 Aug 2021 16:00:00 +0000</pubDate><guid>https://cloud.google.com/blog/products/operations/better-access-to-observability-data-for-virtual-machines/</guid><category>Compute</category><category>Google Cloud</category><category>DevOps &amp; SRE</category><category>Cloud Operations</category><og xmlns:og="http://ogp.me/ns#"><type>article</type><title>Monitor and troubleshoot your VMs in context for faster resolution</title><description></description><site_name>Google</site_name><url>https://cloud.google.com/blog/products/operations/better-access-to-observability-data-for-virtual-machines/</url></og><author xmlns:author="http://www.w3.org/2005/Atom"><name>Haskell Garon</name><title>Sr. Product Manager</title><department></department><company></company></author><author xmlns:author="http://www.w3.org/2005/Atom"><name>Dave Raffensperger</name><title>Staff Software Engineer</title><department></department><company></company></author></item><item><title>Troubleshoot GKE apps faster with monitoring data in Cloud Logging</title><link>https://cloud.google.com/blog/products/operations/troubleshoot-gke-faster-with-monitoring-data-in-your-logs/</link><description>&lt;div class="block-paragraph"&gt;&lt;p&gt;When you’re troubleshooting an application on Google Kubernetes Engine (GKE), the more context that you have on the issue, the faster you can resolve it. For example, did the pod exceed it’s memory allocation? Was there a permissions error reserving the storage volume? Did a rogue regex in the app pin the CPU? All of these questions require developers and operators to build a lot of troubleshooting context. &lt;/p&gt;&lt;h3&gt;Cloud Monitoring data for GKE in Cloud Logging&lt;/h3&gt;&lt;p&gt;To make it easier to troubleshoot GKE apps, we’ve added contextual &lt;a href="https://cloud.google.com/monitoring"&gt;Cloud Monitoring&lt;/a&gt; data accessible right from &lt;a href="https://cloud.google.com/logging"&gt;Cloud Logging&lt;/a&gt;. With this new feature, you can easily see the relevant pod, node and cluster events, metrics, alerts, and SLOs right from the log line itself. Additionally, the data loaded for a specific log entry is scoped to the Kubernetes resource, which saves you valuable time while investigating an app error.&lt;/p&gt;&lt;p&gt;Today’s announcement builds on other recent integrations including the addition of a logs tab nested in the details page of &lt;a href="https://cloud.google.com/blog/products/operations/easy-access-to-your-gke-logs-from-the-cloud-console"&gt;each of your GKE resources&lt;/a&gt; and combining metrics and logs in the GKE Dashboard in Monitoring. Now, wherever you start your troubleshooting journey – in Monitoring, Logging or GKE – you have the observability data at your fingertips. &lt;/p&gt;&lt;p&gt;For example, if you’re troubleshooting a GKE app error in Cloud Logging and looking at the app logs, you can now view the metric charts for container restarts, uptime, memory, CPU and storage without leaving the log entry. Active alerts are highlighted on the alerts tab, which can provide helpful context for troubleshooting. This unique and integrated experience brings together critical log and metric data for the specific Kubernetes resource where your app is running.&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/original_images/GCP_container_details.gif"
        
          alt="GCP container details.gif"&gt;
        
        &lt;/a&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;h3&gt;Viewing Monitoring data for GKE from a log line&lt;/h3&gt;From a &lt;i&gt;k8s_container, k8s_pod, k8s_node, or k8s_cluster&lt;/i&gt; log, select the blue chip with the resource.labels resource name and then select “View Monitoring details” to access an integrated metrics panel directly from the Logs Explorer. Selecting “View in GKE” opens the detailed view of the GKE resource in the Cloud Console on a new tab.&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/images/2_Viewing_Monitoring_data_for_GKE_from_a_l.max-1000x1000.jpg"
        
          alt="2 Viewing Monitoring data for GKE from a log line.jpg"&gt;
        
        &lt;/a&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;p&gt;The metrics panel provides a lot of contextual data including &lt;i&gt;alerts, Kubernetes events&lt;/i&gt; and &lt;i&gt;metrics&lt;/i&gt; related to the GKE resource.&lt;/p&gt;&lt;h3&gt;Alerts &lt;/h3&gt;&lt;p&gt;&lt;a href="https://cloud.google.com/monitoring/alerts"&gt;Alerts&lt;/a&gt; triggered by the GKE resource are displayed under the alerts tab. The color-coded alert status provides an easy way to see ongoing, acknowledged and closed incidents. Selecting “VIEW INCIDENT” opens the incident details in Cloud Monitoring. If you want to create a new alert, use the link to create a brand new alert policy.&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/images/3_Alerts.max-1000x1000.jpg"
        
          alt="3 Alerts.jpg"&gt;
        
        &lt;/a&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;h3&gt;Kubernetes events for clusters and pods&lt;/h3&gt;&lt;p&gt;The metrics panel provides select events for clusters and pods.  For each event, the name, associated resource and a link to view/copy the log message are displayed. Kubernetes events can provide important information to help determine the root cause of an issue. For example, if a FailedScheduling event is displayed, this can quickly guide troubleshooting to check the resources available to the Kubernetes resource.&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/images/4_Kubernetes_events_for_clusters_and_pods_.max-1000x1000.jpg"
        
          alt="4 Kubernetes events for clusters and pods .jpg"&gt;
        
        &lt;/a&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;h3&gt;Metrics for containers, pods and nodes&lt;/h3&gt;&lt;p&gt;The metrics tab contains metrics bundles for container (default), pod and node metrics collected from the GKE cluster and reported in Cloud Monitoring. Each metric bundle offers pre-built charts that can be selected to view the CPU, memory, storage and container restarts. For example, by looking at the CPU or memory, you can determine whether there were any spikes in the metrics for the Kubernetes resources.&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/images/5_Metrics_for_containers_pods_and_nodes.max-1000x1000.jpg"
        
          alt="5 Metrics for containers, pods and nodes.jpg"&gt;
        
        &lt;/a&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;h3&gt;More to come&lt;/h3&gt;&lt;p&gt;We’re committed to making &lt;a href="https://cloud.google.com/products/operations"&gt;Google Cloud’s operations suite&lt;/a&gt; the best place to troubleshoot your GKE apps. We’ve integrated logs directly into GKE resource details pages and built a specialized integrated GKE Dashboard, all to make it easier to troubleshoot GKE apps. However, there is still more coming and we’re already working hard to add new features to the metrics panels to surface even more context for troubleshooting GKE apps.&lt;/p&gt;&lt;h3&gt;Get started today&lt;/h3&gt;&lt;p&gt;If you haven’t already, to get started with Cloud Logging and Cloud Monitoring on GKE, view&lt;a href="https://cloud.google.com/monitoring/kubernetes-engine/observing"&gt; documentation&lt;/a&gt;, watch a quick video on &lt;a href="https://youtu.be/--4WWwx4Log" target="_blank"&gt;troubleshooting services on GKE&lt;/a&gt; and join the discussion in our new &lt;a href="https://www.googlecloudcommunity.com/gc/Cloud-Operations/bd-p/cloud-operations" target="_blank"&gt;Cloud Operations page&lt;/a&gt; on the Google Cloud Community site.&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-related_article_tout"&gt;





&lt;div class="uni-related-article-tout h-c-page"&gt;
  &lt;section class="h-c-grid"&gt;
    &lt;a href="https://cloud.google.com/blog/products/operations/gke-operations-magic-alert-resolution-5-steps/"
       data-analytics='{
                       "event": "page interaction",
                       "category": "article lead",
                       "action": "related article - inline",
                       "label": "article: {slug}"
                     }'
       class="uni-related-article-tout__wrapper h-c-grid__col h-c-grid__col--8 h-c-grid__col-m--6 h-c-grid__col-l--6
        h-c-grid__col--offset-2 h-c-grid__col-m--offset-3 h-c-grid__col-l--offset-3 uni-click-tracker"&gt;
      &lt;div class="uni-related-article-tout__inner-wrapper"&gt;
        &lt;p class="uni-related-article-tout__eyebrow h-c-eyebrow"&gt;Related Article&lt;/p&gt;

        &lt;div class="uni-related-article-tout__content-wrapper"&gt;
          &lt;div class="uni-related-article-tout__image-wrapper"&gt;
            &lt;div class="uni-related-article-tout__image" style="background-image: url('https://storage.googleapis.com/gweb-cloudblog-publish/images/18_-_Infrastructure_urFj7Af.max-500x500.jpg')"&gt;&lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="uni-related-article-tout__content"&gt;
            &lt;h4 class="uni-related-article-tout__header h-has-bottom-margin"&gt;GKE operations magic: From an alert to resolution in 5 steps&lt;/h4&gt;
            &lt;p class="uni-related-article-tout__body"&gt;Teams operating microservices increasingly rely on metrics, logs, and traces to identify and troubleshoot problems. The GKE Dashboard bri...&lt;/p&gt;
            &lt;div class="cta module-cta h-c-copy  uni-related-article-tout__cta muted"&gt;
              &lt;span class="nowrap"&gt;Read Article
                &lt;svg class="icon h-c-icon" role="presentation"&gt;
                  &lt;use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#mi-arrow-forward"&gt;&lt;/use&gt;
                &lt;/svg&gt;
              &lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;/section&gt;
&lt;/div&gt;

&lt;/div&gt;</description><pubDate>Tue, 10 Aug 2021 16:00:00 +0000</pubDate><guid>https://cloud.google.com/blog/products/operations/troubleshoot-gke-faster-with-monitoring-data-in-your-logs/</guid><category>GKE</category><category>Compute Engine</category><category>Google Cloud</category><category>DevOps &amp; SRE</category><category>Cloud Operations</category><og xmlns:og="http://ogp.me/ns#"><type>article</type><title>Troubleshoot GKE apps faster with monitoring data in Cloud Logging</title><description></description><site_name>Google</site_name><url>https://cloud.google.com/blog/products/operations/troubleshoot-gke-faster-with-monitoring-data-in-your-logs/</url></og><author xmlns:author="http://www.w3.org/2005/Atom"><name>Charles Baer</name><title>Product Manager, Google Cloud</title><department></department><company></company></author></item><item><title>Use log buckets for data governance, now supported in 23 regions</title><link>https://cloud.google.com/blog/products/operations/keep-your-logs-data-compliant-with-regional-log-buckets/</link><description>&lt;div class="block-paragraph"&gt;&lt;p&gt;Logs are an essential part of troubleshooting applications and services. However, ensuring your developers, DevOps, ITOps, and SRE teams have access to the logs they need, while accounting for operational tasks such as scaling up, access control, updates, and keeping your data compliant, can be challenging. To help you offload these operational tasks associated with running your own logging stack, we offer &lt;a href="https://cloud.google.com/logging"&gt;Cloud Logging&lt;/a&gt;. If you don’t need to worry about data residency, Cloud Logging will pick a region to store and process your logs. &lt;/p&gt;&lt;p&gt;If you do have data governance and compliance requirements, we’re excited to share that Cloud Logging now offers even more flexibility and control by providing you a choice of which region to store and process your logging data. In addition to the information below, we recently &lt;a href="https://cloud.google.com/resources/data-governance-logs-best-practices-whitepaper"&gt;published a whitepaper&lt;/a&gt; that details compliance best practices for logs data.&lt;/p&gt;&lt;p&gt;Choose from 23 regions to help keep your logs data compliant&lt;/p&gt;&lt;p&gt;Log entries from apps and services running on Google Cloud will automatically be received by Cloud Logging within the region where the resource is running. From there, logs will be stored in log buckets. Log buckets have many attributes in common with Cloud Storage buckets, including the ability to:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;&lt;a href="https://cloud.google.com/logging/docs/storage#logs-retention"&gt;Set retention&lt;/a&gt; from 1 day to 10 years&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;a href="https://cloud.google.com/logging/docs/buckets#locking-logs-buckets"&gt;Lock a log bucket&lt;/a&gt; to prevent anyone from deleting logs or reducing the retention period of the bucket&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;a href="https://cloud.google.com/logging/docs/regionalized-logs"&gt;Choose a region&lt;/a&gt; for your log bucket. We recently introduced support for 23 regions to host your log buckets:&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;a href="https://cloud.google.com/about/locations/#europe"&gt;Europe&lt;/a&gt; - &lt;code&gt;europe-central2&lt;/code&gt;, &lt;code&gt;europe-north1&lt;/code&gt;, &lt;code&gt;europe-west1&lt;/code&gt;, &lt;code&gt;europe-west2&lt;/code&gt;, &lt;code&gt;europe-west3&lt;/code&gt;, &lt;code&gt;europe-west4&lt;/code&gt;, &lt;code&gt;europe-west6&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;a href="https://cloud.google.com/about/locations/#americas"&gt;Americas&lt;/a&gt; - &lt;code&gt;us-central1&lt;/code&gt;, &lt;code&gt;us-east1&lt;/code&gt;, &lt;code&gt;us-east4&lt;/code&gt;, &lt;code&gt;us-west1&lt;/code&gt;, &lt;code&gt;us-west2&lt;/code&gt;, &lt;code&gt;us-west3&lt;/code&gt;, &lt;code&gt;northamerica-northeast1&lt;/code&gt;, &lt;code&gt;southamerica-east1&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;a href="https://cloud.google.com/about/locations/#asia-pacific"&gt;Asia Pacific&lt;/a&gt; - &lt;code&gt;asia-east1&lt;/code&gt;, &lt;code&gt;asia-east2&lt;/code&gt;, &lt;code&gt;asia-northeast1&lt;/code&gt;, &lt;code&gt;asia-northeast2&lt;/code&gt;, &lt;code&gt;asia-northeast3&lt;/code&gt;, &lt;code&gt;asia-south1&lt;/code&gt;, &lt;code&gt;asia-southeast1&lt;/code&gt;, &lt;code&gt;australia-southeast1&lt;/code&gt;    &lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;How to create a log bucket&lt;/h3&gt;&lt;p&gt;You can get started with regionalized log storage in less than five minutes.&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;Go to the Cloud Console and go to Logging&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Navigate to Logs Storage and click on “Create logs bucket”&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Name the log bucket and choose the desired region. &lt;b&gt;Note that the region cannot be changed later.&lt;/b&gt; &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Set the retention period and then click Create Bucket.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;div class="block-image_full_width"&gt;






  
    &lt;div class="article-module h-c-page"&gt;
      &lt;div class="h-c-grid"&gt;
  

    &lt;figure class="article-image--large
      
      
        h-c-grid__col
        h-c-grid__col--6 h-c-grid__col--offset-3
        
        
      "
      &gt;

      
      
        
        &lt;img
            src="https://storage.googleapis.com/gweb-cloudblog-publish/original_images/create_log_bucket.gif"
        
          alt="create log bucket.gif"&gt;
        
        &lt;/a&gt;
      
    &lt;/figure&gt;

  
      &lt;/div&gt;
    &lt;/div&gt;
  




&lt;/div&gt;
&lt;div class="block-paragraph"&gt;&lt;p&gt;Once you have created the bucket, you need to point the incoming logs to that bucket. To complete this:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;Go to the Logs Router section of the Cloud Console and click on the dots to the right of the _Default sink. &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Select “Edit Sink”&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Under Sink Destination, change the log bucket selected from “projects/.../_Default” to “projects/.../ (name of newly created bucket)”. &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Scroll to the bottom and select “Update sink” to save the changes&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;If you need more detailed information on this topic, please see our &lt;a href="https://services.google.com/fh/files/misc/whitepaper_data_governance_logs_how_to.pdf" target="_blank"&gt;step by step getting started guide&lt;/a&gt; for overcoming common logs data compliance challenges. &lt;/p&gt;&lt;h3&gt;More about data residency in Cloud Logging&lt;/h3&gt;&lt;p&gt;We have covered a lot of information about logs in this blog. For more on this topic and other best practices for compliance with logs data, please download this &lt;a href="https://cloud.google.com/resources/data-governance-logs-best-practices-whitepaper"&gt;whitepaper&lt;/a&gt;. We hope this helps you focus on managing your apps rather than your operations. If you would like to pose a question or join the conversation about Google Cloud operations with other professionals, please visit our &lt;a href="https://www.googlecloudcommunity.com/gc/Cloud-Operations/bd-p/cloud-operations" target="_blank"&gt;new community page&lt;/a&gt;. Happy Logging!&lt;/p&gt;&lt;/div&gt;
&lt;div class="block-related_article_tout_external"&gt;





&lt;div class="uni-related-article-tout h-c-page"&gt;
  &lt;section class="h-c-grid"&gt;
    &lt;a href=""
       data-analytics='{
                       "event": "page interaction",
                       "category": "article lead",
                       "action": "related article - inline",
                       "label": "article: {slug}"
                     }'
       class="uni-related-article-tout__wrapper h-c-grid__col h-c-grid__col--8 h-c-grid__col-m--6 h-c-grid__col-l--6
        h-c-grid__col--offset-2 h-c-grid__col-m--offset-3 h-c-grid__col-l--offset-3 uni-click-tracker"&gt;
      &lt;div class="uni-related-article-tout__inner-wrapper"&gt;
        &lt;p class="uni-related-article-tout__eyebrow h-c-eyebrow"&gt;Related Article&lt;/p&gt;

        &lt;div class="uni-related-article-tout__content-wrapper"&gt;
          &lt;div class="uni-related-article-tout__image-wrapper"&gt;
            &lt;div class="uni-related-article-tout__image" style="background-image: url('')"&gt;&lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="uni-related-article-tout__content"&gt;
            &lt;h4 class="uni-related-article-tout__header h-has-bottom-margin"&gt;&lt;/h4&gt;
            &lt;p class="uni-related-article-tout__body"&gt;&lt;/p&gt;
            &lt;div class="cta module-cta h-c-copy  uni-related-article-tout__cta muted"&gt;
              &lt;span class="nowrap"&gt;Read Article
                &lt;svg class="icon h-c-icon" role="presentation"&gt;
                  &lt;use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#mi-arrow-forward"&gt;&lt;/use&gt;
                &lt;/svg&gt;
              &lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;/section&gt;
&lt;/div&gt;

&lt;/div&gt;</description><pubDate>Mon, 09 Aug 2021 16:00:00 +0000</pubDate><guid>https://cloud.google.com/blog/products/operations/keep-your-logs-data-compliant-with-regional-log-buckets/</guid><category>GKE</category><category>Compute</category><category>Google Cloud</category><category>DevOps &amp; SRE</category><category>Cloud Operations</category><og xmlns:og="http://ogp.me/ns#"><type>article</type><title>Use log buckets for data governance, now supported in 23 regions</title><description></description><site_name>Google</site_name><url>https://cloud.google.com/blog/products/operations/keep-your-logs-data-compliant-with-regional-log-buckets/</url></og><author xmlns:author="http://www.w3.org/2005/Atom"><name>Mary Koes</name><title>Product Manager, Google Cloud</title><department></department><company></company></author><author xmlns:author="http://www.w3.org/2005/Atom"><name>Andrew Eames</name><title>Software Engineer</title><department></department><company></company></author></item></channel></rss>