Google Cloud Platform Data Stream Parameters

The Google Cloud Platform plugin provides configurable data streams to fetch analytics data.

Each configurable data stream exposes a set of parameters that lets you filter the data you retrieve. The following information describes the available configurable data streams and their parameters in detail.

BigQuery

Returns the result of a BigQuery SQL query, for reporting over data already held in BigQuery.

Parameter
Description
SQL Query
Enter the BigQuery you want to run. This defines which dataset and fields will be retrieved. Make sure your query is valid BigQuery SQL and returns the data in the structure expected by downstream systems.
Project ID
Specify the Google Cloud Project ID where the BigQuery dataset resides. The query will be executed against this project. This must match the project that contains the dataset and tables referenced in your query.
Object filter (via query)
Optionally, specify the specific objects to return data for. Your query must reference the object name as {{name}} for this to take effect.
For example: host='{{name}}'

Firestore Documents

Returns documents from a Firestore collection.

Parameter
Description
Document Path
Specify the Document Path to a document or a collection. The path must be relative to the database root and should not include the project ID or database name.
  • For a collection: myCollection
  • For a document: myCollection/myDocument
  • For a nested document: myCollection/myDocument/subCollection/subDocument
This field uniquely identifies the location of the resource and follows Firestore-style path notation, where collection and document names alternate.

Firestore Structured Query

Returns the Firestore documents matching a structured query, for when a whole collection is more than you need.

