Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional Postgresql metrics #19411

Open
jbgcarnes opened this issue Dec 18, 2023 · 1 comment
Open

Additional Postgresql metrics #19411

jbgcarnes opened this issue Dec 18, 2023 · 1 comment
Labels
source: postgresql_metrics Anything `postgresql_metrics` source related type: feature A value-adding code addition that introduce new functionality.

Comments

@jbgcarnes
Copy link

A note for the community

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

The current metrics that vector gathers from Postgresql are great, but there are a few additional metrics that would be useful for users. These metrics are attempting to bring the exporter to par with the prometheus-exporter for postgresql found here.

These metrics include:

  • Version (current version of the postgresql instance)
  • Maximum current connections (this is useful to know what percentage of max is currently being used)
  • Long running transactions
  • Start time of the instance.

I am willing to work on the issue.

Use Cases

In the end, I would like to entirely replace the prometheus-exporter for postgresql that I am using with vector. There are just a few metrics that are required. These mostly are about the current settings of the database. While these are unlikely to change, they can be used for comparisons/calculations to understand if your database is reaching saturation.

Attempted Solutions

I've gone through the documentation of postgresql's metrics gathered and the listed ones are not there. They will need to be added. Luckily, the sql for them is relatively trivial.

No configuration change needs be made to the datasource object, it would just return additional metrics.

Proposal

I purpose adding the listed 3 metrics to the postgresql source. These are 3 simple sql statements.

References

No response

Version

v0.29.0

@jbgcarnes jbgcarnes added the type: feature A value-adding code addition that introduce new functionality. label Dec 18, 2023
@dsmith3197 dsmith3197 added the source: postgresql_metrics Anything `postgresql_metrics` source related label Dec 20, 2023
@dsmith3197
Copy link
Contributor

Hi @jbgcarnes,

Thanks for the feature request. We'd be happy to consider a contribution if you're inclined to work on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
source: postgresql_metrics Anything `postgresql_metrics` source related type: feature A value-adding code addition that introduce new functionality.
Projects
None yet
Development

No branches or pull requests

2 participants