@@ -21,13 +21,15 @@ This client supports the following Google Cloud Platform services:
2121- `Google BigQuery `_
2222- `Google Cloud Resource Manager `_
2323- `Google Stackdriver Logging `_
24+ - `Google Stackdriver Monitoring `_
2425
2526.. _Google Cloud Datastore : https://github.com/GoogleCloudPlatform/gcloud-python#google-cloud-datastore
2627.. _Google Cloud Storage : https://github.com/GoogleCloudPlatform/gcloud-python#google-cloud-storage
2728.. _Google Cloud Pub/Sub : https://github.com/GoogleCloudPlatform/gcloud-python#google-cloud-pubsub
2829.. _Google BigQuery : https://github.com/GoogleCloudPlatform/gcloud-python#google-bigquery
2930.. _Google Cloud Resource Manager : https://github.com/GoogleCloudPlatform/gcloud-python#google-cloud-resource-manager
30- .. _Google Stackdriver Logging : https://github.com/GoogleCloudPlatform/gcloud-python#google-cloud-logging
31+ .. _Google Stackdriver Logging : https://github.com/GoogleCloudPlatform/gcloud-python#google-stackdriver-logging
32+ .. _Google Stackdriver Monitoring : https://github.com/GoogleCloudPlatform/gcloud-python#google-stackdriver-monitoring
3133
3234If you need support for other Google APIs, check out the
3335`Google APIs Python Client library `_.
@@ -268,6 +270,44 @@ to Stackdriver Logging using this Client Library.
268270
269271.. _logging documentation : https://googlecloudplatform.github.io/gcloud-python/stable/logging-usage.html
270272
273+ Google Stackdriver Monitoring
274+ -----------------------------
275+
276+ `Stackdriver Monitoring `_ (`Monitoring API docs `_) collects metrics,
277+ events, and metadata from Google Cloud Platform, Amazon Web Services (AWS),
278+ hosted uptime probes, application instrumentation, and a variety of common
279+ application components including Cassandra, Nginx, Apache Web Server,
280+ Elasticsearch and many others. Stackdriver ingests that data and generates
281+ insights via dashboards, charts, and alerts.
282+
283+ This package currently supports all Monitoring API operations other than
284+ writing custom metrics.
285+
286+ .. _Stackdriver Monitoring : https://cloud.google.com/monitoring/
287+ .. _Monitoring API docs : https://cloud.google.com/monitoring/api/ref_v3/rest/
288+
289+ List available metric types:
290+
291+ .. code :: python
292+
293+ from gcloud import monitoring
294+ client = monitoring.Client()
295+ for descriptor in client.list_metric_descriptors():
296+ print (descriptor.type)
297+
298+ Display CPU utilization across your GCE instances during the last five minutes:
299+
300+ .. code :: python
301+
302+ metric = ' compute.googleapis.com/instance/cpu/utilization'
303+ query = client.query(metric, minutes = 5 )
304+ print (query.as_dataframe())
305+
306+ See the ``gcloud-python `` API `monitoring documentation `_ to learn how to connect
307+ to Stackdriver Monitoring using this Client Library.
308+
309+ .. _monitoring documentation : https://googlecloudplatform.github.io/gcloud-python/stable/monitoring-usage.html
310+
271311Contributing
272312------------
273313
0 commit comments