원클릭으로
alloydb-omni-monitor
// Use these skills when you need to troubleshoot production issues by identifying locks, tracking long-running transactions, and getting a high-level view of server state.
// Use these skills when you need to troubleshoot production issues by identifying locks, tracking long-running transactions, and getting a high-level view of server state.
Use these skills when you need to manage user roles, inspect permissions, and verify security-related configuration parameters.
Use these skills when you need to explore the database structure, identify schema objects like views and triggers, and execute SQL queries to interact with your data.
Use these skills when you need to audit database health, identify storage bloat, find broken indexes, and verify tablespace or maintenance configurations.
Use these skills when you need to fine-tune the database engine settings, manage extensions, or optimize the columnar engine for better analytical performance.
Use these skills when you need to analyze query performance, generate execution plans, check table/column statistics, and monitor overall database activity.
Use these skills when you need to monitor the health of database replication, manage sync states between nodes, and audit publication tables for distributed setups.
| name | alloydb-omni-monitor |
| description | Use these skills when you need to troubleshoot production issues by identifying locks, tracking long-running transactions, and getting a high-level view of server state. |
All scripts can be executed using Node.js. Replace <param_name> and <param_value> with actual values.
Bash:
node <skill_dir>/scripts/<script_name>.js '{"<param_name>": "<param_value>"}'
PowerShell:
node <skill_dir>/scripts/<script_name>.js '{\"<param_name>\": \"<param_value>\"}'
Note: The scripts automatically load the environment variables from various .env files. Do not ask the user to set vars unless skill executions fails due to env var absence.
Fetches the current state of the PostgreSQL server, returning the version, whether it's a replica, uptime duration, maximum connection limit, number of current connections, number of active connections, and the percentage of connections in use.
List the top N (default 50) currently running queries (state='active') from pg_stat_activity, ordered by longest-running first. Returns pid, user, database, application_name, client_addr, state, wait_event_type/wait_event, backend/xact/query start times, computed query_duration, and the SQL text.
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| min_duration | string | Optional: Only show queries running at least this long (e.g., '1 minute', '1 second', '2 seconds'). | No | 1 minute |
| exclude_application_names | string | Optional: A comma-separated list of application names to exclude from the query results. This is useful for filtering out queries from specific applications (e.g., 'psql', 'pgAdmin', 'DBeaver'). The match is case-sensitive. Whitespace around commas and names is automatically handled. If this parameter is omitted, no applications are excluded. | No | |
| limit | integer | Optional: The maximum number of rows to return. | No | 50 |
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| database_name | string | Optional: A specific database name pattern to search for. | No | |
| include_templates | boolean | Optional: Whether to include template databases in the results. | No | false |
| database_owner | string | Optional: A specific database owner name pattern to search for. | No | |
| default_tablespace | string | Optional: A specific default tablespace name pattern to search for. | No | |
| order_by | string | Optional: The field to order the results by. Valid values are 'size' and 'commit'. | No | |
| limit | integer | Optional: The maximum number of rows to return. | No | 10 |
Identifies all locks held by active processes showing the process ID, user, query text, and an aggregated list of all transactions and specific locks (relation, mode, grant status) associated with each process.
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| setting_name | string | Optional: A specific configuration parameter name pattern to search for. | No | |
| limit | integer | Optional: The maximum number of rows to return. | No | 50 |
Identifies and lists database transactions that exceed a specified time limit. For each of the long running transactions, the output contains the process id, database name, user name, application name, client address, state, connection age, transaction age, query age, last activity age, wait event type, wait event, and query string.
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| min_duration | string | Optional: Only show transactions running at least this long (e.g., '1 minute', '15 minutes', '30 seconds'). | No | 5 minutes |
| limit | integer | Optional: The maximum number of long-running transactions to return. Defaults to 20. | No | 20 |