Commit Graph

490 Commits

Author SHA1 Message Date
Ben Kochie
030a2a9bc7
Cleanup collectors (#826)
Fix up `replication` and `process_idle` Update input params to match
the rest of the collectors.

Signed-off-by: SuperQ <superq@gmail.com>
2023-06-27 16:40:12 +02:00
Ben Kochie
1a4e8993f6
Migrate pg_locks to collector package (#817)
Migrate the `pg_locks_count` query from `main` to the `collector`
package.

Signed-off-by: SuperQ <superq@gmail.com>
2023-06-27 15:59:30 +02:00
Vadim Voitenko
6a1bb59efb
Fixed replication pgReplicationSlotQuery - now it's working correctly for replica and primary (#825)
Signed-off-by: Vadim Voitenko <vadim.voitenko@exness.com>
Co-authored-by: Vadim Voitenko <vadim.voitenko@exness.com>
2023-06-27 15:47:33 +02:00
Ben Kochie
bf4e4fb6cc
Release 0.13.1 (#824)
* [BUGFIX] Make collectors not fail on null values #823

Signed-off-by: SuperQ <superq@gmail.com>
2023-06-27 13:13:41 +02:00
Felix Yuan
8d087f2c64
Bug fix: Make collector not fail on null values (#823)
* Make all values nullable

---------

Signed-off-by: Felix Yuan <felix.yuan@reddit.com>
Co-authored-by: Ben Kochie <superq@gmail.com>
2023-06-27 08:07:59 +02:00
Ben Kochie
629078694a
Merge pull request #820 from atymchuk/fix-a-few-syntax-errors
chore: fix a few typos
2023-06-23 15:55:15 +02:00
Alex Tymchuk
b070e45349
chore: fix a few typos
Signed-off-by: Alex Tymchuk <alexander.tymchuk@percona.com>
2023-06-23 16:42:59 +03:00
Ben Kochie
f550f8f8ad
Merge pull request #816 from prometheus-community/superq/0.13.0
Release v0.13.0
2023-06-22 09:03:47 +02:00
Ben Kochie
d983d32c1f
Merge pull request #785 from sysadmind/collector-instance
Add the instance struct to handle connections
2023-06-22 08:18:12 +02:00
Joe Adams
ab33346cbd
Add the instance struct to handle connections
The intent is to use the instance struct to hold the connection to the database as well as metadata about the instance. Currently this metadata only includes the version of postgres for the instance which can be used in the collectors to decide what query to run. In the future this could hold more metadata but for now it keeps the Collector interface arguments to a reasonable number.

Signed-off-by: Joe Adams <github@joeadams.io>
2023-06-21 20:36:59 -04:00
SuperQ
db08eee988
Release v0.13.0
BREAKING CHANGES:

Please note, the following features are deprecated and may be removed in a future release:
- `auto-discover-databases`
- `extend.query-path`
- `constantLabels`
- `exclude-databases`
- `include-databases`

This exporter is meant to monitor PostgresSQL servers, not the user data/databases. If
you need a generic SQL report exporter https://github.com/burningalchemist/sql_exporter
is recommended.

* [CHANGE] Adjust log level for collector startup #784
* [CHANGE] Move queries from queries.yaml to collectors #801
* [CHANGE] Deprecate extend queries feature #811
* [CHANGE] Deprecate additional database features #815
* [CHANGE] Convert pg_stat_database to new collector #685
* [ENHANCEMENT] Supports alternate postgres:// prefix in URLs #787
* [BUGFIX] Fix pg_setting different help values #771
* [BUGFIX] Fix column type for pg_replication_slots #777
* [BUGFIX] Fix pg_stat_database collector #809

Signed-off-by: SuperQ <superq@gmail.com>
2023-06-21 15:33:23 +02:00
Joe Adams
5db7cfba22
Merge pull request #815 from prometheus-community/superq/deprecate_databases
Deprecate additional database features
2023-06-21 09:03:26 -04:00
SuperQ
c71d395bf6
Deprecate additional database features
Now that we have deprecated extended queries we can deprecate related
database features.
* Deprecate flags/functions around auto discover databases.
* Deprecate flags/functions for additional constant labels.

Signed-off-by: SuperQ <superq@gmail.com>
2023-06-19 13:05:57 +02:00
Ben Kochie
afbdb9bd07
Merge pull request #814 from prometheus-community/repo_sync
Synchronize common files from prometheus/prometheus
2023-06-19 12:44:31 +02:00
prombot
3dd0aa6910 Update common Prometheus files
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2023-06-18 17:50:53 +00:00
Joe Adams
1fb04e1e42
Merge pull request #810 from sysadmind/meta-v0.12.1
Update release info for v0.12.1
2023-06-13 11:43:44 -04:00
Ben Kochie
7dcf1dc7b6
Deprecate extend queries feature (#811)
Mark the extend queries feature as deprecated in favor of recommending
the sql_exporter.

Signed-off-by: SuperQ <superq@gmail.com>
2023-06-13 17:39:39 +02:00
Joe Adams
3fc8b3ab19
Update release info for v0.12.1
Signed-off-by: Joe Adams <github@joeadams.io>
2023-06-13 11:32:12 -04:00
Ben Kochie
99828de70a
Fix up collector registration (#812)
Use const definitions to make collector registration consistent.
* Use collector subsystem name consistently.
* Fix up replication metric name unit.

Signed-off-by: SuperQ <superq@gmail.com>
2023-06-13 17:28:11 +02:00
Joe Adams
3e585c4061
Merge pull request #809 from sysadmind/stat_database_refactor
Fix pg_stat_database collector
2023-06-13 10:48:43 -04:00
Joe Adams
fe486012c9
Fix pg_stat_database collector
The signature for creating a collector changed and CI didn't retrigger. Move metrics out of map and into individual vars.

Signed-off-by: Joe Adams <github@joeadams.io>
2023-06-12 19:48:28 -04:00
Joe Adams
4d41f89f0c
Merge pull request #685 from sysadmind/pg-stat-database
Convert pg_stat_database to new collector model
2023-06-12 19:25:46 -04:00
Felix Yuan
fe960c6b54
Move queries from queries.yaml to collectors (#801)
Signed-off-by: Ben Kochie <superq@gmail.com>
2023-06-08 23:28:04 +02:00
Ben Kochie
16430fc955
Merge pull request #806 from prometheus-community/dependabot/go_modules/github.com/prometheus/exporter-toolkit-0.10.0
Bump github.com/prometheus/exporter-toolkit from 0.9.1 to 0.10.0
2023-06-04 06:01:49 +02:00
Joe Adams
5d5fae151b
Merge pull request #807 from prometheus-community/superq/linting
Update linting
2023-06-03 20:48:27 -04:00
dependabot[bot]
1eb4c991f4
Bump github.com/prometheus/exporter-toolkit from 0.9.1 to 0.10.0
Bumps [github.com/prometheus/exporter-toolkit](https://github.com/prometheus/exporter-toolkit) from 0.9.1 to 0.10.0.
- [Release notes](https://github.com/prometheus/exporter-toolkit/releases)
- [Changelog](https://github.com/prometheus/exporter-toolkit/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prometheus/exporter-toolkit/compare/v0.9.1...v0.10.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/exporter-toolkit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-03 11:22:41 +00:00
Ben Kochie
214d76fa21
Merge pull request #805 from prometheus-community/dependabot/go_modules/github.com/prometheus/common-0.44.0
Bump github.com/prometheus/common from 0.42.0 to 0.44.0
2023-06-03 13:21:54 +02:00
SuperQ
fab8e625a8
Update linting
* Move errcheck exclude list to config file.
* Enable revive linter
* Fix up revive linting issues.

Signed-off-by: SuperQ <superq@gmail.com>
2023-06-03 09:28:17 +02:00
dependabot[bot]
4da97f70e0
Bump github.com/prometheus/common from 0.42.0 to 0.44.0
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.42.0 to 0.44.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.42.0...v0.44.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-01 17:58:58 +00:00
Ben Kochie
6e671f2d82
Merge pull request #792 from prometheus-community/dependabot/go_modules/github.com/lib/pq-1.10.9
Bump github.com/lib/pq from 1.10.7 to 1.10.9
2023-06-01 15:58:29 +02:00
Ben Kochie
2297ff8f0a
Merge pull request #802 from prometheus-community/superq/descmap
Refactor collector descriptors
2023-06-01 15:57:44 +02:00
SuperQ
425c4938ef
Refactor collector descriptors
Use individual collector metric descriptor vars to help avoid
miss-mapped or unused metrics.

Signed-off-by: SuperQ <superq@gmail.com>
2023-06-01 10:04:35 +02:00
dependabot[bot]
ef2bf61299
Bump github.com/lib/pq from 1.10.7 to 1.10.9
Bumps [github.com/lib/pq](https://github.com/lib/pq) from 1.10.7 to 1.10.9.
- [Release notes](https://github.com/lib/pq/releases)
- [Commits](https://github.com/lib/pq/compare/v1.10.7...v1.10.9)

---
updated-dependencies:
- dependency-name: github.com/lib/pq
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-01 17:58:52 +00:00
Joe Adams
fb316ad4ae
Merge pull request #787 from mothership/fix/mothershipper/support-alt-scheme
Supports alternate postgres:// prefix in URLs
2023-04-24 18:18:36 -04:00
Jack Wink
0c04fc1d1e
Supports alternate postgres:// prefix in URLs
Adds support for the alternate postgres:// prefix in URLs. It's maybe
not the cleanest approach, but works.  Hoping I can either get some
pointers on a more appropriate patch, or that we could use this in the
interim to unblock this use-case.

Signed-off-by: Jack Wink <57678801+mothershipper@users.noreply.github.com>
2023-04-24 09:17:05 -07:00
Joe Adams
8b661c9c3b
Merge pull request #771 from khkhalifa/master
Fix pg_setting different help values
2023-04-23 18:35:33 -04:00
Khaled Khalifa
20b1b75e64
Fix pg_setting different help values
Signed-off-by: GitHub <noreply@github.com>
2023-04-16 11:29:12 +00:00
Ben Kochie
994e5cc913
Merge pull request #765 from prometheus-community/superq/stat_statements
Reduce cardinality of pg_stat_statements
2023-04-13 11:05:14 +02:00
Joe Adams
2391ad1ff3
Merge pull request #783 from sysadmind/update-readme
Update README cli flags
2023-03-30 09:24:43 -04:00
Joe Adams
285462b3c8
Merge pull request #784 from sysadmind/log-startup
Adjust log level for collector startup
2023-03-30 09:24:29 -04:00
Joe Adams
ac05e0bdce
Adjust log level for collector startup
Since we support both multi-target and typical direct scrapes, either of these can fail and it is no longer an error.

Signed-off-by: Joe Adams <github@joeadams.io>
2023-03-29 20:15:41 -04:00
Joe Adams
a32ef40053
Update README cli flags
These have not been kept up to date.

Signed-off-by: Joe Adams <github@joeadams.io>
2023-03-29 20:13:51 -04:00
Joe Adams
5f57b78442
Merge pull request #781 from prometheus-community/superq/readme_versions
Update versions listed in the README
2023-03-28 21:23:00 -04:00
SuperQ
6e2f8c332b
Update versions listed in the README
Update the supported versions based on what we actually test in CI.

Signed-off-by: SuperQ <superq@gmail.com>
2023-03-28 23:18:18 +02:00
Ben Kochie
dde6e6e52a
Merge pull request #777 from sysadmind/fix-replication-column-type
Fix column type for pg_replication_slots
2023-03-23 10:57:51 +01:00
Joe Adams
1e3b177e34
Fix column type for pg_replication_slots
Change the data type of `active` from int64 to bool. The documentation confirms that this is a boolean field.
https://www.postgresql.org/docs/current/view-pg-replication-slots.html

fixes #769

Signed-off-by: Joe Adams <github@joeadams.io>
2023-03-22 20:54:00 -04:00
Joe Adams
3fe5d25534
Merge pull request #776 from prometheus-community/repo_sync
Synchronize common files from prometheus/prometheus
2023-03-22 20:01:36 -04:00
Joe Adams
f9a1edbbc6
Merge pull request #774 from sysadmind/prep-release-v0.12
Update changelog and version for v0.12.0 release
2023-03-21 19:50:02 -04:00
prombot
d8617df696 Update common Prometheus files
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2023-03-21 17:51:31 +00:00
Ben Kochie
4976a656b1
Merge pull request #775 from prometheus-community/superq/toolkit
Update exporter-toolkit
2023-03-21 14:52:36 +01:00