WARNING: Version 5.5 of Metricbeat has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
PostgreSQL Fields
editPostgreSQL Fields
editMetrics collected from PostgreSQL servers.
postgresql Fields
editPostgreSQL metrics.
activity Fields
editOne document per server process, showing information related to the current activity of that process, such as state and current query. Collected by querying pg_stat_activity.
postgresql.activity.database.oid
edittype: long
OID of the database this backend is connected to.
postgresql.activity.database.name
edittype: keyword
Name of the database this backend is connected to.
postgresql.activity.pid
edittype: long
Process ID of this backend.
postgresql.activity.user.id
edittype: long
OID of the user logged into this backend.
postgresql.activity.user.name
editName of the user logged into this backend.
postgresql.activity.application_name
editName of the application that is connected to this backend.
postgresql.activity.client.address
editIP address of the client connected to this backend.
postgresql.activity.client.hostname
editHost name of the connected client, as reported by a reverse DNS lookup of client_addr.
postgresql.activity.client.port
edittype: long
TCP port number that the client is using for communication with this backend, or -1 if a Unix socket is used.
postgresql.activity.backend_start
edittype: date
Time when this process was started, i.e., when the client connected to the server.
postgresql.activity.transaction_start
edittype: date
Time when this process' current transaction was started.
postgresql.activity.query_start
edittype: date
Time when the currently active query was started, or if state is not active, when the last query was started.
postgresql.activity.state_change
edittype: date
Time when the state was last changed.
postgresql.activity.waiting
edittype: boolean
True if this backend is currently waiting on a lock.
postgresql.activity.state
editCurrent overall state of this backend. Possible values are:
- active: The backend is executing a query.
- idle: The backend is waiting for a new client command.
- idle in transaction: The backend is in a transaction, but is not currently executing a query.
- idle in transaction (aborted): This state is similar to idle in transaction, except one of the statements in the transaction caused an error.
- fastpath function call: The backend is executing a fast-path function.
- disabled: This state is reported if track_activities is disabled in this backend.
postgresql.activity.query
editText of this backend’s most recent query. If state is active this field shows the currently executing query. In all other states, it shows the last query that was executed.
bgwriter Fields
editStatistics about the background writer process’s activity. Collected using the pg_stat_bgwriter query.
postgresql.bgwriter.checkpoints.scheduled
edittype: long
Number of scheduled checkpoints that have been performed.
postgresql.bgwriter.checkpoints.requested
edittype: long
Number of requested checkpoints that have been performed.
postgresql.bgwriter.checkpoints.times.write.ms
edittype: float
Total amount of time that has been spent in the portion of checkpoint processing where files are written to disk, in milliseconds.
postgresql.bgwriter.checkpoints.times.sync.ms
edittype: float
Total amount of time that has been spent in the portion of checkpoint processing where files are synchronized to disk, in milliseconds.
postgresql.bgwriter.buffers.checkpoints
edittype: long
Number of buffers written during checkpoints.
postgresql.bgwriter.buffers.clean
edittype: long
Number of buffers written by the background writer.
postgresql.bgwriter.buffers.clean_full
edittype: long
Number of times the background writer stopped a cleaning scan because it had written too many buffers.
postgresql.bgwriter.buffers.backend
edittype: long
Number of buffers written directly by a backend.
postgresql.bgwriter.buffers.backend_fsync
edittype: long
Number of times a backend had to execute its own fsync call (normally the background writer handles those even when the backend does its own write)
postgresql.bgwriter.buffers.allocated
edittype: long
Number of buffers allocated.
postgresql.bgwriter.stats_reset
edittype: date
Time at which these statistics were last reset.
database Fields
editOne row per database, showing database-wide statistics. Collected by querying pg_stat_database
postgresql.database.oid
edittype: long
OID of the database this backend is connected to.
postgresql.database.name
edittype: keyword
Name of the database this backend is connected to.
postgresql.database.number_of_backends
edittype: long
Number of backends currently connected to this database.
postgresql.database.transactions.commit
edittype: long
Number of transactions in this database that have been committed.
postgresql.database.transactions.rollback
edittype: long
Number of transactions in this database that have been rolled back.
postgresql.database.blocks.read
edittype: long
Number of disk blocks read in this database.
postgresql.database.blocks.hit
edittype: long
Number of times disk blocks were found already in the buffer cache, so that a read was not necessary (this only includes hits in the PostgreSQL buffer cache, not the operating system’s file system cache).
postgresql.database.blocks.time.read.ms
edittype: long
Time spent reading data file blocks by backends in this database, in milliseconds.
postgresql.database.blocks.time.write.ms
edittype: long
Time spent writing data file blocks by backends in this database, in milliseconds.
postgresql.database.rows.returned
edittype: long
Number of rows returned by queries in this database.
postgresql.database.rows.fetched
edittype: long
Number of rows fetched by queries in this database.
postgresql.database.rows.inserted
edittype: long
Number of rows inserted by queries in this database.
postgresql.database.rows.updated
edittype: long
Number of rows updated by queries in this database.
postgresql.database.rows.deleted
edittype: long
Number of rows deleted by queries in this database.
postgresql.database.conflicts
edittype: long
Number of queries canceled due to conflicts with recovery in this database.
postgresql.database.temporary.files
edittype: long
Number of temporary files created by queries in this database. All temporary files are counted, regardless of why the temporary file was created (e.g., sorting or hashing), and regardless of the log_temp_files setting.
postgresql.database.temporary.bytes
edittype: long
Total amount of data written to temporary files by queries in this database. All temporary files are counted, regardless of why the temporary file was created, and regardless of the log_temp_files setting.
postgresql.database.deadlocks
edittype: long
Number of deadlocks detected in this database.
postgresql.database.stats_reset
edittype: date
Time at which these statistics were last reset.