Skip to content

Commit a69f4d0

Browse files
authored
chore: upgrade monitoring to new sample format (GoogleCloudPlatform#1640)
1 parent e403b9f commit a69f4d0

34 files changed

+201
-518
lines changed

monitoring/README.md

Lines changed: 9 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -62,73 +62,15 @@ authentication:
6262

6363
## Stackdriver Monitoring Samples
6464

65-
To run the Stackdriver Monitoring Samples:
66-
67-
$ php monitoring.php
68-
69-
Stackdriver Monitoring
70-
71-
Usage:
72-
command [options] [arguments]
73-
74-
Options:
75-
-h, --help Display this help message
76-
-q, --quiet Do not output any message
77-
-V, --version Display this application version
78-
--ansi Force ANSI output
79-
--no-ansi Disable ANSI output
80-
-n, --no-interaction Do not ask any interactive question
81-
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
82-
83-
Available commands:
84-
create-metric Creates a logging metric.
85-
create-uptime-check Creates an uptime check.
86-
delete-metric Deletes a logging metric.
87-
delete-uptime-check Deletes an uptime check config.
88-
get-descriptor Gets a logging descriptor.
89-
help Displays help for a command
90-
list Lists commands
91-
list-descriptors Lists logging descriptors.
92-
list-uptime-check-ips Lists Uptime Check IPs.
93-
list-uptime-checks Lists Uptime Check Configs.
94-
read-timeseries-align Aggregates metrics for each timeseries.
95-
read-timeseries-fields Reads Timeseries fields.
96-
read-timeseries-reduce Aggregates metrics across multiple timeseries.
97-
read-timeseries-simple Reads a timeseries.
98-
write-timeseries Writes a timeseries.
99-
100-
## Stackdriver Monitoring Alert Samples
101-
102-
To run the Stackdriver Monitoring Alert Samples:
103-
104-
$ php alerts.php
105-
106-
Stackdriver Monitoring Alerts
107-
108-
Usage:
109-
command [options] [arguments]
110-
111-
Options:
112-
-h, --help Display this help message
113-
-q, --quiet Do not output any message
114-
-V, --version Display this application version
115-
--ansi Force ANSI output
116-
--no-ansi Disable ANSI output
117-
-n, --no-interaction Do not ask any interactive question
118-
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
119-
120-
Available commands:
121-
backup-policies Back up alert policies.
122-
create-channel Create a notification channel.
123-
create-policy Create an alert policy.
124-
delete-channel Delete a notification channel.
125-
enable-policies Enable or disable alert policies in a project.
126-
help Displays help for a command
127-
list Lists commands
128-
list-channels List alert channels.
129-
list-policies List alert policies.
130-
replace-channels Replace alert channels.
131-
restore-policies Restore alert policies from a backup.
65+
Execute the snippets in the [src/](src/) directory by running
66+
`php src/SNIPPET_NAME.php`. The usage will print for each if no arguments
67+
are provided:
68+
```sh
69+
$ php src/list_resources.php
70+
Usage: php src/list_resources.php PROJECT_ID
71+
72+
$ php src/list_resources.php 'your-project-id'
73+
```
13274

13375
## The client library
13476

monitoring/alerts.php

Lines changed: 0 additions & 129 deletions
This file was deleted.

monitoring/composer.json

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,5 @@
11
{
22
"require": {
3-
"symfony/console": "^5.0",
43
"google/cloud-monitoring": "^1.0.0"
5-
},
6-
"autoload": {
7-
"files": [
8-
"src/alert_backup_policies.php",
9-
"src/alert_create_channel.php",
10-
"src/alert_create_policy.php",
11-
"src/alert_delete_channel.php",
12-
"src/alert_enable_policies.php",
13-
"src/alert_list_channels.php",
14-
"src/alert_list_policies.php",
15-
"src/alert_replace_channels.php",
16-
"src/alert_restore_policies.php",
17-
"src/create_metric.php",
18-
"src/create_uptime_check.php",
19-
"src/delete_metric.php",
20-
"src/delete_uptime_check.php",
21-
"src/get_descriptor.php",
22-
"src/get_resource.php",
23-
"src/get_uptime_check.php",
24-
"src/list_descriptors.php",
25-
"src/list_resources.php",
26-
"src/list_uptime_check_ips.php",
27-
"src/list_uptime_checks.php",
28-
"src/read_timeseries_align.php",
29-
"src/read_timeseries_fields.php",
30-
"src/read_timeseries_reduce.php",
31-
"src/read_timeseries_simple.php",
32-
"src/update_uptime_check.php",
33-
"src/write_timeseries.php"
34-
]
354
}
365
}

0 commit comments

Comments
 (0)