chore: import upstream snapshot with attribution
CF: Deploy Dev Docs / deploy (push) Has been cancelled
Sync Labels / build (push) Has been cancelled
tests / unit tests (macos-latest) (push) Has been cancelled
tests / unit tests (windows-latest) (push) Has been cancelled
tests / unit tests (ubuntu-latest) (push) Has been cancelled
CF: Deploy Dev Docs / deploy (push) Has been cancelled
Sync Labels / build (push) Has been cancelled
tests / unit tests (macos-latest) (push) Has been cancelled
tests / unit tests (windows-latest) (push) Has been cancelled
tests / unit tests (ubuntu-latest) (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "Cloud Monitoring"
|
||||
weight: 1
|
||||
---
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: "Prebuilt Configs"
|
||||
type: docs
|
||||
description: "Prebuilt configurations for Cloud Monitoring."
|
||||
---
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
---
|
||||
title: "AlloyDB Postgres Observability"
|
||||
type: docs
|
||||
description: "Details of the AlloyDB Postgres Observability prebuilt configuration."
|
||||
---
|
||||
|
||||
## AlloyDB Postgres Observability
|
||||
|
||||
* `--prebuilt` value: `alloydb-postgres-observability`
|
||||
* **Permissions:**
|
||||
* **Monitoring Viewer** (`roles/monitoring.viewer`) is required on the
|
||||
project to view monitoring data.
|
||||
* **Tools:**
|
||||
* `get_system_metrics`: Fetches system level cloud monitoring data
|
||||
(timeseries metrics) for an AlloyDB instance using a PromQL query.
|
||||
* `get_query_metrics`: Fetches query level cloud monitoring data
|
||||
(timeseries metrics) for queries running in an AlloyDB instance using a
|
||||
PromQL query.
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
---
|
||||
title: "Cloud SQL for MySQL Observability"
|
||||
type: docs
|
||||
description: "Details of the Cloud SQL for MySQL Observability prebuilt configuration."
|
||||
---
|
||||
|
||||
## Cloud SQL for MySQL Observability
|
||||
|
||||
* `--prebuilt` value: `cloud-sql-mysql-observability`
|
||||
* **Permissions:**
|
||||
* **Monitoring Viewer** (`roles/monitoring.viewer`) is required on the
|
||||
project to view monitoring data.
|
||||
* **Tools:**
|
||||
* `get_system_metrics`: Fetches system level cloud monitoring data
|
||||
(timeseries metrics) for a MySQL instance using a PromQL query.
|
||||
* `get_query_metrics`: Fetches query level cloud monitoring data
|
||||
(timeseries metrics) for queries running in a MySQL instance using a
|
||||
PromQL query.
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
---
|
||||
title: "Cloud SQL for PostgreSQL Observability"
|
||||
type: docs
|
||||
description: "Details of the Cloud SQL for PostgreSQL Observability prebuilt configuration."
|
||||
---
|
||||
|
||||
## Cloud SQL for PostgreSQL Observability
|
||||
|
||||
* `--prebuilt` value: `cloud-sql-postgres-observability`
|
||||
* **Permissions:**
|
||||
* **Monitoring Viewer** (`roles/monitoring.viewer`) is required on the
|
||||
project to view monitoring data.
|
||||
* **Tools:**
|
||||
* `get_system_metrics`: Fetches system level cloud monitoring data
|
||||
(timeseries metrics) for a Postgres instance using a PromQL query.
|
||||
* `get_query_metrics`: Fetches query level cloud monitoring data
|
||||
(timeseries metrics) for queries running in Postgres instance using a
|
||||
PromQL query.
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "Cloud SQL for SQL Server Observability"
|
||||
type: docs
|
||||
description: "Details of the Cloud SQL for SQL Server Observability prebuilt configuration."
|
||||
---
|
||||
|
||||
## Cloud SQL for SQL Server Observability
|
||||
|
||||
* `--prebuilt` value: `cloud-sql-mssql-observability`
|
||||
* **Permissions:**
|
||||
* **Monitoring Viewer** (`roles/monitoring.viewer`) is required on the
|
||||
project to view monitoring data.
|
||||
* **Tools:**
|
||||
* `get_system_metrics`: Fetches system level cloud monitoring data
|
||||
(timeseries metrics) for a SQL Server instance using a PromQL query.
|
||||
@@ -0,0 +1,47 @@
|
||||
---
|
||||
title: "Cloud Monitoring Source"
|
||||
type: docs
|
||||
linkTitle: "Source"
|
||||
weight: 1
|
||||
description: >
|
||||
A "cloud-monitoring" source provides a client for the Cloud Monitoring API.
|
||||
no_list: true
|
||||
---
|
||||
|
||||
## About
|
||||
|
||||
The `cloud-monitoring` source provides a client to interact with the [Google
|
||||
Cloud Monitoring API](https://cloud.google.com/monitoring/api). This allows
|
||||
tools to access cloud monitoring metrics explorer and run promql queries.
|
||||
|
||||
Authentication can be handled in two ways:
|
||||
|
||||
1. **Application Default Credentials (ADC):** By default, the source uses ADC
|
||||
to authenticate with the API.
|
||||
2. **Client-side OAuth:** If `useClientOAuth` is set to `true`, the source will
|
||||
expect an OAuth 2.0 access token to be provided by the client (e.g., a web
|
||||
browser) for each request.
|
||||
|
||||
## Available Tools
|
||||
|
||||
{{< list-tools >}}
|
||||
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: source
|
||||
name: my-cloud-monitoring
|
||||
type: cloud-monitoring
|
||||
---
|
||||
kind: source
|
||||
name: my-oauth-cloud-monitoring
|
||||
type: cloud-monitoring
|
||||
useClientOAuth: true
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|----------------|:--------:|:------------:|------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "cloud-monitoring". |
|
||||
| useClientOAuth | boolean | false | If true, the source will use client-side OAuth for authorization. Otherwise, it will use Application Default Credentials. Defaults to `false`. |
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "Tools"
|
||||
weight: 2
|
||||
---
|
||||
@@ -0,0 +1,77 @@
|
||||
---
|
||||
title: cloud-monitoring-query-prometheus
|
||||
type: docs
|
||||
weight: 1
|
||||
description: The "cloud-monitoring-query-prometheus" tool fetches time series metrics for a project using a given prometheus query.
|
||||
---
|
||||
|
||||
The `cloud-monitoring-query-prometheus` tool fetches timeseries metrics data
|
||||
from Google Cloud Monitoring for a project using a given prometheus query.
|
||||
|
||||
## About
|
||||
|
||||
The `cloud-monitoring-query-prometheus` tool allows you to query all metrics
|
||||
available in Google Cloud Monitoring using the Prometheus Query Language
|
||||
(PromQL).
|
||||
|
||||
### Use Cases
|
||||
|
||||
- **Ad-hoc analysis:** Quickly investigate performance issues by executing
|
||||
direct promql queries for a database instance.
|
||||
- **Prebuilt Configs:** Use the already added prebuilt tools mentioned in
|
||||
prebuilt-tools.md to query the databases system/query level metrics.
|
||||
|
||||
Here are some common use cases for the `cloud-monitoring-query-prometheus` tool:
|
||||
|
||||
- **Monitoring resource utilization:** Track CPU, memory, and disk usage for
|
||||
your database instance (Can use the [prebuilt
|
||||
tools](../../../documentation/configuration/prebuilt-configs/_index.md)).
|
||||
- **Monitoring query performance:** Monitor latency, execution_time, wait_time
|
||||
for database instance or even for the queries running (Can use the [prebuilt
|
||||
tools](../../../documentation/configuration/prebuilt-configs/_index.md)).
|
||||
- **System Health:** Get the overall system health for the database instance
|
||||
(Can use the [prebuilt tools](../../../documentation/configuration/prebuilt-configs/_index.md)).
|
||||
|
||||
## Compatible Sources
|
||||
|
||||
{{< compatible-sources >}}
|
||||
|
||||
## Requirements
|
||||
|
||||
To use this tool, you need to have the following IAM role on your Google Cloud
|
||||
project:
|
||||
|
||||
- `roles/monitoring.viewer`
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
|-------------|--------|----------------------------------|
|
||||
| `projectId` | string | The Google Cloud project ID. |
|
||||
| `query` | string | The Prometheus query to execute. |
|
||||
|
||||
|
||||
## Example
|
||||
|
||||
Here are some examples of how to use the `cloud-monitoring-query-prometheus`
|
||||
tool.
|
||||
|
||||
```yaml
|
||||
kind: tool
|
||||
name: get_wait_time_metrics
|
||||
type: cloud-monitoring-query-prometheus
|
||||
source: cloud-monitoring-source
|
||||
description: |
|
||||
This tool fetches system wait time information for AlloyDB cluster, instance. Get the `projectID`, `clusterID` and `instanceID` from the user intent. To use this tool, you must provide the Google Cloud `projectId` and a PromQL `query`.
|
||||
Generate `query` using these metric details:
|
||||
metric: `alloydb.googleapis.com/instance/postgresql/wait_time`, monitored_resource: `alloydb.googleapis.com/Instance`. labels: `cluster_id`, `instance_id`, `wait_event_type`, `wait_event_name`.
|
||||
Basic time series example promql query: `avg_over_time({"__name__"="alloydb.googleapis.com/instance/postgresql/wait_time","monitored_resource"="alloydb.googleapis.com/Instance","instance_id"="alloydb-instance"}[5m])`
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-------------|:--------:|:------------:|------------------------------------------------------|
|
||||
| type | string | true | Must be cloud-monitoring-query-prometheus. |
|
||||
| source | string | true | The name of an `cloud-monitoring` source. |
|
||||
| description | string | true | Description of the tool that is passed to the agent. |
|
||||
Reference in New Issue
Block a user