Monitoring a webserver using Stackdriver Monitoring
Stackdriver Monitoring is a service of GCP, which tracks the performance of instances and services running on them. Using this service, we can monitor the servers health and hence that of the applications running on them. The service also enables us to create custom metrics and visualize them on dashboards.
To play with the features of Stackdriver Monitoring, we'll setup a new Stackdriver account, install Stackdriver agents on an instance, monitor the instance, create alerting policies, and create metrics dashboard.
Getting ready
The following are the initial setup verification and network creation steps before the recipe can be executed:
- Create or select a GCP project
- Enable billing and enable the default APIs (some APIs such as BigQuery, storage, monitoring, and few others are enabled automatically)
How to do it...
In this recipe we'll create an alerting policy to see if the application is up and running. Additionally, we'll also set up an uptime...