8
8
9
9
## Table of Contents
10
10
11
- * [ Setup ] ( #setup )
11
+ * [ Before you begin ] ( #before-you-begin )
12
12
* [ Samples] ( #samples )
13
13
* [ Metrics] ( #metrics )
14
14
* [ Uptime Config] ( #uptime-config )
15
- * [ Running the tests] ( #running-the-tests )
16
15
17
- ## Setup
16
+ ## Before you begin
18
17
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.
32
21
33
22
## Samples
34
23
35
24
### Metrics
36
25
37
- View the [ documentation ] [ metrics_0_docs ] or the [ source code] [ metrics_0_code ] .
26
+ View the [ source code] [ metrics_0_code ] .
38
27
39
28
__ Usage:__ ` node metrics.js --help `
40
29
@@ -60,7 +49,7 @@ Commands:
60
49
Options:
61
50
--version Show version number [boolean]
62
51
--help Show help [boolean]
63
- --projectId, -p [string]
52
+ --projectId, -p [string] [default: "nodejs-docs-samples" ]
64
53
65
54
Examples:
66
55
node metrics.js create
@@ -83,7 +72,7 @@ For more information, see https://cloud.google.com/monitoring/docs
83
72
84
73
### Uptime Config
85
74
86
- View the [ documentation ] [ uptime_1_docs ] or the [ source code] [ uptime_1_code ] .
75
+ View the [ source code] [ uptime_1_code ] .
87
76
88
77
__ Usage:__ ` node uptime.js --help `
89
78
@@ -98,11 +87,13 @@ Commands:
98
87
Options:
99
88
--version Show version number [boolean]
100
89
--help Show help [boolean]
101
- --projectId, -p [string]
90
+ --projectId, -p [string] [default: "nodejs-docs-samples" ]
102
91
103
92
Examples:
104
93
node uptime.js create my-instance Create an uptime check for a "my-instance" GCE instance.
105
94
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.
106
97
node uptime.js list-ips
107
98
node uptime.js get My-Uptime-Check
108
99
node uptime.js delete My-Uptime-Check
@@ -112,18 +103,3 @@ For more information, see https://cloud.google.com/monitoring/uptime-checks/
112
103
113
104
[ uptime_1_docs ] : https://cloud.google.com/monitoring/docs
114
105
[ 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