NOTE: You are looking at documentation for an older release. 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
-
type: long
OID of the database this backend is connected to.
-
postgresql.activity.database.name
-
type: keyword
Name of the database this backend is connected to.
-
postgresql.activity.pid
-
type: long
Process ID of this backend.
-
postgresql.activity.user.id
-
type: long
OID of the user logged into this backend.
-
postgresql.activity.user.name
-
Name of the user logged into this backend.
-
postgresql.activity.application_name
-
Name of the application that is connected to this backend.
-
postgresql.activity.client.address
-
IP address of the client connected to this backend.
-
postgresql.activity.client.hostname
-
Host name of the connected client, as reported by a reverse DNS lookup of client_addr.
-
postgresql.activity.client.port
-
type: 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
-
type: date
Time when this process was started, i.e., when the client connected to the server.
-
postgresql.activity.transaction_start
-
type: date
Time when this process' current transaction was started.
-
postgresql.activity.query_start
-
type: 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
-
type: date
Time when the state was last changed.
-
postgresql.activity.waiting
-
type: boolean
True if this backend is currently waiting on a lock.
-
postgresql.activity.state
-
Current 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
-
Text 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
-
type: long
Number of scheduled checkpoints that have been performed.
-
postgresql.bgwriter.checkpoints.requested
-
type: long
Number of requested checkpoints that have been performed.
-
postgresql.bgwriter.checkpoints.times.write.ms
-
type: 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
-
type: 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
-
type: long
Number of buffers written during checkpoints.
-
postgresql.bgwriter.buffers.clean
-
type: long
Number of buffers written by the background writer.
-
postgresql.bgwriter.buffers.clean_full
-
type: long
Number of times the background writer stopped a cleaning scan because it had written too many buffers.
-
postgresql.bgwriter.buffers.backend
-
type: long
Number of buffers written directly by a backend.
-
postgresql.bgwriter.buffers.backend_fsync
-
type: 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
-
type: long
Number of buffers allocated.
-
postgresql.bgwriter.stats_reset
-
type: 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
-
type: long
OID of the database this backend is connected to.
-
postgresql.database.name
-
type: keyword
Name of the database this backend is connected to.
-
postgresql.database.number_of_backends
-
type: long
Number of backends currently connected to this database.
-
postgresql.database.transactions.commit
-
type: long
Number of transactions in this database that have been committed.
-
postgresql.database.transactions.rollback
-
type: long
Number of transactions in this database that have been rolled back.
-
postgresql.database.blocks.read
-
type: long
Number of disk blocks read in this database.
-
postgresql.database.blocks.hit
-
type: 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
-
type: long
Time spent reading data file blocks by backends in this database, in milliseconds.
-
postgresql.database.blocks.time.write.ms
-
type: long
Time spent writing data file blocks by backends in this database, in milliseconds.
-
postgresql.database.rows.returned
-
type: long
Number of rows returned by queries in this database.
-
postgresql.database.rows.fetched
-
type: long
Number of rows fetched by queries in this database.
-
postgresql.database.rows.inserted
-
type: long
Number of rows inserted by queries in this database.
-
postgresql.database.rows.updated
-
type: long
Number of rows updated by queries in this database.
-
postgresql.database.rows.deleted
-
type: long
Number of rows deleted by queries in this database.
-
postgresql.database.conflicts
-
type: long
Number of queries canceled due to conflicts with recovery in this database.
-
postgresql.database.temporary.files
-
type: 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
-
type: 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
-
type: long
Number of deadlocks detected in this database.
-
postgresql.database.stats_reset
-
type: date
Time at which these statistics were last reset.
statement fields
editOne document per query per user per database, showing information related invocation of that query, such as cpu usage and total time. Collected by querying pg_stat_statements.
-
postgresql.statement.user.id
-
type: long
OID of the user logged into the backend that ran the query.
-
postgresql.statement.database.oid
-
type: long
OID of the database the query was run on.
-
postgresql.statement.query.id
-
type: long
ID of the statement.
-
postgresql.statement.query.text
-
Query text
-
postgresql.statement.query.calls
-
type: long
Number of times the query has been run.
-
postgresql.statement.query.rows
-
type: long
Total number of rows returned by query.
-
postgresql.statement.time.total
-
type: long
Total number of milliseconds spent running query.
-
postgresql.statement.time.min
-
type: long
Minimum number of milliseconds spent running query.
-
postgresql.statement.time.max
-
type: long
Maximum number of milliseconds spent running query.
-
postgresql.statement.time.mean
-
type: long
Mean number of milliseconds spent running query.
-
postgresql.statement.time.stddev
-
type: long
Population standard deviation of time spent running query, in milliseconds.
-
postgresql.statement.memory.shared.hit
-
type: long
Total number of shared block cache hits by the query.
-
postgresql.statement.memory.shared.read
-
type: long
Total number of shared block cache read by the query.
-
postgresql.statement.memory.shared.dirtied
-
type: long
Total number of shared block cache dirtied by the query.
-
postgresql.statement.memory.shared.written
-
type: long
Total number of shared block cache written by the query.
-
postgresql.statement.memory.local.hit
-
type: long
Total number of local block cache hits by the query.
-
postgresql.statement.memory.local.read
-
type: long
Total number of local block cache read by the query.
-
postgresql.statement.memory.local.dirtied
-
type: long
Total number of local block cache dirtied by the query.
-
postgresql.statement.memory.local.written
-
type: long
Total number of local block cache written by the query.
-
postgresql.statement.memory.temp.read
-
type: long
Total number of temp block cache read by the query.
-
postgresql.statement.memory.temp.written
-
type: long
Total number of temp block cache written by the query.