pgpro-otel-collector has the following requirements and limitations:
pgpro-otel-collector must be able to connect to a Postgres Pro instance. Connection parameters are defined in the configuration file and can be modified as needed.
The user connecting to the DBMS must have relevant rights and access to internal activity statistics.
Privileged access (root) to the procfs file system
may be required for operating system metrics collection by the
hostmetrics receiver.
For example, such access is specifically required by the
process plugin.
Collecting DBMS instance activity logs with the filelog
receiver requires access to the relevant directories and log
files.
The prometheus exporter has limited scalability under
high loads. For troubleshooting guidance, refer to
Section 9.3.
The memory_limiter processor drops data when memory
limits are exceeded, potentially causing data loss and additional CPU
load. For related issues and solutions, refer to
Section 9.4.
The plugins listed below require additional configuration or access privileges. Make sure you complete the specified steps.
All access privileges must be granted to the user under which
pgpro-otel-collector runs and collects metrics
(otelcol in this documentation). For more
information on how to set up a DBMS user, refer to
Section 6.6.2.1.
For bloat_indexes, run this command in all target databases:
GRANT SELECT ON pg_statistic TO otelcol;
On large databases, the bloat_indexes and bloat_tables plugins may cause significant response delays during initial data collection. To mitigate this, the fetcher process can be set up for background data loading in custom-sized batches.
Example of the fetcher configuration for bloat_tables:
bloat_tables:
enabled: true
collection_interval: 5m
fetcher:
# Whether to delay metric availability until initial data loading completes
wait_init: false
# Enable detailed logging for debugging purposes
extended_log_enabled: false
# Number of records to fetch in each batch
batch_size: 10000
For the bloat_tables, cfs, tables, and indexes plugins, execute the following command for all collected schemas:
GRANT USAGE ON SCHEMA schema_name TO otelcol;
buffercache requires additional setup:
Install the pg_buffercache extension by
adding pg_buffercache to the
shared_preload_libraries variable in the
postgresql.conf file.
Restart the DBMS server.
Run this command in all target databases:
CREATE EXTENSION pg_buffercache;
Execute the following command:
GRANT pg_monitor TO otelcol;
For databases, the DBMS user must
have permission to execute the pg_ls_dir
and pg_stat_file functions for all target
databases to collect data from orphaned files:
GRANT EXECUTE ON FUNCTION pg_ls_dir(text) TO otelcol; GRANT EXECUTE ON FUNCTION pg_ls_dir(text,boolean,boolean) TO otelcol; GRANT EXECUTE ON FUNCTION pg_stat_file(text) TO otelcol;
statements_* requires additional setup:
Install the pg_stat_statements extension
by adding pg_stat_statements to the
shared_preload_libraries variable in the
postgresql.conf file.
Restart the DBMS server.
Run this command in all target databases:
CREATE EXTENSION pg_stat_statements;
Execute the following command:
GRANT pg_monitor TO otelcol;
For tablespaces, run this command:
GRANT pg_monitor TO otelcol;
wait_sampling requires additional setup:
Install the pg_wait_sampling extension by
adding pg_wait_sampling to the
shared_preload_libraries variable in the
postgresql.conf file.
Restart the DBMS server.
Run this command in all target databases:
CREATE EXTENSION pg_wait_sampling;