Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Gatherer - full redesign of connection pooling, relying on *sqlx.DB #418

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ENV_VARIABLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ NB! Some variables influence multiple components. Command line parameters overri
- **PW2_INSTANCE_LEVEL_CACHE_MAX_SECONDS** Max allowed staleness for instance level metric data shared between DBs of an instance. Affects 'continuous' host types only. Set to 0 to disable. Default: 30
- **PW2_DIRECT_OS_STATS** Extract OS related psutil statistics not via PL/Python wrappers but directly on host, i.e. assumes "push" setup. Default: off.
- **PW2_MIN_DB_SIZE_MB** Smaller size DBs will be ignored and not monitored until they reach the threshold. Default: 0 (no size-based limiting).
- **PW2_MAX_PARALLEL_CONNECTIONS_PER_DB** Max parallel metric fetches per DB. Note the multiplication effect on multi-DB instances. Default: 2


## Web UI
Expand Down
4 changes: 2 additions & 2 deletions pgwatch2/logparse.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ func tryDetermineLogFolder(mdb MonitoredDatabase) string {
sql := `select current_setting('data_directory') as dd, current_setting('log_directory') as ld`

log.Infof("[%s] Trying to determine server logs folder via SQL as host_config.logs_glob_path not specified...", mdb.DBUniqueName)
data, err, _ := DBExecReadByDbUniqueName(mdb.DBUniqueName, "", false, 0, sql)
data, err, _ := DBExecReadByDbUniqueName(mdb.DBUniqueName, "", 0, sql)
if err != nil {
log.Errorf("[%s] Failed to query data_directory and log_directory settings...are you superuser or have pg_monitor grant?", mdb.DBUniqueName)
return ""
Expand All @@ -390,7 +390,7 @@ func tryDetermineLogMessagesLanguage(mdb MonitoredDatabase) string {
sql := `select current_setting('lc_messages')::varchar(2) as lc_messages;`

log.Debugf("[%s] Trying to determine server log messages language...", mdb.DBUniqueName)
data, err, _ := DBExecReadByDbUniqueName(mdb.DBUniqueName, "", false, 0, sql)
data, err, _ := DBExecReadByDbUniqueName(mdb.DBUniqueName, "", 0, sql)
if err != nil {
log.Errorf("[%s] Failed to lc_messages settings: %s", mdb.DBUniqueName, err)
return ""
Expand Down
Loading