Concurrency - CHERTS/pgscv GitHub Wiki
Starting with pgSCV version 0.13.0, it has become possible to concurrency control and limiting.
pgSCV collects monitoring metrics in parallel mode. It can establish up to 20+ parallel connections (number of connections = number of collectors) to the database.
For highly loaded databases, this may cause an additional surge in monitoring load.
We have made it possible to limit the number of parallel collector runs, for this purpose the concurrency_limit
parameter in the configuration file or the PGSCV_CONCURRENCY_LIMIT
environment variable is used.
pgSCV also checks the connection limit for the user under which monitoring is running (reads rolconnlimit from pg_roles) and if you set the concurrency limit higher than the user's allowed connections, the concurrency limit will be lowered to the user's connection limit.
Complete YAML configuration file example:
listen_address: 127.0.0.1:9890
concurrency_limit: 5
services:
"postgres1":
service_type: "postgres"
conninfo: "postgres://pgscv:pa$$w0rd@postgres1:5432/db1"
"postgres2":
service_type: "postgres"
conninfo: "postgres://pgscv:pa$$w0rd@postgres2:5432/db2"