Parameter
Description
Structured Query
Enter the structured query JSON (See Firestore StructuredQuery schema for detailed information). For example:
{
    "from": {
        "collectionId": "users"
    },
    "where": {
        "fieldFilter": {
            "field": {
                "fieldPath": "firstName"
            },
            "op": "EQUAL",
            "value": {
                "stringValue": "Jo"
            }
        }
    }
}​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌​‌‍​‌‌‍‍‌‍‍‌‌‌​‌‍‌​‍‍‌‍‍‌‌‍​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍​‍‌​‌‌​‌‌‌‌‍‌​‌‍‍‌‌‍​‍‌‍​‌‍​‌‍‌‌‌‌‍‌​​‍‌‍‍‌‌‍‍‌‌​‌‍‌‌‌‍‍‌‌​​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍‌‍‌‌‍‌‍‌​‌‍‌‌​‌‌​​‌​‍‌‍‌‌‌​‌‍‌‌‌‍‍‌‌​‌‍​‌‌‌​‌‍‍‌‌‍‌‍‍​‍‌‍‍‌‌‍‌​​‌​‌‌‌‍​‌‍‌​​​‍​​‍​‌‍‌‍‌‍​‍​​‍‌​‌​​‌​‌‍​‌​​‌​‍‌​‌​‌‍​‌​​‍‌‍‌‍​‍‌‌‍​‍​​​​​​​‌​‍‌​‌‌‌‍​‍​‌‌​​‌​​​‌​​​​​​​‌‍​‍‌‌‍‌​​‍‌​‍‌‌​‌‍‌‌​​‌‍‌‌​‌‌‌​‌‍​‌‌‍​‍‌‍​‌‍‌‌​‍‌​​‌‍​‌‌‌​‌‍‍​​‌‌​‍‌‍‌‌‌​​‍‌‌​‌‌‌​​‍‌‌‌‍‍‌‍‌‌‌‍‌​‍‌‌​​‌​‌​​‍‌‌​​‌​‌​​‍‌‌​​‍​​‍​‍​​​​‌‍‌‌​​‌​‌​‌‍‌​​‌‍‌‍​‌‌‍​​‌​​‌‍‌‍​‍​‍‌‌​​‍​​‍​‍‌‌​‌‌‌​‌​​‍‍‌‍​‌‍‌‌‌‍​‌‍​‌​​‍‌‌​‌‌‌​​‍‌‌‌‍‍‌‍‌‌‌‍‌​‍‌‌​​‌​‌​​‍‌‌​​‌​‌​​‍‌‌​​‍​​‍‌‍‌​​‌​‌‍‌‍‌‌​‌​‍​‌‍​​​‍‌‍‌‌​‍​​​​​‌​‍‌‌​​‍​​‍​‍‌‌​‌‌‌​‌​​‍‍‌‍​‍‌‍‌‍‌​‌‍‌​‍‌‌​‌‌‌​​‍‌‌‌‍‍‌‍‌‌‌‍‌​‍‌‌​​‌​‌​​‍‌‌​​‌​‌​​‍‌‌​​‍​​‍​​‌​​‍​​‌‌‍​‌‍​‌​‌‍​‍‌​‌‌​‌​​‌‍​‌‍‌‍​​‍‌‌​​‍​​‍​‍‌‌​‌‌‌​‌​​‍‍‌‍​‌‍‍​‌‍‍‌‌‍​‌‍‌​‌​‍‌‍‌‌‌‍‍​‍‌‌​‌‌‌​​‍‌‌‌‍‍‌‍‌‌‌‍‌​‍‌‌​​‌​‌​​‍‌‌​​‌​‌​​‍‌‌​​‍​​‍​‌​​‍​‌‍‌‍‌‍​‌​​​‍‌‌‍‌​‌‍‌‍​‍​​‍​​‌‌​​​‍‌‌​​‍​​‍​‍‌‌​‌‌‌​‌​​‍‍‌‍​‌‍‌‍‌​‌‍‌‌​‌‍​‍‌‍​‌‌​‌‍‌‌‌‌‌‌‌​‍‌‍​​‌​‍‌‌​​‍‌​‌‍‌​‌‌​‌‌‌‌‍‌​‌‍‍‌‌‍​‍‌‌​​‍‌​‌‍‌‍​‌‍​‌‍‌‌‌‌‍‌​​‍‌‍‌‍‍‌‌‍‌​​‌​‌‌‌‍​‌‍‌​​​‍​​‍​‌‍‌‍‌‍​‍​​‍‌​‌​​‌​‌‍​‌​​‌​‍‌​‌​‌‍​‌​​‍‌‍‌‍​‍‌‌‍​‍​​​​​​​‌​‍‌​‌‌‌‍​‍​‌‌​​‌​​​‌​​​​​​​‌‍​‍‌‌‍‌​​‍‌​‍‌‍‌‌​‌‍‌‌​​‌‍‌‌​‌‌‌​‌‍​‌‌‍​‍‌‍​‌‍‌‌​‍‌‍‌​​‌‍​‌‌‌​‌‍‍​​‌‌​‍‌‍‌‌‌​​‍‌‌​‌‌‌​​‍‌‌‌‍‍‌‍‌‌‌‍‌​‍‌‌​​‌​‌​​‍‌‌​​‌​‌​​‍‌‌​​‍​​‍​‍​​​​‌‍‌‌​​‌​‌​‌‍‌​​‌‍‌‍​‌‌‍​​‌​​‌‍‌‍​‍​‍‌‌​​‍​​‍​‍‌‌​‌‌‌​‌​​‍‍‌‍​‌‍‌‌‌‍​‌‍​‌​​‍‌‌​‌‌‌​​‍‌‌‌‍‍‌‍‌‌‌‍‌​‍‌‌​​‌​‌​​‍‌‌​​‌​‌​​‍‌‌​​‍​​‍‌‍‌​​‌​‌‍‌‍‌‌​‌​‍​‌‍​​​‍‌‍‌‌​‍​​​​​‌​‍‌‌​​‍​​‍​‍‌‌​‌‌‌​‌​​‍‍‌‍​‍‌‍‌‍‌​‌‍‌​‍‌‌​‌‌‌​​‍‌‌‌‍‍‌‍‌‌‌‍‌​‍‌‌​​‌​‌​​‍‌‌​​‌​‌​​‍‌‌​​‍​​‍​​‌​​‍​​‌‌‍​‌‍​‌​‌‍​‍‌​‌‌​‌​​‌‍​‌‍‌‍​​‍‌‌​​‍​​‍​‍‌‌​‌‌‌​‌​​‍‍‌‍​‌‍‍​‌‍‍‌‌‍​‌‍‌​‌​‍‌‍‌‌‌‍‍​‍‌‌​‌‌‌​​‍‌‌‌‍‍‌‍‌‌‌‍‌​‍‌‌​​‌​‌​​‍‌‌​​‌​‌​​‍‌‌​​‍​​‍​‌​​‍​‌‍‌‍‌‍​‌​​​‍‌‌‍‌​‌‍‌‍​‍​​‍​​‌‌​​​‍‌‌​​‍​​‍​‍‌‌​‌‌‌​‌​​‍‍‌‍​‌‍‌‍‌​‌‍‌‌​‍‌‍‌​​‌‍‌‌‌​‍‌​‌​​‌‍‌‌‌‍​‌‌​‌‍‍‌‌‌‍‌‍‌‌​‌‌​​‌‌‌‌‍​‍‌‍​‌‍‍‌‌​‌‍‍​‌‍‌‌‌‍‌​​‍​‍‌‌

Monitor Metric

Returns a Cloud Monitoring metric for the resources in scope.

Parameter
Description
Metric name
Specify the metric to return data for.

MQL Query

Returns the result of a Monitoring Query Language query. Use it when the metric you need takes more shaping than Monitor Metric allows.

Parameter
Description
Project
Select the project that you would like to run the MQL against from the dropdown.
Note

You will not need to select a project if you have already selected one in the scope.

MQL Query
Enter a MQL query. See MQL query examples below for more information about queries.

Examples

MQL query not using dashboard timeframe - CPU usage time in the last 20 minutes in the selected project:

fetch gce_instance | metric 'compute.googleapis.com/instance/cpu/usage_time' | within (20m)

MQL query not using dashboard timeframe - authentication events count in the last 24 hours:

fetch iam_service_account
| metric 'iam.googleapis.com/service_account/authn_events_count'
| align rate(1m)
| every 1m | within (24h)

MQL query using dashboard timeframe - uploaded bytes in BigQuery data set:

fetch bigquery_dataset
| metric 'bigquery.googleapis.com/storage/uploaded_bytes'
| align rate(1m)
| every 1m

Was this article helpful?


Have more questions or facing an issue?