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

Releases: lesovsky/pgscv

0.7.0

11 Jul 07:02
Compare
Choose a tag to compare

Changelog

  • Add Patroni support.
  • Add compatibility of Patroni metrics with Patroni built-in metrics introduced in 2.1.0.
  • Add TLS support.
  • Add basic authentication.
  • Discovery postgres settings before every collector call. Postgres settings describe properties of Postgres, such as version, data and WAL blocks size, location of pg_stat_statements, and so on. These settings are used by collectors to adjust metrics collecting. Previous version discover settings once at first connecting to Postgres. In case when Postgres properties are changed (due to upgrade for example) it might break collectors logic tied to settings. To fix this, pgSCV have to be restarted. Now Postgres settings updated at every collect. This incur some overhead, but remove necessity of restart pgSCV if important settings had been changed.
  • Remove query normalization; Use 'queryid' label instead on 'md5' in statements metrics. This is the compatibility breaking change - set of labels of statements metrics has been changed.
  • Introduce ADR.
  • Fix disabling auto-discovery when configuring only using ENV vars.
  • Fix metrics collecting when filesystem hangs.

v0.6.1

23 Jun 12:25
Compare
Choose a tag to compare

Changelog

94a24c0 Use pg_table_size() when collecting size of tables. Previously used pg_relation_size() doesn't account size of all forks and TOASTed data, and table size might seemed incomplete.

v0.6.0

11 Jun 04:21
Compare
Choose a tag to compare

Changelog

7045716 Add new vmstat metrics into test checks.
c009496 Adjust README accordingly to v0.6.0.
4b131aa Don't expose 'instance' label on metrics. This label added automatically by Prometheus when scraping.

v0.6.0-rc1

08 Jun 12:41
Compare
Choose a tag to compare

Changelog

4a44408 Add 'PostgresServiceConfig.LocalService' which defines service locality.
a8ad895 Add constructor functions for creating typed metric descriptors.
2367863 Add create/push latest docker image.
64cc4e8 Add extra questions to the bug report template.
f47fdcb Add infrastructure for global filters.
c3de7b9 Add pgbouncer_up metric.
188eb81 Add postgres_up and postgres_start_time_seconds metrics.
35e4490 Add support of DATABASE_DSN environment variables (alias for POSTGRES_DSN).
c5cd9f6 Add support of PGSCV_DISABLE_COLLECTORS environment variables.
87bba60 Add support of environment variables.
4cf63b4 Add support of filters for all builtin collectors, part 2. Remove default existing filters for block/network devices and filesystems.
02e84b1 Add support of filters for all builtin collectors.
5fb2a10 Add timestamp query arg when sending metrics to remote service.
116fda8 Cosmetic changes.
9d22593 Fix handling comments on queries processing. It was mistakenly consider '//' as comments instead of '--'. Also change the order - trim comments before trimming newlines, because in old order after trimming newlines, comment could propagate to next lines and the whole query could be considered wrong.
2e07cd6 Fix: add mistakenly forgotten factor property.
1bfec4e Postpone service locality check. Do it after collecting metrics about temp files, because it doesn't require filesystem access. Collect metrics about log directory only if logging_collector in 'on'.
a8ed208 README: update version, add authors section.
c73ae37 Remove forgotten TODO note.
ebed2e3 Remove forgotten example test.
f6a22b5 Rename typedDesc fields to more appropriate.
bab1428 postgres/logs: skip collecting metrics if service is remote.
e2d4635 postgres/settings: skip collecting 'postgres_service_files_info' metrics if service is remote.
eb26783 postgres/storage: skip collecting metrics if service is remote.

v0.5.0

24 May 07:22
Compare
Choose a tag to compare

Changelog

fedf358 Fix counter metrics names, add _total suffix.
7b8fe14 postgres/activity collector: refactor queries.
a0b6af1 postgres/activity collector: skip null databases (bgdaemons) when counting states.

v0.4.24

20 May 05:26
Compare
Choose a tag to compare

Changelog

