Bug 276996 - [NEW PORT] databases/postgres_exporter: PostgreSQL metric exporter for Prometheus
Summary: [NEW PORT] databases/postgres_exporter: PostgreSQL metric exporter for Promet...
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Joel Bodenmann
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-12 01:36 UTC by Lexi Winter
Modified: 2024-04-20 21:54 UTC (History)
1 user (show)

See Also:


Attachments
patch (8.05 KB, patch)
2024-02-12 01:36 UTC, Lexi Winter
no flags Details | Diff
patch (8.90 KB, patch)
2024-02-26 00:57 UTC, Lexi Winter
no flags Details | Diff
patch (7.62 KB, patch)
2024-04-17 01:11 UTC, Lexi Winter
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lexi Winter 2024-02-12 01:36:53 UTC
Created attachment 248382 [details]
patch

i'm rather surprised this wasn't already ported, but here's a Prometheus metric exporter for PostgreSQL databases.

i've tested on 15.0/amd64, but should work anywhere as it's just ordinary Go stuff.  includes rc.d script and basic setup instructions in pkg-message.  

portlint and testport passed.
Comment 1 Lexi Winter 2024-02-12 01:38:56 UTC
i've named this 'postgres_exporter' after the pattern of existing ports like 'blackbox_exporter'.  i think something like 'prometheus-postgres-exporter' would be nicer, following the example of e.g. net-mgmt/prometheus-collectd-exporter, but i'm not sure if there's any policy about this or a strong reason to prefer one of the other.
Comment 2 Joel Bodenmann freebsd_committer freebsd_triage 2024-02-14 15:21:20 UTC
Discussed this with my mentors and was given the permission/directive to call the shot on PORTNAME myself: Let's go with prometheus-postgres-exporter.
Comment 3 Lexi Winter 2024-02-16 00:45:04 UTC
sounds good; do you want a new patch or will you change that yourself?
Comment 4 Joel Bodenmann freebsd_committer freebsd_triage 2024-02-16 00:50:26 UTC
I'd prefer if you can update the patch accordingly (and performing the usual QA).
Comment 5 Lexi Winter 2024-02-26 00:57:32 UTC
Created attachment 248746 [details]
patch

new patch: renamed to prometheus-postgres-exporter

testport, runtime tested on 13.2, 14.0, 15.0: service postgres_exporter enable; service postgres_exporter start; service returns an HTTP response.

okay to commit.
Comment 6 Lexi Winter 2024-04-17 01:11:33 UTC
Created attachment 250016 [details]
patch

same patch as before, rebase on current ports main to resolve conflicts.