Cloud Monitoring metrics get 10-second resolution

Cloud Monitoring metrics get 10-second resolution

Now you can write custom and Prometheus metrics for Cloud Monitoring every 10 seconds. Higher resolution metrics are critical for monitoring dynamically changing environments and rapidly changing application metrics. Examples where high resolution metrics are critical include high volume e-commerce, live streaming, autoscaling bursty workloads on Kubernetes clusters, and more. Higher resolution custom, Prometheus, and agent metrics are now generally available, and can be written at a granularity of 10 seconds. Previously these metric types could only be written once every 60 seconds.

Higher resolution metrics are critical for monitoring dynamically changing environments and rapidly changing application metrics. Examples where high resolution metrics are critical include high volume e-commerce, live streaming, autoscaling bursty workloads on Kubernetes clusters, and more. Higher resolution customPrometheus, and agent metrics are now generally available, and can be written at a granularity of 10 seconds. Previously these metric types could only be written once every 60 seconds.

How to write Monitoring agent metrics at 10-second resolution

The Cloud Monitoring agent is a collectd-based daemon that collects system and application metrics from virtual machine instances and sends them to Cloud Monitoring. The Monitoring agent collects disk, CPU, network, and process metrics. By default, agent metrics are written at 60-second granularity. You can modify the agent collectd.conf configuration to send metrics at 10-second granularity by changing the Interval value to ‘10’ in the Monitoring agent’s collectd.conf file.

After making this change, you will need to restart your agent (this may differ based on your operating system and distro):

sudo service stackdriver-agent restart

Higher resolution agent metrics require Monitoring agent version 6.0.1 or greater. You can find documentation for determining your agent version here.

Now that your Monitoring agent is emitting metrics at 10-second granularity, you can view them in Metrics Explorer by searching for metrics with the prefix “agent.googleapis.com/agent/”.

1 Metrics Explorer.jpg

How to write custom metrics at 10-second resolution

Custom metrics allow you to define and collect metric data that built-in Google Cloud metrics cannot provide. These could be specific to your application, infrastructure, or business. For example: “Latency of the shopping cart service” or “Returning customer rate” in an e-commerce application.

Custom metrics can be written in a variety of ways: via the Monitoring APICloud Monitoring client librariesOpenCensus/OpenTelemetry libraries, or the Cloud Monitoring agent.

We recommend using the OpenCensus libraries to write custom metrics for several reasons:

  1. It is open source and supports a wide range of languages and frameworks.
  2. OpenCensus provides vendor-agnostic support for the collection of metric and trace data.
  3. OpenCensus provides optimized collection of points and batching of Monitoring API calls. It also handles timing API calls for 10-second resolution and other time intervals, so that the Monitoring API won’t reject points for being written too frequently. It also handles retries, exponential backoff, and more, helping to ensure that your metric points make it to the monitoring system.
  4. OpenCensus allows you to export the collected data to a variety of backend applications and monitoring services, including Cloud Monitoring.

google cloud platform management tools cloud cloud computing

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Overview of Google Cloud Essentials Quest

If you looking to learn about Google Cloud in depth or in general with or without any prior knowledge in cloud computing, then you should definitely check this quest out.

Multi-cloud Spending: 8 Tips To Lower Cost

Mismanagement of multi-cloud expense costs an arm and leg to business and its management has become a major pain point. Here we break down some crucial tips to take some of the management challenges off your plate and help you optimize your cloud spend.

Google Cloud Training | Google Cloud Platform Course | Google Cloud for Beginners

**Link: https://www.youtube.com/watch?v=gud65lqebrc** In this [**Google Cloud Training**](https://www.youtube.com/watch?v=gud65lqebrc "Google Cloud Training") live session, you will know everything about google cloud from basic to advance level...

Learn how to use Compute Engine OS patch management service

When patching your Compute Engine VMs, sometimes there are some pre- and post- steps you should automate. In April, we announced the general availability of Google Cloud’s OS patch management service to protect your running VMs against defects and vulnerabilities. This service works on Compute Engine and across Windows and Linux OS environments. In this blog, we share how to orchestrate your patch deployment using pre-patch and post-patch scripts.

Cost management tools in Google Cloud Console

Google Cloud Console features cost management tools to help financial operations (FinOps) teams analyze and predict their organization’s cloud costs. Invoices are an important part of your ability to record and track spending and attribute it back to purchase orders and department budgets. They’re also often required for enterprises by law for financial record keeping and audits.