Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

Commit

Permalink
Added "Open in Cloud Shell" buttons to README files [(#1254)](GoogleC…
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelawyu authored and Jon Wayne Parrott committed Dec 7, 2017
1 parent 4100937 commit 910ccb1
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 15 deletions.
38 changes: 26 additions & 12 deletions samples/snippets/v3/api-client/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Stackdriver Monitoring Python Samples
===============================================================================

.. image:: https://gstatic.com/cloudssh/images/open-btn.png
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=monitoring/api/v3/api-client/README.rst


This directory contains samples for Stackdriver Monitoring. `Stackdriver Monitoring `_ 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. Stackdriver ingests that data and generates insights via dashboards, charts, and alerts.


Expand Down Expand Up @@ -54,6 +58,10 @@ Samples
List resources
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

.. image:: https://gstatic.com/cloudssh/images/open-btn.png
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=monitoring/api/v3/api-client/list_resources.py;monitoring/api/v3/api-client/README.rst




To run this sample:
Expand All @@ -63,25 +71,30 @@ To run this sample:
$ python list_resources.py
usage: list_resources.py [-h] --project_id PROJECT_ID
Sample command-line program for retrieving Stackdriver Monitoring API V3
data.
See README.md for instructions on setting up your development environment.
To run locally:
python list_resources.py --project_id=<YOUR-PROJECT-ID>
optional arguments:
-h, --help show this help message and exit
--project_id PROJECT_ID
Project ID you want to access.
Custom metrics
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

.. image:: https://gstatic.com/cloudssh/images/open-btn.png
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=monitoring/api/v3/api-client/custom_metric.py;monitoring/api/v3/api-client/README.rst




To run this sample:
Expand All @@ -91,21 +104,21 @@ To run this sample:
$ python custom_metric.py
usage: custom_metric.py [-h] --project_id PROJECT_ID
Sample command-line program for writing and reading Stackdriver Monitoring
API V3 custom metrics.
Simple command-line program to demonstrate connecting to the Google
Monitoring API to write custom metrics and read them back.
See README.md for instructions on setting up your development environment.
This example creates a custom metric based on a hypothetical GAUGE measurement.
To run locally:
python custom_metric.py --project_id=<YOUR-PROJECT-ID>
optional arguments:
-h, --help show this help message and exit
--project_id PROJECT_ID
Expand All @@ -114,4 +127,5 @@ To run this sample:
.. _Google Cloud SDK: https://cloud.google.com/sdk/
2 changes: 2 additions & 0 deletions samples/snippets/v3/api-client/README.rst.in
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ samples:
- name: Custom metrics
file: custom_metric.py
show_help: true

folder: monitoring/api/v3/api-client
19 changes: 16 additions & 3 deletions samples/snippets/v3/cloud-client/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Google Stackdriver Monitoring API Python Samples
===============================================================================

.. image:: https://gstatic.com/cloudssh/images/open-btn.png
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=monitoring/api/v3/cloud-client/README.rst


This directory contains samples for Google Stackdriver Monitoring API. Stackdriver Monitoring 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. Stackdriver ingests that data and generates insights
via dashboards, charts, and alerts.
Expand Down Expand Up @@ -56,6 +60,10 @@ Samples
Quickstart
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

.. image:: https://gstatic.com/cloudssh/images/open-btn.png
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=monitoring/api/v3/cloud-client/quickstart.py;monitoring/api/v3/cloud-client/README.rst




To run this sample:
Expand All @@ -68,6 +76,10 @@ To run this sample:
Snippets
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

.. image:: https://gstatic.com/cloudssh/images/open-btn.png
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=monitoring/api/v3/cloud-client/snippets.py;monitoring/api/v3/cloud-client/README.rst




To run this sample:
Expand All @@ -79,9 +91,9 @@ To run this sample:
usage: snippets.py [-h]
{create-metric-descriptor,list-metric-descriptors,get-metric-descriptor,delete-metric-descriptor,list-resources,get-resource,write-time-series,list-time-series,list-time-series-header,list-time-series-reduce,list-time-series-aggregate}
...
Demonstrates Monitoring API operations.
positional arguments:
{create-metric-descriptor,list-metric-descriptors,get-metric-descriptor,delete-metric-descriptor,list-resources,get-resource,write-time-series,list-time-series,list-time-series-header,list-time-series-reduce,list-time-series-aggregate}
create-metric-descriptor
Expand All @@ -95,13 +107,14 @@ To run this sample:
list-time-series-header
list-time-series-reduce
list-time-series-aggregate
optional arguments:
-h, --help show this help message and exit
The client library
-------------------------------------------------------------------------------

Expand Down
2 changes: 2 additions & 0 deletions samples/snippets/v3/cloud-client/README.rst.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ samples:
show_help: true

cloud_client_library: true

folder: monitoring/api/v3/cloud-client

0 comments on commit 910ccb1

Please sign in to comment.