8547190 Add 'databases' property into YAML configuration - it is used for clarifying databases from which builtin metrics should be collected. Add database skip logic into functions, tables, indexes, schema collectors.
59e1da4 Check data types are safe in returned query result.
340c521 Disable TestRepository_lookupServices test, it is broken when running in Docker env. Discovery logic uses 'cwd' instead of 'cmdline' and cwd is limited only for process owner - even root cannot read cwd.
4462e58 Fix tests. Update docker-test-runner image - create pg_stat_statements in fixtures database.
625ccfa Postgres auto-discovery: use current working directory when looking for postmaster.pid.
3478cb0 Remove or disable excessive debug messages.
514381a Reorganize auto-discovery code, add error checking, comments, tests.
53ee1b5 Reorganize discovering of pg_stat_statements: - discover it at startup when doing initial configuration; - discover exact schema where it is installed; - avoid updating config during Update method (potential data race).
d1f6dab postgres/database collector: Use const when datname is NULL.

v0.4.23

16 May 18:06
Compare
Choose a tag to compare

Changelog

e9c089c Add collectors settings: Move postgres_custom functionality to common collector level.
75d0703 Add collectors settings: add collectors settings validation when loading YAML configuration.
9844737 Add collectors settings: add models, config processing, tests.
42d8249 Add collectors settings: implement postgres/custom collector (+tests).
1a3a076 Add collectors settings: make possible to specify collecting metrics from multiple databases.
d2ef817 Add collectors settings: propagate collector settings from YAML configuration to functions where collectors are created.
86ac1e3 Add detecting collisions between subsystems.
0d0a82c Add extra validations for YAML configuration of user-defined metrics: - value and labeled_values must not be empty together; - value and labeled_values must be used together;
1f5e0cd Add namespace and subsystem names when creating typedDescSet.
1917a8b Add support for user-defined metrics to postgres/activity collector.
122e984 Add support for user-defined metrics to postgres/bgwriter collector.
54b920f Add support for user-defined metrics to postgres/databases collector.
18a9765 Add support for user-defined metrics to postgres/indexes collector.
808facb Auto-update: when executing under unprivileged user, try to restart systemd service using sudo.
73e4e41 Config: use map for services connection settings. Using maps we could guarantee services uniqueness from config file level.
c8dd46d Cosmetic code changes - break big functions to smaller, rename variables, re-arrange sections.
77c4e23 Disallow NULL values only for metric values. Labels could have empty (NULL) values.
27e0b12 Don't panic when create const metric failed, just return nil (in hope that prometheus can handle that).
10c2d9d Extend collector's common logic related to user-defined metrics.
e0c8f3e Fix mention of unused variable in functions literals.
7969324 Fix panic when custom metric specified with no label. Refactor database listing logic.
caf0ee7 Fix test, assert length of slice instead of content (values in slice might be in random order).
5b92769 Make labeledValue complex - it might consists from two values separated by slash, first value is the origin value used for searching metric value in row data, the second value is label name where founded value will be inserted in metric.
6372cb5 Move docs into wiki. Update README.
fb41591 README: add info about user-defined metrics.
bcd0091 Refactor postgres/archiver collector to use descSet based approach.
d1ddb2a Remove 'id' arg from addService method, it is already in 'service' arg.
0cdbf65 Remove unused code, fix comments.
ed1a28d Rename UpdateDescSet and updateDescSet.
7ce3dbf Revert "Add support for user-defined metrics to postgres/activity collector."
a79ef3d Revert "Add support for user-defined metrics to postgres/bgwriter collector."
03cfff3 Revert "Add support for user-defined metrics to postgres/databases collector."
05ef56f Revert "Add support for user-defined metrics to postgres/indexes collector."
e20d3dd Revert "Refactor postgres/archiver collector to use descSet based approach."
4167411 Revert "Use updated common collector logic in postgres/archiver collector."
5044499 Revert "Use updated common collector logic in postgres/bgwriter collector."
134adf5 Revert "Use updated common collector logic in postgres/conflicts collector."
2d4a82e Revert "Use updated common collector logic in postgres/database collector."
40a81c7 Revert "Use updated common collector logic in postgres/functions collector."
50afa9d Revert "Use updated common collector logic in postgres/indexes collector."
e7831d8 Revert "Use updated common collector logic in postgres/locks collector. Add postgres_locks_all_in_flight, postgres_locks_not_granted_in_flight metrics."
1ea23ca Revert "Use updated common collector logic in postgres/replication collector."
fa5479d Revert "Use updated common collector logic in postgres/replication collector."
031bbdf Revert "postgres/conflicts changes: - add support for user-defined metrics; - rename 'reason' label to 'conflict'; - remove condition when metrics exposed only when non-zero counters."
20569d7 Skip NULL values.
e97f056 Unify metric and label names accordingly to convention.
060b5a4 Use regexp-based databases selection for user-defined metrics.
cf3c5dd Use updated common collector logic in postgres/archiver collector.
580fbb5 Use updated common collector logic in postgres/bgwriter collector.
be53e03 Use updated common collector logic in postgres/conflicts collector.
e5c7fae Use updated common collector logic in postgres/database collector.
043eb97 Use updated common collector logic in postgres/functions collector.
d76aae5 Use updated common collector logic in postgres/indexes collector.
12a8b06 Use updated common collector logic in postgres/locks collector. Add postgres_locks_all_in_flight, postgres_locks_not_granted_in_flight metrics.
9ff3a50 Use updated common collector logic in postgres/replication collector.
d4cedb2 postgres/archiver: replace in-query bytes conversion to conversion when updating metric.
6dce16f postgres/bgwriter rename metrics: - 'postgres_ckpt_checkpoints_total' -> 'postgres_checkpoints_total', label ckpt -> checkpoint; - 'postgres_ckpt_time_seconds_total' -> 'postgres_checkpoints_seconds_total'; - 'postgres_ckpt_time_seconds_all_total' -> 'postgres_checkpoints_seconds_all_total'; - add new metric 'postgres_checkpoints_all_total';
5b8633a postgres/conflicts changes: - add support for user-defined metrics; - rename 'reason' label to 'conflict'; - remove condition when metrics exposed only when non-zero counters.
fbcecc3 postgres/conflicts: use more clear labels 'database' and 'conflict' instead of 'datname' and 'reason'.
c6cac49 postgres/database change metrics: - rename 'datname' label to 'database'; - rename 'op' label to 'tuples'; - rename 'xid' label to 'xid_from'; - add condition to collect metric from 'NULL' database (shared).
e9ebd90 postgres/indexes change metrics: - rename 'op' label to 'tuples'; - rename 'cache_hit' label to 'access'.
536e248 postgres/locks: add metrics postgres_locks_all_in_flight, postgres_locks_not_granted_in_flight.
4126d91 postgres/replication: rename metric postgres_wal_bytes_total -> postgres_wal_written_bytes_total.

v0.4.22

05 May 04:14
Compare
Choose a tag to compare

Changelog

449f4c6 Add seed init when using random number generating.
19cf058 Autoupdate: check uid before restart service.

v0.4.22-rc1

22 Apr 04:07
Compare
Choose a tag to compare

Changelog

c77a945 Add last send timestamp, which should be used for keeping consistent metrics sending interval across pgSCV restarts.
250541a Adjust autipdate env processing: accept stable/on/off values.
97ecb0d Document statement about auto-update requires root privileges.
89f6ec2 Fix error message.
4be3e14 Organize collectors list into table.
75946db Reduce messages severity from error to warning. Occurred events don't interrupt collecting metrics, hence could be considered as warnings.
522b809 Remove creating deb/rpm packages by goreleaser. Update setup docs.
eb60b07 Use backend_type value when usename is NULL, use more human-readable constants in other cases.

v0.4.21

06 Apr 08:34
Compare
Choose a tag to compare

Changelog

38c3bf7 Use debug severity for messages related when collector unable collect metrics due to Postgres version; Add related changes to docs.