-
Notifications
You must be signed in to change notification settings - Fork 68
Labels
bugSomething isn't workingSomething isn't workingconfigConfiguration store relatedConfiguration store relatedsourcesWhat sources and in what way to monitorWhat sources and in what way to monitor
Description
Describe the bug
Any update to a source's connection string (e.g., param change, pointing to a different database, etc.) is never applied to already started gatherers
To Reproduce
Steps to reproduce the behavior:
- Update
reaper.go:506to show the conn str in the logsl.WithField("cache", fromCache).WithField("rows", len(data)).WithField("conn_str", md.ConnStr).Info("measurements fetched") - Run pgwatch with a single source and some metrics
- Update the conn str of the used source
- Observe that the old gatherers will keep using the old conn str
Expected behavior
Should we allow updating the conn str of a source? If we should, this is a bug; if we shouldn't, we should disallow it from the web UI at least and mention it in the documentation.
Screenshots
two metrics for a single source fetching from 2 different databases because one of them is still using the old conn str:
2025-12-18 16:40:37.626 [INFO] [source:test] [metric:db_size] [rows:1] [cache:false] [conn_str:postgresql://postgres:postgres@localhost:5437/postgres] measurements fetched
2025-12-18 16:40:42.603 [INFO] [source:test] [metric:wal] [rows:1] [cache:true] [conn_str:postgresql://postgres:postgres@localhost:5437/pgwatch_metrics] measurements fetched
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingconfigConfiguration store relatedConfiguration store relatedsourcesWhat sources and in what way to monitorWhat sources and in what way to monitor