PostgreSQL fieldsedit

Metrics collected from PostgreSQL servers.

postgresql fieldsedit

PostgreSQL metrics.

activity fieldsedit

One 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.oidedit

type: long

OID of the database this backend is connected to.

postgresql.activity.database.nameedit

type: keyword

Name of the database this backend is connected to.

postgresql.activity.pidedit

type: long

Process ID of this backend.

postgresql.activity.user.idedit

type: long

OID of the user logged into this backend.

postgresql.activity.user.nameedit

Name of the user logged into this backend.

postgresql.activity.application_nameedit

Name of the application that is connected to this backend.

postgresql.activity.client.addressedit

IP address of the client connected to this backend.

postgresql.activity.client.hostnameedit

Host name of the connected client, as reported by a reverse DNS lookup of client_addr.

postgresql.activity.client.portedit

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_startedit

type: date

Time when this process was started, i.e., when the client connected to the server.

postgresql.activity.transaction_startedit

type: date

Time when this process' current transaction was started.

postgresql.activity.query_startedit

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_changeedit

type: date

Time when the state was last changed.

postgresql.activity.waitingedit

type: boolean

True if this backend is currently waiting on a lock.

postgresql.activity.stateedit

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.queryedit

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 fieldsedit

Statistics about the background writer process’s activity. Collected using the pg_stat_bgwriter query.

postgresql.bgwriter.checkpoints.schedulededit

type: long

Number of scheduled checkpoints that have been performed.

postgresql.bgwriter.checkpoints.requestededit

type: long

Number of requested checkpoints that have been performed.

postgresql.bgwriter.checkpoints.times.write.msedit

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.msedit

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.checkpointsedit

type: long

Number of buffers written during checkpoints.

postgresql.bgwriter.buffers.cleanedit

type: long

Number of buffers written by the background writer.

postgresql.bgwriter.buffers.clean_fulledit

type: long

Number of times the background writer stopped a cleaning scan because it had written too many buffers.

postgresql.bgwriter.buffers.backendedit

type: long

Number of buffers written directly by a backend.

postgresql.bgwriter.buffers.backend_fsyncedit

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.allocatededit

type: long

Number of buffers allocated.

postgresql.bgwriter.stats_resetedit

type: date

Time at which these statistics were last reset.

database fieldsedit

One row per database, showing database-wide statistics. Collected by querying pg_stat_database

postgresql.database.oidedit

type: long

OID of the database this backend is connected to.

postgresql.database.nameedit

type: keyword

Name of the database this backend is connected to.

postgresql.database.number_of_backendsedit

type: long

Number of backends currently connected to this database.

postgresql.database.transactions.commitedit

type: long

Number of transactions in this database that have been committed.

postgresql.database.transactions.rollbackedit

type: long

Number of transactions in this database that have been rolled back.

postgresql.database.blocks.readedit

type: long

Number of disk blocks read in this database.

postgresql.database.blocks.hitedit

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.msedit

type: long

Time spent reading data file blocks by backends in this database, in milliseconds.

postgresql.database.blocks.time.write.msedit

type: long

Time spent writing data file blocks by backends in this database, in milliseconds.

postgresql.database.rows.returnededit

type: long

Number of rows returned by queries in this database.

postgresql.database.rows.fetchededit

type: long

Number of rows fetched by queries in this database.

postgresql.database.rows.insertededit

type: long

Number of rows inserted by queries in this database.

postgresql.database.rows.updatededit

type: long

Number of rows updated by queries in this database.

postgresql.database.rows.deletededit

type: long

Number of rows deleted by queries in this database.

postgresql.database.conflictsedit

type: long

Number of queries canceled due to conflicts with recovery in this database.

postgresql.database.temporary.filesedit

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.bytesedit

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.deadlocksedit

type: long

Number of deadlocks detected in this database.

postgresql.database.stats_resetedit

type: date

Time at which these statistics were last reset.