Cloud Monitoring
1. Cloud Monitoring
Monitoring and logging are often coupled to provide a complete picture of the system status and past trends. Monitoring can also reveal trends and patterns that can help size and scale systems over time. When it comes to monitoring Kubernetes, it’s less about watching the clusters and nodes, and more about monitoring your application’s current state—and anything that might be impeding it. If you’re able to accurately monitor the state of these services, including the throughput and latency, you’re more likely to identify performance bottlenecks. For example, through aggregated logging and debugging, you can diagnose application code issues. In Kubernetes, monitoring can be broken into two domains. One domain is the cluster, which involves monitoring the cluster-level components like individual nodes, kube-APIserver, and kube-controller-manager. The second monitoring domain is the Pods, including the containers and the applications that run inside them. Cluster monitoring refers to the cluster services, nodes, and other infrastructure elements. This can be accomplished using the monitoring in the Cloud Console, or through Cloud Monitoring, using health checks and dashboards. Pod Monitoring can be divided into several sub-categories. System metrics include container deployments, instances, health checks, and state. Container-specific metrics such as the resource consumption. And application-specific metrics, which are designed by the application developer and exposed to a monitoring solution. This is an ideal use case for Google Cloud Managed Service for Prometheus. Users can export their metrics as Prometheus metrics to access the advanced monitoring features of Prometheus. Unlike traditional server monitoring, where you specify a hostname to monitor, the abstraction layers in Kubernetes—well, containers in general—require a different approach. Instead of having a specific hostname or IP address to be monitored, all resources in Kubernetes are labeled. These labels provide a logical approach to organizing resources, and also make it easier to monitor specific systems or subsystems by selecting a combination of different labels. In Cloud Monitoring, as well as other tools, you can filter logs by label. A Kubernetes label consists of a key and a value. This means that if you apply a label with the key defined as “environment” and the value defined as “production” to all the components of your production environment, you can use that label in Cloud Monitoring. Cloud Monitoring provides visibility into the overall health of your GKE cluster and the Pods it contains through custom dashboards. Key features include the ability to use uptime checks to monitor the availability of Kubernetes resources within a cluster as well as control plane metrics, along with other Google Cloud resources that are being used. Integration with Cloud Logging to leverage custom metrics and even monitor your logging-based custom metrics. The ability to use custom metrics to create alerting policies, which can improve the signal-to-noise ratio of your alert messages. Cloud Monitoring is optimized for Kubernetes, because it lets you observe your entire Kubernetes environment to see metrics, logs, traces, events, and metadata in one place. Imagine that your application has an error. With Cloud Monitoring, you can analyze infrastructure metrics, application metrics, or even logs directly from a single dashboard. It supports multi-cluster monitoring within the Google Cloud environment, along with other cloud environments and on-premises Kubernetes environments. And it offers extended direct support to Prometheus. Cloud Monitoring also provides direct integration to Google Cloud Managed Service for Prometheus, which is an open-source monitoring and alerting toolkit that collects and stores time-series data. Cloud Monitoring can only monitor what it can see. So, to extract more information from Cloud Monitoring, you need to add more information. That’s where Prometheus can help. Prometheus can provide detailed metrics about Kubernetes components, including metrics from within the applications running in your Pods, and then expose those metrics to Cloud Monitoring, which provides you with much more granular detail than Cloud Monitoring alone.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.