pgwatch v5 introduces a major update to the PostgreSQL monitoring tool, focusing on enhanced stability, new features, and modernization. Key highlights include:
Major Changes
Schema migration support for PostgreSQL sinks, module version bump to v5, and migration of the web UI from react-scripts to Vite for improved performance and build efficiency.
New Features
Added metrics like stat_statements_jit, new Grafana panels (e.g., "Tables with the oldest non-frozen xid" and "Total index size"), support for reverse proxies on different paths, and functions like admin.maintain_unique_sources() for PostgreSQL sinks. Also includes graceful fallback for local log parsing and a new testutil package.
Improvements
Enhanced dashboards (e.g., Index Overview, Health Check), deprecation of old Stats Statements dashboards, refactoring of recommendation metrics, and better handling of configurations and logs. Minimum retention interval set to 1 hour.
Bug Fixes
Resolved issues with panel queries, data races in Prometheus sink, source config updates, logging, and more. Fixed circular dependencies in config upgrades and improved partition creation logic.
For full details, see the full changelog below.
What's Changed
[!]add schema migration support for PostgreSQL sinks, closes #1110 by @pashagolub in #1111[!]bump Go to v1.26 by @pashagolub in #1207[!]bump module version to v5 by @pashagolub in #1112[!]migrate webui fromreact-scriptsto Vite by @pashagolub in #1170[!]upgrade core webui dependencies by @pashagolub in #1237[+]addadmin.maintain_unique_sources()to Postgres sink by @pashagolub in #1100[+]addSingle Query Detailsprom dashboard, fixes #1169 by @Bishoywadea in #1179[+]addstat_statements_jitmetric by @0xgouda in #1054[+]addTables with the oldest non-frozen xidpanel by @0xgouda in #1133[+]addTotal index sizepanel toHealth Checkdashboard by @0xgouda in #1115[+]add graceful fallback for local log parsing by @0xgouda in #1109[+]add newtestutilpackage by @0xgouda in #1064[+]add popup dialogs for large fields, closes #1051 by @0xgouda in #1096[+]add support for reverse proxies on a different path, closes #1049 by @pashagolub in #1063[+]allow sink schema upgrades without --metrics/--sources, fixes #1114 by @pashagolub in #1175[+]apply admin functions migrations for v5, fixes #1180 by @0xgouda in #1181[+]bumpactions/cachefrom 4 to 5 by @dependabot[bot] in #1074[+]bumpactions/download-artifactfrom 6 to 7 by @dependabot[bot] in #1076[+]bumpactions/upload-artifactfrom 5 to 6 by @dependabot[bot] in #1075[+]bumpajvfrom 6.12.6 to 6.14.0 by @dependabot[bot] in #1220[+]bumpaxiosfrom 1.12.0 to 1.13.5 by @dependabot[bot] in #1197[+]bumpdocker.io/postgresto v18 by @pashagolub in #1102[+]bumpetcd/client/v3from 3.6.6 to 3.6.8 by @dependabot[bot] in #1080 #1205[+]bumpgolang-jwt/jwt/v5from 5.3.0 to 5.3.1 by @dependabot[bot] in #1149[+]bumpgoogle.golang.org/grpcfrom 1.77.0 to 1.78.0 by @dependabot[bot] in #1095[+]bumpgoogle.golang.org/protobuffrom 1.36.10 to 1.36.11 by @dependabot[bot] in #1077[+]bumpgoreleaser-actionfrom 6 to 7 by @dependabot[bot] in #1231[+]bumpgrpcfrom 1.78.0 to 1.79.1 by @dependabot[bot] in #1201 #1206[+]bumplodashfrom 4.17.21 to 4.17.23 in webui by @dependabot[bot] in #1139[+]bumpnode-forgefrom 1.3.1 to 1.3.2 by @dependabot[bot] in #1045[+]bumpshirou/gopsutil/v4from 4.25.10 to 4.26.1 by @dependabot[bot] in #1055 #1105 #1161[+]bumpsirupsen/logrusfrom 1.9.3 to 1.9.4 by @dependabot[bot] in #1124[+]bump Grafana image to v12.3 by @pashagolub in #1104[+]improveIndex overviewdashboard by @0xgouda in #1146[+]improveQuery Performance Analysisprom dashboard by @0xgouda in #1193[+]mentionAptinstallation option in docs. by @0xgouda in #1043[+]minor improvement toMissing Indexespanel by @0xgouda in #1129[+]more improvements toindex overviewdashboard by @0xgouda in #1154[-]add missing cybertec panels by @0xgouda in #1062[-]add missing newline inmetric print-sqloutput, fixes #1145 by @Abdelrhmansersawy in #1147[-]fixconfig upgradecircular dependency, closes #1156 by @pashagolub in #1171[-]fixDeleteOldPartitions()scheduling interval, fixes #1087 by @0xgouda in #1088[-]fixexpandEnvVars()to expandconnStrandGroupfields by @0xgouda in #1232[-]fixpgwatch_instance_upmetric for down sources, closes #1158 by @pashagolub in #1162[-]fix data race in Prometheus sink, fixes #1136 by @abhijeetsharma200 in #1140[-]fix error on using special chars in source names by @0xgouda in #1094[-]fix file leak inGetPathUnderlyingDeviceID, fixes #1185 by @Mazen050 in #1192[-]fix log parser to not re-read non-truncated files, fixes #1089 by @0xgouda in #1168[-]fix logging of cli options names by @0xgouda in #1178[-]fix panel queries inTable Detailsdashboard by @0xgouda in #1150[-]fix race condition inPrometheusWriter, fixes #1194 by @abhijeetsharma200 in #1195[-]fix recommendation dashboard panel name by @0xgouda in #1060[-]fix source config update handling by @0xgouda in #1106[-]fix sql ofShared Buffers hit pctpanel by @0xgouda in #1058[-]migrate all panels inHealth Checkdashboard to table format by @0xgouda in #1057[-]only create time partitions if needed by @0xgouda in #1127[-]pinpgwatch-metricsdata source to all panels and vars. by @df7cb in #1053[-]pinpgwatch-metricsdata source to all v11 panels and vars by @0xgouda in #1056[-]remove deprecated db types from webui, fixes #1044 by @0xgouda in #1047[-]remove sqls for pre postgres 14 versions by @0xgouda in #1123[-]resolve race conditions in YAML file operations, fixes #1198 by @pashagolub in #1209[-]return HTTP 405 for non-POST methods in login handler by @gemy26 in #1226[-]return the error fromMultiWriter.DefineMetrics(), fixes #1222 by @Mahmoud-Ayman-Saleh in #1224[*]allow Postgres sink schemas to exist before init/upgrade by @pashagolub in #1116[*]apply minimum retention interval to 1 hour by @pashagolub in #1052[*]deprecateStats Statements [Top|Visual|Search]dashboards by @0xgouda in #1131[*]don't remove\n \t \rmeta chars from query text by @0xgouda in #1142[*]drop redundant and unused admin functions by @0xgouda in #1191[*]fix typos in docs and source comments by @HIJOdelIDANII in #1204[*]ignore revive lintervar-namingwarning forapipackage by @pashagolub in #1069[*]improve Prometheus Health-check dashboard by @kmoppel in #1130[*]migrate all helpers totestutilby @0xgouda in #1071[*]monitor specified groups only, fixes #1093 by @0xgouda in #1163[*]move cache to Prometheus sink struct, closes #1176 by @abhijeetsharma200 in #1177[*]optimizePrometheusWriter.Collectlocking, fixes #1189 by @abhijeetsharma200 in #1190[*]refactorreco_add_indexmetric by @0xgouda in #1117[*]refactorreco_drop_indexmetric by @0xgouda in #1121[*]relocate% DB Totalcolumn inQuery Performance Analysisdashboard by @0xgouda in #1066[*]removefmt.Printlnfromwebservertests by @Makeepan-dev in #1218[*]remove redundantSource NamefromTables Overviewdashboard, fixes #1134 by @Mohamed-Elfardy in #1160[*]set lock_timeout via connection RuntimeParams instead of per-query transaction by @NikolayS in #1067[*]sort webui preset selection list and add descriptions, fixes #1050 by @pashagolub in #1172[*]suppressgolangci-lintvar naming warnings by @pashagolub in #1196[*]usetestutilpackage in the main integration test by @pashagolub in #1101
New Contributors
- @NikolayS made their first contribution in #1067
- @Abdelrhmansersawy made their first contribution in #1147
- @abhijeetsharma200 made their first contribution in #1140
- @Mohamed-Elfardy made their first contribution in #1160
- @HIJOdelIDANII made their first contribution in #1204
- @Mazen050 made their first contribution in #1192
- @Bishoywadea made their first contribution in #1179
- @Mahmoud-Ayman-Saleh made their first contribution in #1224
- @gemy26 made their first contribution in #1226
- @Makeepan-dev made their first contribution in #1218
Full Changelog: v4.1.0...v5.0.0