aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2016-02-17 11:52:10 +0000
committerChristopher Baines <mail@cbaines.net>2016-02-17 11:52:10 +0000
commitd2bf12566103b5a4a25f82a43d45ca57f22e1bc2 (patch)
tree03aaf26fee479d29a4f416f2825de0a0efe97925
parent2d64dfff1ac8b1042e3d134669ff352ba686b8f3 (diff)
parent6b70a01a267ffcba0847cf967a6acc7261919fe7 (diff)
downloadprometheus-pgbouncer-exporter-d2bf12566103b5a4a25f82a43d45ca57f22e1bc2.tar
prometheus-pgbouncer-exporter-d2bf12566103b5a4a25f82a43d45ca57f22e1bc2.tar.gz
Merge branch 'master' into debian
-rw-r--r--debian/changelog13
-rw-r--r--debian/control6
-rw-r--r--debian/manpages1
-rwxr-xr-xdebian/rules10
-rw-r--r--prometheus_pgbouncer_exporter/__init__.py2
-rw-r--r--prometheus_pgbouncer_exporter/cli.py1
6 files changed, 29 insertions, 4 deletions
diff --git a/debian/changelog b/debian/changelog
index 0dda710..27fad27 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,15 @@
-prometheus-pgbouncer-exporter (1.3-1) unstable; urgency=medium
+prometheus-pgbouncer-exporter (1.4-1) unstable; urgency=medium
- * Package version 1.3 (Closes: #814823).
+ * Package version 1.4 (Closes: #814823).
- -- Christopher Baines <mail@cbaines.net> Mon, 15 Feb 2016 17:07:22 +0000
+ -- Christopher Baines <mail@cbaines.net> Wed, 17 Feb 2016 11:51:22 +0000
+
+prometheus-pgbouncer-exporter (1.4) unstable; urgency=medium
+
+ * New release
+ - Add manpage
+
+ -- Christopher Baines <mail@cbaines.net> Wed, 17 Feb 2016 11:46:16 +0000
prometheus-pgbouncer-exporter (1.3) unstable; urgency=medium
diff --git a/debian/control b/debian/control
index e93302b..19eedd2 100644
--- a/debian/control
+++ b/debian/control
@@ -2,11 +2,17 @@ Source: prometheus-pgbouncer-exporter
Section: net
Priority: optional
Maintainer: Christopher Baines <mail@cbaines.net>
+Homepage: http://git.cbaines.net/prometheus-pgbouncer-exporter/
Build-Depends: debhelper (>= 9),
dh-systemd,
dh-python,
+ help2man,
python3-all,
python3-setuptools,
+# Used when generating the manpage
+ python3-psycopg2,
+ python3-configargparse,
+ python3-prometheus-client,
Standards-Version: 3.9.6
X-Python3-Version: >= 3.2
diff --git a/debian/manpages b/debian/manpages
new file mode 100644
index 0000000..41bdaf1
--- /dev/null
+++ b/debian/manpages
@@ -0,0 +1 @@
+prometheus-pgbouncer-exporter.1
diff --git a/debian/rules b/debian/rules
index b06eef5..12e4640 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,3 +10,13 @@ override_dh_systemd_enable:
override_dh_systemd_start:
dh_systemd_start --restart-after-upgrade prometheus-pgbouncer-exporter.service
+
+override_dh_auto_install:
+ dh_auto_install
+ # build the man page
+ help2man -n "Export metrics from pgbouncer to Prometheus" --no-info \
+ --version-option="-m prometheus_pgbouncer_exporter --version" \
+ --help-option="-m prometheus_pgbouncer_exporter --help" \
+ --output=prometheus-pgbouncer-exporter.1 python3
+ # Remove the .TP on the 7th line to improve readability
+ sed -i '7 d' prometheus-pgbouncer-exporter.1
diff --git a/prometheus_pgbouncer_exporter/__init__.py b/prometheus_pgbouncer_exporter/__init__.py
index 107ba30..707cd28 100644
--- a/prometheus_pgbouncer_exporter/__init__.py
+++ b/prometheus_pgbouncer_exporter/__init__.py
@@ -1,3 +1,3 @@
__ver_major__ = 1
-__ver_minor__ = 2
+__ver_minor__ = 4
__version__ = "%d.%d" % (__ver_major__, __ver_minor__)
diff --git a/prometheus_pgbouncer_exporter/cli.py b/prometheus_pgbouncer_exporter/cli.py
index acadd6f..5a78fc6 100644
--- a/prometheus_pgbouncer_exporter/cli.py
+++ b/prometheus_pgbouncer_exporter/cli.py
@@ -31,6 +31,7 @@ from .collectors import StatsCollector, ListsCollector, PoolsCollector, \
def main():
p = configargparse.ArgParser(
+ prog="prometheus-pgbouncer-exporter",
default_config_files=[
'/etc/prometheus-pgbouncer-exporter/config',
],