Commit Graph

5 Commits

Author SHA1 Message Date
Ben Kochie 5f917ccdd9
Improve linting (#861)
* Disable unused-parameter check due to false positives on Collect()
  calls.
* Enable misspell.
* Simplify error returns.

Signed-off-by: SuperQ <superq@gmail.com>
2023-07-06 13:08:45 +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
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
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
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