pg_monitor_database
Monitor PostgreSQL databases in real-time, track queries, locks, replication, and set alert thresholds for connection usage, long-running queries, cache hit ratio, dead tuples, and vacuum age.
Instructions
Get real-time monitoring information for a PostgreSQL database
Input Schema
Name | Required | Description | Default |
---|---|---|---|
alertThresholds | No | Alert thresholds | |
connectionString | No | ||
includeLocks | No | ||
includeQueries | No | ||
includeReplication | No | ||
includeTables | No |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"alertThresholds": {
"additionalProperties": false,
"description": "Alert thresholds",
"properties": {
"cacheHitRatio": {
"description": "Cache hit ratio threshold",
"maximum": 1,
"minimum": 0,
"type": "number"
},
"connectionPercentage": {
"description": "Connection usage percentage threshold",
"maximum": 100,
"minimum": 0,
"type": "number"
},
"deadTuplesPercentage": {
"description": "Dead tuples percentage threshold",
"maximum": 100,
"minimum": 0,
"type": "number"
},
"longRunningQuerySeconds": {
"description": "Long-running query threshold in seconds",
"exclusiveMinimum": 0,
"type": "number"
},
"vacuumAge": {
"description": "Vacuum age threshold in days",
"exclusiveMinimum": 0,
"type": "integer"
}
},
"type": "object"
},
"connectionString": {
"type": "string"
},
"includeLocks": {
"default": false,
"type": "boolean"
},
"includeQueries": {
"default": false,
"type": "boolean"
},
"includeReplication": {
"default": false,
"type": "boolean"
},
"includeTables": {
"default": false,
"type": "boolean"
}
},
"type": "object"
}