Files
apache--hertzbeat/home/docs/help/postgresql.md
T
wehub-resource-sync c8cebdfeee
MCP Bash Server CI / Test MCP Bash Server (dev) (push) Has been cancelled
MCP Bash Server CI / Test MCP Bash Server (release) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:11:39 +08:00

68 lines
6.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
id: postgresql
title: MonitoringPostgreSQL database monitoring
sidebar_label: PostgreSQL database
keywords: [open source monitoring tool, open source database monitoring tool, monitoring postgresql database metrics]
---
> Collect and monitor the general performance Metrics of PostgreSQL database. Support PostgreSQL 10+.
## Configuration parameter
| Parameter name | Parameter help description |
|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Monitoring Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) |
| Monitoring name | Identify the name of this monitoring. The name needs to be unique |
| Port | Port provided by the database. The default is 5432 |
| Query timeout | Set the timeout time when SQL query does not respond to data, unit: ms, default: 3000ms |
| Database name | Database instance name, optional |
| Username | Database connection user name, optional |
| Password | Database connection password, optional |
| URL | Database connection URLoptionalIf configured, the database name, user name, password and other parameters in the URL will overwrite the above configured parameters |
| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds |
| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful |
| Description remarks | For more information about identifying and describing this monitoring, users can note information here |
### Collection Metric
#### Metric setbasic
| Metric name | Metric unit | Metric help description |
|-----------------|-------------|-------------------------------------------|
| server_version | none | Version number of the database server |
| port | none | Database server exposure service port |
| server_encoding | none | Character set encoding of database server |
| data_directory | none | Database storage data disk address |
| max_connections | connections | Database maximum connections |
#### Metric setstate
| Metric name | Metric unit | Metric help description |
|----------------|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| name | none | Database name, or share-object is a shared object |
| conflicts | times | The number of queries canceled in the database due to a conflict with recovery |
| deadlocks | number | Number of deadlocks detected in the database |
| blks_read | times | The number of disk blocks read in the database |
| blks_hit | times | Times the disk block has been found to be in the buffer, so there is no need to read it once (This only includes hits in the PostgreSQL buffer, not in the operating system file system buffer) |
| blk_read_time | ms | Time spent by the backend reading data file blocks in the database |
| blk_write_time | ms | Time spent by the backend writing data file blocks in the database |
| stats_reset | none | The last time these statistics were reset |
#### Metric setactivity
| Metric name | Metric unit | Metric help description |
|-------------|-------------|--------------------------------------|
| running | connections | Number of current client connections |
#### Metric setusers
| Metric name | Metric unit | Metric help description |
|-------------------|-------------|------------------------------------------------------------|
| usename | none | Database user name |
| usesysid | none | User system ID |
| usecreatedb | none | Whether user can create databases (Y/N) |
| usesuper | none | Whether user is a superuser (Y/N) |
| valuntil | none | Password expiration time (timestamp) |
| days_left | days | Days remaining until password expires |
| account_status | none | Account status (OPEN/EXPIRED) |