Skip to content

Latest commit

 

History

History
57 lines (35 loc) · 1.69 KB

README.md

File metadata and controls

57 lines (35 loc) · 1.69 KB

Google Cloud Platform logo

Stackdriver Monitoring Node.js samples

Stackdriver Monitoring 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.

Table of Contents

Setup

  1. Read Prerequisites and How to run a sample first.

  2. Install dependencies:

     npm install
    

Samples

List resources

list_resources.js is a command-line program to demonstrate connecting to the Google Monitoring API to retrieve API data.

View the documentation or the source code.

Run the sample:

node list_resources <your-project-id>

Custom metric

create_custom_metric.js demonstrates how to create a custom metric, write a timeseries value to it, and read it back.

View the documentation or the source code.

Run the sample:

node create_custom_metric <your-project-id>