Free Report! Gartner® Hype Cycle™ for Monitoring and Observability.Read more

PostgreSQL

Supported Platforms

PlatformMetricsLogsTraces
Linux
Windows
macOS

Prerequisites

This source supports PostgreSQL versions 10.18 and higher.

The monitoring user must be granted SELECT on pg_stat_database.

Configuration Table

ParameterTypeDefaultDescription
telemetry_typestelemetrySelector["Logs", "Metrics"]Choose Telemetry Type.
postgresql_log_pathstringsFor CentOS / RHEL: - \"/var/log/postgresql/postgresql_.log\" \nFor SLES: - \"/var/lib/pgsql/data/log/postgresql_.log\" \nFor Debian / Ubuntu: - \"/var/lib/pgsql/_/data/log/postgresql_.log\"Path to Postgres log file(s).
start_atenumendStart reading the file from the 'beginning' or 'end'.
username*stringUsername used to authenticate.
password*stringPassword used to authenticate.
endpointstringlocalhost:5432The endpoint of the Postgres server. If transport is set to unix, the endpoint will internally be translated from host:port to /host.s.PGSQL.port.
transportenumtcpThe transport protocol used to connect to Postgres. Valid values are tcp, or unix.
databasesstringsThe list of databases for which the receiver will attempt to collect statistics. If an empty list is provided, the receiver will attempt to collect statistics for all databases.
collection_intervalint60Sets how often (seconds) to scrape for metrics.
enable_tlsboolfalseWhether or not to use TLS.
enable_tlsinsecure_skip_verifyboolfalseEnable to skip TLS certificate verification.
ca_filestringCertificate authority used to validate the database server's TLS certificate.
cert_filestringA TLS certificate used for client authentication, if mutual TLS is enabled.
key_filestringA TLS private key used for client authentication, if mutual TLS is enabled.
*required field