View | Details | Raw Unified | Return to bug 276996 | Differences between
and this patch

Collapse All | Expand All

(-)b/databases/Makefile (+1 lines)
Lines 700-705 Link Here
700
    SUBDIR += proftpd-mod_sql_sqlite
700
    SUBDIR += proftpd-mod_sql_sqlite
701
    SUBDIR += proftpd-mod_sql_tds
701
    SUBDIR += proftpd-mod_sql_tds
702
    SUBDIR += prometheus-postgresql-adapter
702
    SUBDIR += prometheus-postgresql-adapter
703
    SUBDIR += prometheus-postgres-exporter
703
    SUBDIR += proxysql
704
    SUBDIR += proxysql
704
    SUBDIR += pspg
705
    SUBDIR += pspg
705
    SUBDIR += puppetdb-terminus7
706
    SUBDIR += puppetdb-terminus7
(-)b/databases/prometheus-postgres-exporter/Makefile (+25 lines)
Added Link Here
1
PORTNAME=	prometheus-postgres-exporter
2
DISTVERSIONPREFIX=	v
3
DISTVERSION=	0.15.0
4
CATEGORIES=	databases
5
6
MAINTAINER=	lexi.freebsd@le-fay.org
7
COMMENT=	PostgreSQL metric exporter for Prometheus
8
WWW=		https://github.com/prometheus-community/postgres_exporter
9
10
LICENSE=	APACHE20
11
LICENSE_FILE=	${WRKSRC}/LICENSE
12
13
USES=		go:modules
14
USE_RC_SUBR=	postgres_exporter
15
GO_MODULE=	github.com/prometheus-community/postgres_exporter
16
GO_TARGET=	./cmd/postgres_exporter:${PREFIX}/bin/postgres_exporter
17
18
SUB_FILES=	pkg-message
19
20
post-install:
21
	@${MKDIR} ${STAGEDIR}${PREFIX}/etc
22
	${INSTALL_DATA} ${PATCHDIR}/postgres_exporter.yml.sample \
23
		${STAGEDIR}${PREFIX}/etc/postgres_exporter.yml.sample
