Knowi comes with inbuilt support to create a dataset using Google Cloud Platform (GCP) Monitoring as a datasource. Add it to the dashboard and build numerous visualizations with an altered representation of the GCP metrics.
Add GCP Monitoring Datasource
Step 1: Select Queries from the left sidebar menu.
Step 2: Click on the NEW DATASOURCE+ button from the top right corner of the interface.
Step 3: Select Google Cloud Platform Monitoring under the API & Cloud Services.
Step 4: Add the following details to configure GCP monitoring datasource:
- Datasource Name: Name of your datasource
- Scope: Permissions list
- Key File: Upload Key File to authenticate the application as a service account
- Google Monitor Project Name: Project name associated with Google account used for application as a service account.
Test the connection, save the datasource, and Start Querying.
Query GCP Monitoring Datasource
The GCP Monitoring datasource can be queried in two ways:
Query Mode: Metric
The options available may change depending upon the metric you select.
- From-To: Choose the time period for which you wish the results to be returned.
- Metric Folder: Select the Metric Folder from which you want to retrieve the list of metrics from GCP.
- Metrics: Metrics from selected Metric Folder will populate here. Select the metrics type you wish to monitor.
- Dimensions (Filters): Select the dimensions of the metric you are querying from the dropdown list. Dimensions are name/value pairs that carry additional data to describe the metric value. Note: Using the asterisk for one or more dimension values, you can keep track of a dynamic set of metrics.
- Aggregation Aligner: The aligner specifies the operation that will be applied to the data points in each alignment period in a time series. Except for ALIGN_NONE, which specifies that no operation be applied, each alignment operation replaces the set of data values in each alignment period with a single value: the result of applying the operation to the data values. An aligned time series has a single data value at the end of each alignment period.
- Cross-Series Reducer: A Reducer operation describes how to aggregate data points from multiple time series into a single time series, where the value of each data point in the resulting series is a function of all the already aligned values in the input time series.
- Alignment Period: Alignment period for aggregation, in seconds.
- Additional Filter: Enter an additional filter. For example: metric.labels.instance_name="instance-vm-one-two-3". More info for available options on filtering: https://cloud.google.com/monitoring/api/v3/filters
Here is an example of a Query made against Google Cloud Platform Monitoring:
Below are the preview results of the Query based on the information provided above.
Query Mode: Meta
Meta query mode offers to select the Meta type. Depending upon the Meta type, users may be asked to configure Metrics Folder, Metrics, Additional Filter, Dimensions (Filters), From To Time, and other parameters.