|
1 | | -# Gemini CLI Extension - Cloud SQL for SQL Server |
| 1 | +# Gemini CLI Extension - Cloud SQL for SQL Server Observability |
2 | 2 |
|
3 | | -This Gemini CLI extension provides a set of tools to interact with [Cloud SQL for SQL Server](https://cloud.google.com/sql/docs/sqlserver) instances. It allows you to manage your databases, execute queries, and explore schemas directly from the [Gemini CLI](https://google-gemini.github.io/gemini-cli/), using natural language prompts. |
| 3 | +This Gemini CLI extension provides a set of tools to interact with [Cloud SQL for SQL Server](https://cloud.google.com/sql/docs/sqlserver) monitoring metrics. It allows you to fetch a wide range of database metrics, enabling comprehensive monitoring of database performance and health directly from the [Gemini CLI](https://google-gemini.github.io/gemini-cli/), using natural language prompts. |
4 | 4 |
|
5 | | -## Features |
| 5 | +Learn more about [Gemini CLI Extensions](https://github.com/google-gemini/gemini-cli/blob/main/docs/extension.md) |
6 | 6 |
|
7 | | -* **Integrated with Gemini CLI:** As a Google-developed extension, it integrates seamlessly into the Gemini CLI environment, making security an accessible part of your workflow. |
8 | | -* **Connect to Cloud SQL for SQL Server:** Securely connect to your Cloud SQL for SQL Server instances. |
9 | | -* **Explore Database Schema:** List databases, tables, views, and schemas. |
10 | | -* **Query your Database:** Execute SQL queries against your database. |
| 7 | +## Why Use the Cloud SQL for SQL Server Observability Extension? |
11 | 8 |
|
12 | | -## Supported Tools |
13 | | - |
14 | | -* list-tables: Use this tool to list tables and descriptions. |
15 | | -* execute-sql: Use this tool to execute any SQL statement. |
| 9 | +* **Natural Language Management:** Stop wrestling with complex monitoring queries. Explore monitoring data by describing what you want in plain English. |
| 10 | +* **Seamless Workflow:** As a Google-developed extension, it integrates seamlessly into the Gemini CLI environment. No need to constantly switch contexts for common tasks. |
16 | 11 |
|
17 | 12 | ## Prerequisites |
18 | 13 |
|
19 | 14 | Before you begin, ensure you have the following: |
20 | 15 |
|
21 | 16 | * [Gemini CLI](https://github.com/google-gemini/gemini-cli) installed. |
22 | | -* A Google Cloud project with the **Cloud SQL Admin API** enabled. |
| 17 | +* A Google Cloud project with the **Cloud Monitoring API** enabled. |
23 | 18 | * IAM Permissions |
| 19 | + * Monitoring Viewer (`roles/monitoring.viewer`) |
24 | 20 |
|
25 | 21 | ## Installation |
26 | 22 |
|
27 | 23 | To install the extension, use the command: |
28 | 24 |
|
29 | 25 | ```bash |
30 | | -gemini extensions install github.com/gemini-cli-extensions/cloud-sql-sqlserver.git |
| 26 | +gemini extensions install github.com/gemini-cli-extensions/cloud-sql-sqlserver-observability |
31 | 27 | ``` |
32 | 28 |
|
33 | 29 | ## Configuration |
34 | 30 |
|
35 | | -* `CLOUD_SQL_MSSQL_PROJECT`: The GCP project ID. |
36 | | -* `CLOUD_SQL_MSSQL_REGION`: The region of your Cloud SQL instance. |
37 | | -* `CLOUD_SQL_MSSQL_INSTANCE`: The ID of your Cloud SQL instance. |
38 | | -* `CLOUD_SQL_MSSQL_DATABASE`: The name of the database to connect to. |
39 | | -* `CLOUD_SQL_MSSQL_IP_ADDRESS`: The IP address of the Cloud SQL instance. |
40 | | -* `CLOUD_SQL_MSSQL_USER`: The database username. |
41 | | -* `CLOUD_SQL_MSSQL_PASSWORD`: The password for the database user. |
| 31 | +No configuration is required. |
| 32 | + |
| 33 | +## Usage Examples |
42 | 34 |
|
| 35 | +Interact with Cloud Monitoring metrics using natural language right from your IDE: |
43 | 36 |
|
44 | | -## Usage |
| 37 | +* "What is the memory usage for my SQL Server database?" |
| 38 | +* "What is the overall system performance for my instance?" |
| 39 | +* "What queries have been run for this instance over the last 3 hours?" |
| 40 | +* "Provide the execution time for the query X" |
| 41 | + |
| 42 | +## Supported Tools |
45 | 43 |
|
46 | | -* Provision Infrastructure |
47 | | -* Explore Schemas and Data |
48 | | -* Generate code |
| 44 | +* `get_system_metrics`: Fetches system level cloud monitoring data (timeseries metrics) for a SQL Server instance using a PromQL query. |
| 45 | +* `get_query_metrics`: Fetches query level cloud monitoring data (timeseries metrics) for queries running in SQL Server instance using a PromQL query. |
49 | 46 |
|
| 47 | +## Additional Extensions |
50 | 48 |
|
51 | | -## Security |
| 49 | +Find additional extensions to support your entire software development lifecycle at [github.com/gemini-cli-extensions](https://github.com/gemini-cli-extensions). |
52 | 50 |
|
53 | | -This extension executes commands against your Cloud SQL for SQL Server database. Always review the generated SQL queries before execution, especially for write operations. |
| 51 | +## Troubleshooting |
54 | 52 |
|
55 | | -## Disclaimer |
| 53 | +* "cannot execute binary file": Ensure the correct binary for your OS/Architecture has been downloaded. See [Installing the server](https://googleapis.github.io/genai-toolbox/getting-started/introduction/#installing-the-server) for more information. |
56 | 54 |
|
57 | | -This is not an officially supported Google product. This extension is under active development, and breaking changes may be introduced. |
0 commit comments