PostgreSQL is a powerful, open source object-relational database system.
Setup & Configuration
The PostgreSQL plugin is included with the Atatus Infra agent by default, please follow the below section to enable.
Copy the PostgreSQL example configuration file.
copycd /etc/atatus-infra-agent/conf.d/postgresql.d/ sudo cp postgresql.yml.template postgresql.yml
Update the file
/etc/atatus-infra-agent/conf.d/postgresql.d/postgresql.yml
with below configurations.copy# Metrics section metrics: # The host must be passed as PostgreSQL URL. Example: - hosts: ["postgres://localhost:5432"] # Username to use when connecting to PostgreSQL. Empty by default. #username: user # Password to use when connecting to PostgreSQL. Empty by default. #password: pass # Enable database monitoring #dbm: true
Restart the atatus infrastructure agent.
copysudo service atatus-infra-agent restart
Metrics
Name | Description | Type |
---|---|---|
postgresql.database.rows.returned | Number of rows returned by queries in this database. | long |
postgresql.database.rows.fetched | Number of rows fetched by queries in this database. | long |
postgresql.database.rows.inserted | Number of rows inserted by queries in this database. | long |
postgresql.database.rows.updated | Number of rows updated by queries in this database. | long |
postgresql.database.number_of_backends | Number of backends currently connected to this database. | long |