Monitoring Query Language (MQL)
-
MQL provides an expressive, text-based interface to Cloud Monitoring time-seris data.
-
Create a vm & Once the vm is created
- Select Metrics => Metrics Explorer
- Select Metrics => Metrics Explorer
-
for mql language reference Refer Here
-
for mql examples Refer Here
Using Custom Metrics
- In GCP Custom metrics can be created in two ways
- Custom Metrics with OpenCensus Refer Here
- Creating Custom metrics using Cloud Monitoring Api Refer Here
Cloud Logging
- This allows us to store, search, analyze and alert on logging data event from Google cloud
- Refer Here for the code samples to write the logs using various programming languages