diff --git a/README.md b/README.md index 83dfd7e5d79..a3c723530eb 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ This client supports the following Google Cloud Platform services: * [Google Cloud Speech](#google-cloud-speech-beta) (Beta) * [Google Cloud Vision](#google-cloud-vision-beta) (Beta) * [Stackdriver Logging](#stackdriver-logging-beta) (Beta) +* [Stackdriver Monitoring](#stackdriver-monitoring-beta) (Beta) If you need support for other Google APIs, check out the [Google Node.js API Client library][googleapis]. @@ -1139,6 +1140,49 @@ loggingClient.getEntries(function(err, entries) { ``` +## Stackdriver Monitoring (Beta) + +> **This is a Beta release of Stackdriver Monitoring.** This API is not covered by any SLA or deprecation policy and may be subject to backward-incompatible changes. + +### :warning: This is an auto-generated API + +It does not follow the conventions you're familiar with from other parts of our library. A handwritten layer is not yet available. + +The example below shows you how to instantiate the generated client. For further documentation, please browse the [Monitoring .proto files][cloud-monitoring-protos] on GitHub. + +- [Official Documentation][cloud-monitoring-docs] + +#### Using the all-in-one module + +``` +$ npm install --save google-cloud +``` + +```js +var gcloud = require('google-cloud'); +var monitoring = gcloud.monitoring; +``` + +#### Using the Stackdriver Monitoring API module + +``` +$ npm install --save @google-cloud/monitoring +``` + +```js +var monitoring = require('@google-cloud/monitoring'); +``` + +#### Preview + +```js +var monitoringClient = monitoring.v3({ + projectId: 'grape-spaceship-123', + keyFilename: '/path/to/keyfile.json' +}); +``` + + ## Contributing Contributions to this library are always welcome and highly encouraged. @@ -1196,6 +1240,9 @@ Apache 2.0 - See [COPYING](COPYING) for more information. [cloud-language-docs]: https://cloud.google.com/natural-language/docs +[cloud-monitoring-docs]: https://cloud.google.com/monitoring/docs +[cloud-monitoring-protos]: https://github.com/googleapis/googleapis/tree/master/google/monitoring/v3 + [cloud-logging-docs]: https://cloud.google.com/logging/docs [cloud-prediction-docs]: https://cloud.google.com/prediction/docs diff --git a/packages/google-cloud/package.json b/packages/google-cloud/package.json index 51ced245377..16c2609bff5 100644 --- a/packages/google-cloud/package.json +++ b/packages/google-cloud/package.json @@ -104,6 +104,7 @@ "@google-cloud/dns": "^0.3.0", "@google-cloud/language": "^0.5.0", "@google-cloud/logging": "^0.5.0", + "@google-cloud/monitoring": "^0.1.1", "@google-cloud/prediction": "^0.3.0", "@google-cloud/pubsub": "^0.5.0", "@google-cloud/resource": "^0.3.0", diff --git a/packages/google-cloud/src/index.js b/packages/google-cloud/src/index.js index b4a9e88779f..d5055b43594 100644 --- a/packages/google-cloud/src/index.js +++ b/packages/google-cloud/src/index.js @@ -175,6 +175,43 @@ var apis = { */ logging: require('@google-cloud/logging'), + /** + * [Stackdriver Monitoring](https://cloud.google.com/monitoring/docs) collects + * metrics, events, and metadata from Google Cloud Platform, Amazon Web + * Services (AWS), hosted uptime probes, application instrumentation, and a + * variety of common application components including Cassandra, Nginx, Apache + * Web Server, Elasticsearch and many others. Stackdriver ingests that data + * and generates insights via dashboards, charts, and alerts. + * + *
+ * **This is a Beta release of Stackdriver Monitoring.** This API is not + * covered by any SLA or deprecation policy and may be subject to + * backward-incompatible changes. + *
+ * + *