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.

  1. Copy the PostgreSQL example configuration file.

    copy
    icon/buttons/copy
    cd /etc/atatus-infra-agent/conf.d/postgresql.d/
    sudo cp postgresql.yml.template postgresql.yml
    
  2. Update the file /etc/atatus-infra-agent/conf.d/postgresql.d/postgresql.yml with below configurations.

    copy
    icon/buttons/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
    
  3. Restart the atatus infrastructure agent.

    copy
    icon/buttons/copy
    sudo 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