summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2023-08-24 21:41:02 +0200
committerChristian Pointner <equinox@spreadspace.org>2023-08-24 21:41:02 +0200
commitc2770b6d8f6e0e306f320cad9540af7a5b04c858 (patch)
tree5eba74b3cda743ef30a6dab54cd6e818cb288a15
parentupgrade chrony exporter (diff)
add nftables exporter
-rw-r--r--prom-exporter-nftables/Makefile18
-rw-r--r--prom-exporter-nftables/debian/changelog5
-rw-r--r--prom-exporter-nftables/debian/compat1
-rw-r--r--prom-exporter-nftables/debian/control12
-rw-r--r--prom-exporter-nftables/debian/install1
-rwxr-xr-xprom-exporter-nftables/debian/rules16
-rw-r--r--prom-exporter-nftables/debian/source/format1
-rw-r--r--prom-exporter-nftables/sha256sums.txt1
8 files changed, 55 insertions, 0 deletions
diff --git a/prom-exporter-nftables/Makefile b/prom-exporter-nftables/Makefile
new file mode 100644
index 0000000..35a70f7
--- /dev/null
+++ b/prom-exporter-nftables/Makefile
@@ -0,0 +1,18 @@
+VERSION := "invalid"
+GITHUB_BASEURL := "https://github.com/metal-stack/nftables-exporter/releases/download"
+
+.PHONY: clean
+
+all: amd64/nftables-exporter
+
+amd64/nftables-exporter: nftables-exporter-v$(VERSION)
+ mkdir -p $(shell echo $@ | sed 's#/.*##')
+ cp $< $@
+
+nftables-exporter-v$(VERSION):
+ wget -nc --progress=dot:mega "$(GITHUB_BASEURL)/v$(VERSION)/nftables-exporter" -O "$@"
+ sha256sum -c --ignore-missing sha256sums.txt
+
+clean:
+ rm -rf amd64
+ rm -f nftables-exporter-v$(VERSION)
diff --git a/prom-exporter-nftables/debian/changelog b/prom-exporter-nftables/debian/changelog
new file mode 100644
index 0000000..cc01425
--- /dev/null
+++ b/prom-exporter-nftables/debian/changelog
@@ -0,0 +1,5 @@
+prom-exporter-nftables (0.2.7-1) unstable; urgency=medium
+
+ * Initial release.
+
+ -- Christian Pointner <equinox@spreadspace.org> Thu, 24 Aug 2023 21:40:07 +0200
diff --git a/prom-exporter-nftables/debian/compat b/prom-exporter-nftables/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/prom-exporter-nftables/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/prom-exporter-nftables/debian/control b/prom-exporter-nftables/debian/control
new file mode 100644
index 0000000..c86007a
--- /dev/null
+++ b/prom-exporter-nftables/debian/control
@@ -0,0 +1,12 @@
+Source: prom-exporter-nftables
+Maintainer: Christian Pointner <equinox@spreadspace.org>
+Section: utils
+Priority: optional
+Standards-Version: 3.9.2
+Build-Depends: debhelper (>= 9), wget, ca-certificates
+
+Package: prom-exporter-nftables
+Architecture: amd64 i386 arm64
+Depends: ${misc:Depends}
+Conflicts: prometheus-nftables-exporter
+Description: prometheus nftables-exporter (binary only)
diff --git a/prom-exporter-nftables/debian/install b/prom-exporter-nftables/debian/install
new file mode 100644
index 0000000..6daaa9d
--- /dev/null
+++ b/prom-exporter-nftables/debian/install
@@ -0,0 +1 @@
+usr/bin/prometheus-nftables-exporter
diff --git a/prom-exporter-nftables/debian/rules b/prom-exporter-nftables/debian/rules
new file mode 100755
index 0000000..a7aae55
--- /dev/null
+++ b/prom-exporter-nftables/debian/rules
@@ -0,0 +1,16 @@
+#!/usr/bin/make -f
+include /usr/share/dpkg/pkg-info.mk
+%:
+ dh $@
+
+override_dh_auto_configure:
+
+override_dh_auto_build:
+ make VERSION=$(DEB_VERSION_UPSTREAM) $(DEB_BUILD_ARCH)/nftables-exporter
+
+override_dh_auto_install:
+ install -d $$(pwd)/debian/tmp/usr/bin/
+ install -m 755 $$(pwd)/$(DEB_BUILD_ARCH)/nftables-exporter $$(pwd)/debian/tmp/usr/bin/prometheus-nftables-exporter
+
+override_dh_auto_clean:
+ make VERSION=$(DEB_VERSION_UPSTREAM) clean
diff --git a/prom-exporter-nftables/debian/source/format b/prom-exporter-nftables/debian/source/format
new file mode 100644
index 0000000..d3827e7
--- /dev/null
+++ b/prom-exporter-nftables/debian/source/format
@@ -0,0 +1 @@
+1.0
diff --git a/prom-exporter-nftables/sha256sums.txt b/prom-exporter-nftables/sha256sums.txt
new file mode 100644
index 0000000..0d80c92
--- /dev/null
+++ b/prom-exporter-nftables/sha256sums.txt
@@ -0,0 +1 @@
+a2d86b066ce2e2d13f37969fdf1dc47012fa2ba691a72594ca721305c611c9da nftables-exporter-v0.2.7