Monitoring Microservices with Weave Cortex
Microservices running in containers are by nature dynamic environments that can make monitoring your app a challenge. Containers may be spread across multiple clouds or they may span both a data center and a cloud. Since containers go down and spin back up again sometimes on different servers or even regions, traditional monitoring systems which are typically server-focused, don’t work that well.
Weave Cortex is built upon the open source project Prometheus, and makes use of Prometheus' ability to scrape metrics across Kubernetes pods. Weave Cortex listens for the Prometheus metrics and automatically pushes them to Weave Cloud, where they can be queried and graphed.
In this scenario, you will use the sample app, ‘The Sock Shop’, deploy it to a Kubernetes cluster and then launch the Cortex Agent to it and monitor app and infrastructure metrics from within Weave Cloud.
In this scenario, you used Weave Cloud to monitor your app and its network.
With Weave Cloud view and monitor your microservices from one convenient dashboard, and together with automated continuous delivery built with your favorite tools, deliver high quality code more rapidly.
Weave Scope allows developers to explore application deployments and their dependencies.
Weave Flux manages the automation of deployments, and automatically rolls out new versions if the Docker Image changes.
Prometheus and Weave Cortex automatically aggregates and pushes application metrics to Weave Cloud.
Weave Net enforces secure cross-cloud communication between containers using Kubernetes Network Policy.
Try it on your own infrastructure by following the Weave Cloud guides series.
Step 1 - Sign Up To Weave Cloud
Weave Cortex is viewed from within Weave Cloud. It is accepts metrics from the Prometheus daemon once it has been deployed to your cluster.
1. To begin, sign up for Weave Cloud .
2. Select 'Create New Instance...' from the drop down in the header and call it Katacoda.
3. Weave Cloud assigns each new instance a Service Token, which is found on on a panel beneath the help text.
Enter the Service Token into the terminal window. It will be used later in this tutorial when the Weave Scope probes are launched onto your hosts.
The Service Token can always be accessed by clicking on the Settings icon from the header in Weave Cloud.