cloud-sql-postgres-monitor

Fetch PromQL metrics, EXPLAIN plans, and active queries for Cloud SQL PostgreSQL.

42|7|Updated Sep 12, 2025
One-click install
npx skills add https://github.com/gemini-cli-extensions/cloud-sql-postgresql --skill cloud-sql-postgres-monitor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloud-sql-postgres-monitor
Source: https://github.com/gemini-cli-extensions/cloud-sql-postgresql/tree/main/skills/cloud-sql-postgres-monitor
Command: npx skills add https://github.com/gemini-cli-extensions/cloud-sql-postgresql --skill cloud-sql-postgres-monitor

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Manually troubleshooting Cloud SQL PostgreSQL performance issues like slow queries, resource bottlenecks, and system anomalies requires deep database expertise and time-consuming checks across multiple tools and dashboards. This Skill eliminates that overhead by providing unified, natural language access to all critical monitoring and troubleshooting data.

Core Features & Use Cases

  • Query Performance Analysis: Generate EXPLAIN plans for SQL statements, retrieve aggregated query statistics, and list active slow-running queries to identify inefficient code.
  • System & Query Metric Monitoring: Fetch time series metrics via PromQL for both system-level resources (CPU, memory, disk I/O, connections) and query-level performance (execution time, IO wait, lock contention, row counts).
  • Troubleshooting Support: Identify long-running transactions, lock contention issues, and resource-heavy processes to resolve performance incidents faster. Use Case: If your application is experiencing elevated latency, use this Skill to pull the top 10 slowest queries and current CPU utilization metrics to quickly pinpoint whether the issue is query-related or resource-constrained.

Quick Start

Use the cloud-sql-postgres-monitor skill to retrieve the last 5 minutes of CPU utilization metrics for your Cloud SQL PostgreSQL instance in project my-project and instance my-instance.

Frequently Asked Questions about cloud-sql-postgres-monitor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I monitor Cloud SQL PostgreSQL performance metrics using PromQL?

To monitor Cloud SQL PostgreSQL performance metrics, this Skill fetches time series data via PromQL for system-level resources and query-level performance without manual API interactions. You retrieve CPU, memory, disk I/O, and execution time metrics seamlessly.

What is the best way to troubleshoot slow queries in Cloud SQL PostgreSQL?

Troubleshooting slow queries in Cloud SQL PostgreSQL is automated by generating EXPLAIN plans for SQL statements and retrieving aggregated query statistics. This Skill identifies inefficient code and lists active slow-running queries to resolve performance bottlenecks.

How can I detect lock contention and long-running transactions in PostgreSQL?

Detecting lock contention and long-running transactions in PostgreSQL is handled by retrieving active query data and database statistics. This Skill identifies resource-heavy processes and lock contention issues to resolve performance incidents faster.

Can I get query execution plans for Cloud SQL PostgreSQL without manual CLI access?

You can generate EXPLAIN plans for SQL statements in Cloud SQL PostgreSQL without manual CLI access. This Skill supports database administrator workflows by providing natural language access to query execution plans and active query data.

Does PostgreSQL performance monitoring support identifying resource bottlenecks?

PostgreSQL performance monitoring supports identifying resource bottlenecks by fetching system metrics for CPU, memory, disk I/O, and connections. This Skill pulls query-level metrics to pinpoint whether latency issues are query-related or resource-constrained.