cloud-sql-postgres-monitor

Analyze PostgreSQL performance on Google Cloud SQL using PromQL and pg_stat_activity.

2|1|Updated May 25, 2026
One-click install
npx skills add https://github.com/interflownex/All-in-One --skill cloud-sql-postgres-monitor-interflownex
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloud-sql-postgres-monitor
Source: https://github.com/interflownex/All-in-One/tree/main/.gemini/skills/cloud-sql-postgres-monitor
Command: npx skills add https://github.com/interflownex/All-in-One --skill cloud-sql-postgres-monitor-interflownex

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @toolbox-sdk/server, and includes scripts (resource) components.

What problem does it solve?

This skill addresses the complexity of diagnosing database performance issues by providing direct access to system-level metrics, query execution plans, and active transaction monitoring.

Core Features & Use Cases

  • Performance Troubleshooting: Identify bottlenecks by analyzing query execution plans and long-running transactions.
  • Resource Monitoring: Track CPU, memory, and I/O metrics using PromQL to ensure optimal database health.
  • Query Optimization: List active queries and performance statistics to tune high-latency operations.

Quick Start

Use the cloud-sql-postgres-monitor skill to list the top 20 longest running transactions on your database 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 PostgreSQL query latency on Cloud SQL?

Monitor PostgreSQL query latency on Cloud SQL by inspecting pg_stat_activity and analyzing query execution plans to identify long-running transactions and tune high-latency operations for production-grade observability.

Can I track Cloud SQL CPU and memory metrics using PromQL?

Track Cloud SQL CPU and memory metrics using PromQL to ensure optimal database health and facilitate troubleshooting of resource-heavy processes affecting your PostgreSQL instance.

What is the best way to troubleshoot lock contention in Cloud SQL PostgreSQL?

Troubleshoot lock contention in Cloud SQL PostgreSQL by inspecting pg_stat_activity to identify blocked active transactions and analyzing query execution diagnostics for resource-heavy processes.

How do I list long-running transactions in PostgreSQL?

List long-running transactions in PostgreSQL by inspecting pg_stat_activity to pinpoint active queries and bottlenecks, enabling targeted query optimization and performance troubleshooting.

Does cloud-sql-postgres-monitor require the @toolbox-sdk/server package?

The cloud-sql-postgres-monitor requires the @toolbox-sdk/server package as a dependency to execute its scripts for integrating system-level metrics and query execution diagnostics.