Skip to content

Commit 3a47626

Browse files
lukesneeringerAce Nassri
authored and
Ace Nassri
committed
Add Uptime Check Service, Migrate Repository (#2)
1 parent 1ebfc82 commit 3a47626

File tree

10 files changed

+431
-403
lines changed

10 files changed

+431
-403
lines changed

monitoring/snippets/.eslintrc.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
rules:
3+
no-console: off

monitoring/snippets/README.md

+11-35
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,22 @@
88

99
## Table of Contents
1010

11-
* [Setup](#setup)
11+
* [Before you begin](#before-you-begin)
1212
* [Samples](#samples)
1313
* [Metrics](#metrics)
1414
* [Uptime Config](#uptime-config)
15-
* [Running the tests](#running-the-tests)
1615

17-
## Setup
16+
## Before you begin
1817

19-
1. Read [Prerequisites][prereq] and [How to run a sample][run] first.
20-
1. Install dependencies:
21-
22-
With **npm**:
23-
24-
npm install
25-
26-
With **yarn**:
27-
28-
yarn install
29-
30-
[prereq]: ../README.md#prerequisites
31-
[run]: ../README.md#how-to-run-a-sample
18+
Before running the samples, make sure you've followed the steps in the
19+
[Before you begin section](../README.md#before-you-begin) of the client
20+
library's README.
3221

3322
## Samples
3423

3524
### Metrics
3625

37-
View the [documentation][metrics_0_docs] or the [source code][metrics_0_code].
26+
View the [source code][metrics_0_code].
3827

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

@@ -60,7 +49,7 @@ Commands:
6049
Options:
6150
--version Show version number [boolean]
6251
--help Show help [boolean]
63-
--projectId, -p [string]
52+
--projectId, -p [string] [default: "nodejs-docs-samples"]
6453
6554
Examples:
6655
node metrics.js create
@@ -83,7 +72,7 @@ For more information, see https://cloud.google.com/monitoring/docs
8372

8473
### Uptime Config
8574

86-
View the [documentation][uptime_1_docs] or the [source code][uptime_1_code].
75+
View the [source code][uptime_1_code].
8776

8877
__Usage:__ `node uptime.js --help`
8978

@@ -98,11 +87,13 @@ Commands:
9887
Options:
9988
--version Show version number [boolean]
10089
--help Show help [boolean]
101-
--projectId, -p [string]
90+
--projectId, -p [string] [default: "nodejs-docs-samples"]
10291
10392
Examples:
10493
node uptime.js create my-instance Create an uptime check for a "my-instance" GCE instance.
10594
node uptime.js list List all uptime check configs.
95+
node uptime.js list "resource.type = gce_instance AND List all uptime check configs for a specific GCE
96+
resource.label.instance_id = mongodb" instance.
10697
node uptime.js list-ips
10798
node uptime.js get My-Uptime-Check
10899
node uptime.js delete My-Uptime-Check
@@ -112,18 +103,3 @@ For more information, see https://cloud.google.com/monitoring/uptime-checks/
112103

113104
[uptime_1_docs]: https://cloud.google.com/monitoring/docs
114105
[uptime_1_code]: uptime.js
115-
116-
117-
## Running the tests
118-
119-
1. Set the **GCLOUD_PROJECT** and **GOOGLE_APPLICATION_CREDENTIALS** environment variables.
120-
121-
1. Run the tests:
122-
123-
With **npm**:
124-
125-
npm test
126-
127-
With **yarn**:
128-
129-
yarn test

0 commit comments

Comments
 (0)