Monitoring mainly involves metrics, time series, and resources. Metrics help us get a better idea of how our deployments or applications are performing. Monitoring applies to resources, access, and activities. Here, we will understand it using a Compute Engine VM:
- Create a Compute Engine VM (we will create one called lamp-1 with the Debian OS) and SSH into it. For more information on how to create a Compute Engine VM instance, refer to Chapter 3, Compute Choices – VMs and the Google Compute Engine. Make sure you allow both HTTP and HTTPS traffic, to make network activity monitoring more efficient.
- Install the Apache2 HTTP server with the following commands:
sudo apt-get update
sudo apt-get install apache2 php7.0
- Go to the Stackdriver monitoring homepage using the following link and sign in using your GCP account. You will be given free 30-day-trial access...