Skip to content

Latest commit

 

History

History
 
 

cloud-client

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Getting Started with Google Stackdriver Monitoring API and the Google Cloud Client libraries

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

These sample Java applications demonstrate how to access the Stackdriver Monitoring API using the Google Cloud Client Library for Java.

Quickstart

Install Maven.

Build your project with:

mvn clean package -DskipTests

You can then run a given ClassName via:

mvn exec:java -Dexec.mainClass=com.example.monitoring.ClassName \
    -DpropertyName=propertyValue \
	-Dexec.args="arg1 'arg 2' arg3"

Write a time series to a metric (using the quickstart sample)

mvn exec:java -Dexec.mainClass=com.example.monitoring.QuickstartSample \
    -DprojectId=YOUR_PROJECT_ID