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

Parameter
Description
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.

BigQuery (Filter by Object)

Parameter
Description
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.

Firestore Documents

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

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

Parameter
Description
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.

MQL Query

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

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.
Automatically apply dashboard timeframe
Enabled by default. If you do not wish to use a dashboard timeframe, you can set the timeframe in the MQL query by adding within to the query. If you deselect Automatically apply dashboard timeframe and do not specify a timeframe in the MQL query, the query will fail. To add a timeframe to a query, simply type | within (timeframe) at the end of your query. For example, to add a timeframe of 24 hours you enter: | within (24h)

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?