- Cloud Monitoring collects metrics, events, and metadata, hosted uptime probes, and application instrumentation to gain visibility into the performance, availability, and health of your applications and infrastructure.
- Collect metrics from multicloud and hybrid infrastructure in real time.
- Metrics, events, and metadata are displayed with rich query language that helps identify issues and uncover significant patterns.
- Reduces time spent navigating between systems with one integrated service for metrics, uptime monitoring, dashboards, and alerts.
- Cloud Monitoring utilizes workspaces to organize and manage its information.
- A Workspace can manage the monitoring data for a single Google Cloud project, or it can manage the data for multiple Google Cloud projects and AWS accounts.
- But, a Google Cloud project or an AWS account can only be associated with one Workspace at a time.
- You must have at least one of the following IAM role name for the Google Cloud project to create a Workspace:
- Monitoring Editor
- Monitoring Admin
- Project Owner
- The Cloud Monitoring agent is a
collectd-based daemon that collects application and system metrics from virtual machine (VM) instances.
- The Monitoring agent collects disk, network, CPU, and process metrics by default.
- You can configure the Monitoring agent to monitor third-party applications.
- Monitoring charges only for the volume of ingested metric data and Cloud Monitoring API read calls that exceed the free monthly allotment.
- Non-chargeable metrics and Cloud Monitoring API write calls don’t count towards the allotment limit.
You are managing your company’s cloud resources that are residing in multiple GCP projects. You are tasked to set up centralized monitoring of all the CPU, memory, and disk metrics of your resources. You want to follow Google’s recommended best practices.
What should you do?
- Create an export sink on each project. Export the logs on a single BigQuery dataset.
- Create a new project in Google Workspace. Add all the existing GCP projects to the new workspace.
- Enable Cloud Monitoring on all projects to monitor all resources. Create a custom application that processes metrics from Cloud Monitoring.
- Deploy Cloud Monitoring agent on all projects to collect metrics. Create an application that consumes and presents these metrics.