Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monitoring #301

Merged
merged 1 commit into from
Jan 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions monitoring/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,57 @@ including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others.

## Samples

### Metrics

View the [documentation][metrics_docs] or the [source code][metrics_code].

__Usage:__ `node metrics.js --help`

```
Commands:
create [projectId] Creates an example 'custom.googleapis.com/stores/daily_sales' custom metric
descriptor.
list [projectId] Lists metric descriptors.
get <metricId> [projectId] Get a metric descriptor.
delete <metricId> [projectId] Deletes a custom metric descriptor.
write [projectId] Writes example time series data to
'custom.googleapis.com/stores/daily_sales'.
read <filter> [projectId] Reads time series data that matches the given filter.
read-fields [projectId] Reads headers of time series data that matches
'compute.googleapis.com/instance/cpu/utilization'.
read-aggregate [projectId] Aggregates time series data that matches
'compute.googleapis.com/instance/cpu/utilization'.
read-reduce [projectId] Reduces time series data that matches
'compute.googleapis.com/instance/cpu/utilization'.
list-resources [projectId] Lists monitored resource descriptors.
get-resource <resourceType> [projectId] Get a monitored resource descriptor.

Options:
--help Show help [boolean]
--projectId, -p [string]

Examples:
node metrics.js create
node metrics.js list
node metrics.js get logging.googleapis.com/log_entry_count
node metrics.js delete
custom.googleapis.com/stores/daily_sales
node metrics.js list-resources
node metrics.js get-resource cloudsql_database
node metrics.js write
node metrics.js read
'metric.type="compute.googleapis.com/instance/cpu/utilizatio
n"'
node metrics.js read-fields
node metrics.js read-aggregate
node metrics.js read-reduce

For more information, see https://cloud.google.com/monitoring/docs
```

[metrics_docs]: https://cloud.google.com/monitoring/docs
[metrics_code]: metrics.js

### List resources

`list_resources.js` is a command-line program to demonstrate connecting to the Google
Expand Down
Loading