- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud

Install and Configure Monitoring Agent with Google Cloud Monitoring
This lab will guide you in the process of installing the optional Monitoring agent on a pre-created Apache web server. Installing and configuring the Monitoring agent allows us to collect more detailed metrics that would not normally be possible, such as memory utilization and application-specific metrics. In this case, we will collect metrics from our Apache web server application.

Lab Info
Table of Contents
-
Challenge
Initialize Monitoring Workspace
- Within your lab project, create a new Cloud Monitoring Workspace, which will monitor only your project.
- Once the Workspace is initialized, go to the Compute Engine interface.
-
Challenge
Install Monitoring Agent on Compute Engine Instance
- Connect to the instance via SSH in the web console. All the below commands will be run in the instance terminal.
- Add the agent's installation location as a repository, and then update your repositories.
- Install the latest version of the Monitoring agent.
- Verify the agent is working as expected. You should receive feedback that the agent is active and initialization succeeded.
- Download the Apache configuration file into the agent's directory.
- Restart the agent.
- Exit SSH.
-
Challenge
Open the Demonstration Web Page and Generate Some Traffic
- Open the web server's website by clicking on the IP address from the Compute Engine screen.
- Refresh your page a few times to generate traffic.
-
Challenge
Confirm Agent Installation and Apache Configuration Success in Monitoring Workspace
- Go back to your Monitoring Workspace, and open Dashboards.
- You should see a new dashboard titled Apache HTTP Server. If it does not appear, wait a few minutes and refresh your screen again.
- Enter the dashboard once it does appear.
- View the available charts for:
- HOST (agent-less metrics)
- AGENT (non-application-specific, agent-collected metrics)
- APACHE (application-specific metrics)
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.