You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* deprecate `--direct-os-stats` flag. Direct OS stats are now fetched
automatically when pgwatch runs on the same host as PostgreSQL.
- `IsDirectlyFetchableMetric()` now auto-detects same-host
- Removed `r.Metrics.DirectOSStats` flag checks from reaper
- Added `SourceConn.IsClientOnSameHost()` helper method
* Improve comment clarity.
* Tag `--direct-os-stats` with `hidden` due to deprecation.
* Log warning if deprecated `--direct-os-stats` flag is used.
* Remove `--direct-os-stats` from docs.
* Mention that pgwatch now auto-detects this.
* Add integration test for non-direct os stats via postgresql.
* Improve comments in `IsClientOnSameHost()`
* remove trailing whitespaces
* Ensure `jsonSink` is truncated before test.
---------
Co-authored-by: Pavlo Golub <pavlo.golub@gmail.com>
Copy file name to clipboardExpand all lines: internal/metrics/cmdopts.go
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ import (
7
7
// CmdOpts specifies metric command-line options
8
8
typeCmdOptsstruct {
9
9
Metricsstring`short:"m" long:"metrics" mapstructure:"metrics" description:"Postgres URI or path to YAML file with metrics definitions" env:"PW_METRICS"`
10
-
DirectOSStatsbool`long:"direct-os-stats" mapstructure:"direct-os-stats" description:"Extract OS related psutil statistics not via PL/Python wrappers but directly on host" env:"PW_DIRECT_OS_STATS"`
10
+
DirectOSStatsbool`hidden:"true" long:"direct-os-stats" mapstructure:"direct-os-stats" description:"Extract OS related psutil statistics not via PL/Python wrappers but directly on host" env:"PW_DIRECT_OS_STATS"`
11
11
InstanceLevelCacheMaxSecondsint64`long:"instance-level-cache-max-seconds" mapstructure:"instance-level-cache-max-seconds" description:"Max allowed staleness for instance level metric data shared between DBs of an instance. Set to 0 to disable" env:"PW_INSTANCE_LEVEL_CACHE_MAX_SECONDS" default:"30"`
12
12
EmergencyPauseTriggerfilestring`long:"emergency-pause-triggerfile" mapstructure:"emergency-pause-triggerfile" description:"When the file exists no metrics will be temporarily fetched" env:"PW_EMERGENCY_PAUSE_TRIGGERFILE" default:"/tmp/pgwatch-emergency-pause"`
0 commit comments