24
25
.include <bsd.port.mk>
(-)b/databases/prometheus-postgres-exporter/distinfo (+5 lines)
Added Link Here
1
TIMESTAMP = 1708907285
2
SHA256 (go/databases_prometheus-postgres-exporter/prometheus-postgres-exporter-v0.15.0/v0.15.0.mod) = 2eca3234e2449a0b04bf99c4761b5b62e6ddd6be2b9083b89837a57087fb0a59
3
SIZE (go/databases_prometheus-postgres-exporter/prometheus-postgres-exporter-v0.15.0/v0.15.0.mod) = 1853
4
SHA256 (go/databases_prometheus-postgres-exporter/prometheus-postgres-exporter-v0.15.0/v0.15.0.zip) = cbe281e1764b5df206eafd0ae5e5fee0b569afb3883b1502d2b1793694a53dd5
5
SIZE (go/databases_prometheus-postgres-exporter/prometheus-postgres-exporter-v0.15.0/v0.15.0.zip) = 151785
(-)b/databases/prometheus-postgres-exporter/files/pkg-message.in (+29 lines)
Added Link Here
1
[
2
{ type: install
3
  message: <<EOM
4
A sample configuration file has been installed in
5
%%PREFIX%%/etc/postgres_exporter.yml.sample.
6
7
To use postgres_exporter, copy this config file to "postgres_exporter.yml"
8
and edit as needed, then enable and start the service:
9
10
# service postgres_exporter enable
11
# service postgres_exporter start
12
13
For rc(8) options which can be used to configure the service, refer to
14
%%PREFIX%%/etc/rc.d/postgres_exporter.
15
16
For example, to log output to the 'local5' syslog facility instead of the
17
default 'daemon':
18
19
# sysrc postgres_exporter_syslog_output_facility=local5
20
21
By default, the exporter runs as the 'nobody' user and listens on
22
localhost:9187.  These defaults can be changed via rc(8).
23
24
For documentation on the configuration file format and how to integrate the
25
exporter into Prometheus, refer to the documentation at:
26
https://github.com/prometheus-community/postgres_exporter
27
EOM
28
}
29
]
(-)b/databases/prometheus-postgres-exporter/files/postgres_exporter.in (+73 lines)
Added Link Here
1
#!/bin/sh
2
3
# PROVIDE: postgres_exporter
4
# REQUIRE: LOGIN
5
# KEYWORD: shutdown
6
#
7
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
8
# to enable this service:
9
#
10
# postgres_exporter_enable (bool):          Set to NO by default.
11
#               Set it to YES to enable postgres_exporter.
12
# postgres_exporter_config_file (string):   Set the configuration file.
13
#               Default is "%%PREFIX%%/etc/postgres_exporter.yml".
14
# postgres_exporter_user (string):          Set user that postgres_exporter will run under
15
#               Default is "nobody".
16
# postgres_exporter_group (string):         Set group that postgres_exporter will run under
17
#               Default is "nobody".
18
# postgres_exporter_args (string):          Set extra arguments to pass to postgres_exporter
19
#               Default is "".
20
# postgres_exporter_listen_address (string):Set ip:port that postgres_exporter will listen on
21
#               Default is "localhost:9187".
22
# postgres_exporter_syslog_output_tag (str):      Set syslog tag.
23
#               Default is "postgres_exporter". See daemon(8).
24
# postgres_exporter_syslog_output_priority (str): Set syslog priority.
25
#               Default is "notice". See daemon(8).
26
# postgres_exporter_syslog_output_facility (str): Set syslog facility.
27
#               Default is "daemon". See daemon(8).
28
29
30
. /etc/rc.subr
31
32
name=postgres_exporter
33
rcvar=postgres_exporter_enable
34
35
load_rc_config $name
36
37
: ${postgres_exporter_enable:="NO"}
38
: ${postgres_exporter_config_file:="%%PREFIX%%/etc/postgres_exporter.yml"}
39
: ${postgres_exporter_user:="nobody"}
40
: ${postgres_exporter_group:="nobody"}
41
: ${postgres_exporter_args:=""}
42
: ${postgres_exporter_listen_address:="localhost:9187"}
43
: ${postgres_exporter_syslog_output_tag=${name}}
44
: ${postgres_exporter_syslog_output_priority=notice}
45
: ${postgres_exporter_syslog_output_facility=daemon}
46
47
pidfile=/var/run/postgres_exporter.pid
48
command="/usr/sbin/daemon"
49
procname="%%PREFIX%%/bin/postgres_exporter"
50
command_args="-f -p ${pidfile} -t ${name} \
51
    -T ${postgres_exporter_syslog_output_tag} \
52
    -s ${postgres_exporter_syslog_output_priority} \
53
    -l ${postgres_exporter_syslog_output_facility} \
54
    /usr/bin/env ${procname} \
55
    --web.listen-address=${postgres_exporter_listen_address} \
56
    --config.file=${postgres_exporter_config_file} \
57
    ${postgres_exporter_args}"
58
59
start_precmd=postgres_exporter_startprecmd
60
61
postgres_exporter_startprecmd()
62
{
63
    if [ ! -e ${pidfile} ]; then
64
        install \
65
            -o ${postgres_exporter_user} \
66
            -g ${postgres_exporter_group} \
67
            /dev/null ${pidfile};
68
    fi
69
}
70
71
load_rc_config $name
72
run_rc_command "$1"
73
(-)b/databases/prometheus-postgres-exporter/files/postgres_exporter.yml.sample (+12 lines)
Added Link Here
1
2
# use auth_modules to provide authentication data for connections:
3
4
#auth_modules:
5
#  my_module:
6
#    type: userpass
7
#    userpass:
8
#      username: prometheus
9
#      password: 'a-good-password'
10
#    options:
11
#      dbname: template1
12
#      sslmode: verify-full
(-)b/databases/prometheus-postgres-exporter/pkg-descr (+3 lines)
Added Link Here
1
postgres_exporter is a Prometheus exporter for the PostgreSQL database.  It can
2
connect to multiple PostgreSQL databases as configured in Prometheus, and
3
reports system-level metrics.
(-)b/databases/prometheus-postgres-exporter/pkg-plist (+2 lines)
Added Link Here
1
bin/postgres_exporter
2
etc/postgres_exporter.yml.sample

Return to bug 276996