Get startedGet started for free

Cloud Monitoring and Cloud Logging

1. Cloud Monitoring and Cloud Logging

Now, let’s learn about Cloud Monitoring and Cloud Logging to see how you can monitor, troubleshoot, and improve application performance on your Google Cloud environment. Google Cloud Observability consists of multi-cloud monitoring and management products that aggregate metrics, logs, and events. It provides developers, operators, and security professionals a rich set of observable signals that speed root-cause analysis and reduce mean time to resolution. An effective incident response requires effective tools, such as monitoring dashboards, robust alerting mechanisms, and plans and tools for responding to actual events and issues when they occur. By default, a Google Cloud project has visibility only to the metrics it stores. However, you can expand the set of metrics that a project can access by adding other Google Cloud projects to the project's metrics scope. The metrics scope defines the set of Google Cloud projects whose metrics the current Google Cloud project can access. A scoping project hosts a metrics scope. Because every Google Cloud project hosts a metrics scope, every project is also a scoping project. The scoping project stores information about its metrics scope. It also stores the alerts, uptime checks, dashboards, and monitoring groups that you configure for the metrics scope. You can identify the scoping project for a metrics scope as the project selected by the console project picker. Google Cloud Observability provides performance and diagnostics data, in the form of monitoring, logging, tracing, error reporting, and alerting. This suite of products comprises Cloud Monitoring, Cloud Logging, Cloud Trace, Cloud Profiler, and Error Reporting. These diagnostics features are well-integrated with each other. This helps you connect and correlate diagnostics data easily. Cloud Monitoring helps increase reliability by giving users the ability to monitor Google Cloud and multi-cloud environments and identify trends to prevent issues. With Cloud Monitoring, you can reduce monitoring overhead and noise to fix problems faster. Cloud Monitoring enables you to monitor your platform, system, and application metrics. You ingest data into Cloud Logging and you can create different metrics, custom events, monitor for specific metadata changes. You can also monitor and measure uptime and health checks, build custom dashboards, and create alerts to perform notifications. Google Cloud Observability includes monitoring for App Engine flexible environment and App Engine standard environment, as well as Google Kubernetes Engine, and Istio. Istio is an open source independent service mesh. It reduces complexity of managing microservice deployments by providing a uniform way to secure, connect, and monitor microservices. It optimizes the communication between microservices within a deployment. After a metrics scope is created, you can immediately head to the Metrics Explorer and start visualizing those metrics from Istio. For other services without Cloud Monitoring built in, such as Compute Engine, there is an agent that can be installed. The Ops Agent is the primary agent for collecting telemetry from your Compute Engine instances. Combining logging and metrics into a single agent, the Ops Agent allows you to: Monitor your VM instances without the need for any additional configuration after the install; gain visibility into CPU, disk, and network performance; and unify the gathering of metrics and logs into a single agent. This replaces the legacy Logging and Monitoring agents Google Cloud offered. The monitoring agents can be configured to monitor popular third-party applications, which are highlighted on this slide. Monitoring agents on VM instances can transmit data for various metric types for these applications. These metrics can be used in charting or alerting within the workspace. Cloud Trace provides latency sampling and reporting for Google App Engine, including per-URL statistics and latency distributions. Error Reporting analyzes and aggregates the errors in your cloud applications and notifies you when new errors are detected. Cloud Profiler provides continuous profiling of resource consumption in your production applications, helping you identify and eliminate potential performance issues. Cloud Logging lets you manage and analyze log data from Google Cloud, as well as AWS, in one place. You can combine the power of Cloud Logging with Google Cloud’s data and analytics products for advanced, real-time log analysis. For example, you can create powerful real-time metrics from the log data and analyze log data in real time in BigQuery. Most Google Cloud services have Cloud Logging built in, such as App Engine flexible and standard environments, Kubernetes, Istio, Cloud Run functions, and Dataflow. Using Cloud Logging in a preconfigured environment is very straightforward. For example, to emit a log line from a Cloud Run function, write to standard output or standard error. There is no special logging framework or API required. Cloud Logging retains the logs for a limited number days. The number of days depends on the type of log. For example, Admin Activity audit logs are kept for 400 days, while Data Access audit logs are only kept for 30 days. For longer storage or analysis, logs can be exported to Cloud Storage, Pub/Sub, or BigQuery and then stored indefinitely. When you export logs to a BigQuery dataset, Cloud Logging creates dated tables to hold the exported log entries. Log entries are placed in tables whose names are based on the entries' log names.

2. Let's practice!

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.