feat: adding additional exporters
All checks were successful
Build / build-9 (pull_request) Successful in 1m36s
Build / build-8 (pull_request) Successful in 1m50s

- postgres_exporter
- pgbouncer_exporter
- bind_exporter
This commit is contained in:
Ben Vincent 2025-07-27 11:42:13 +10:00
parent b38856fb57
commit 8e56419539
12 changed files with 183 additions and 0 deletions

View File

@ -0,0 +1 @@
1

View File

@ -0,0 +1,21 @@
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
# Create output directory for RPMs
RUN mkdir -p /app/dist
# Set working directory
WORKDIR /app
ARG PACKAGE_RELEASE
ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
# Copy nfpm.yaml from the context into the container
COPY resources /app/resources
# Download the required files
RUN curl --output - -L https://github.com/prometheus-community/bind_exporter/releases/download/v${PACKAGE_VERSION}/bind_exporter-${PACKAGE_VERSION}.linux-amd64.tar.gz | tar --strip-components=1 -xzf -
# Default command to build RPMs
CMD /app/resources/build.sh

View File

@ -0,0 +1,2 @@
#!/usr/bin/bash
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm

View File

@ -0,0 +1,37 @@
# nfpm.yaml
name: bind_exporter
version: ${PACKAGE_VERSION}
release: ${PACKAGE_RELEASE}
arch: amd64
platform: linux
section: default
priority: extra
description: "Prometheus exporter for BIND"
maintainer: Prometheus
homepage: https://github.com/prometheus-community/bind_exporter
license: Apache-2.0 license
disable_globbing: false
replaces:
- bind_exporter
provides:
- bind_exporter
# Files to include in the package
contents:
- src: /app/bind_exporter
dst: /usr/bin/bind_exporter
file_info:
mode: 0755
owner: root
group: root
# Scripts to run during installation/removal (optional)
# scripts:
# preinstall: ./scripts/preinstall.sh
# postinstall: ./scripts/postinstall.sh
# preremove: ./scripts/preremove.sh
# postremove: ./scripts/postremove.sh

View File

@ -0,0 +1 @@
1

View File

@ -0,0 +1,21 @@
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
# Create output directory for RPMs
RUN mkdir -p /app/dist
# Set working directory
WORKDIR /app
ARG PACKAGE_RELEASE
ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
# Copy nfpm.yaml from the context into the container
COPY resources /app/resources
# Download the required files
RUN curl --output - -L https://github.com/prometheus-community/pgbouncer_exporter/releases/download/v${PACKAGE_VERSION}/pgbouncer_exporter-${PACKAGE_VERSION}.linux-amd64.tar.gz | tar --strip-components=1 -xzf -
# Default command to build RPMs
CMD /app/resources/build.sh

View File

@ -0,0 +1,2 @@
#!/usr/bin/bash
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm

View File

@ -0,0 +1,37 @@
# nfpm.yaml
name: pgbouncer_exporter
version: ${PACKAGE_VERSION}
release: ${PACKAGE_RELEASE}
arch: amd64
platform: linux
section: default
priority: extra
description: "Prometheus exporter for PgBouncer"
maintainer: Prometheus
homepage: https://github.com/prometheus-community/pgbouncer_exporter
license: Apache-2.0 license
disable_globbing: false
replaces:
- pgbouncer_exporter
provides:
- pgbouncer_exporter
# Files to include in the package
contents:
- src: /app/pgbouncer_exporter
dst: /usr/bin/pgbouncer_exporter
file_info:
mode: 0755
owner: root
group: root
# Scripts to run during installation/removal (optional)
# scripts:
# preinstall: ./scripts/preinstall.sh
# postinstall: ./scripts/postinstall.sh
# preremove: ./scripts/preremove.sh
# postremove: ./scripts/postremove.sh

View File

@ -0,0 +1 @@
1

View File

@ -0,0 +1,21 @@
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
# Create output directory for RPMs
RUN mkdir -p /app/dist
# Set working directory
WORKDIR /app
ARG PACKAGE_RELEASE
ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
# Copy nfpm.yaml from the context into the container
COPY resources /app/resources
# Download the required files
RUN curl --output - -L https://github.com/prometheus-community/postgres_exporter/releases/download/v${PACKAGE_VERSION}/postgres_exporter-${PACKAGE_VERSION}.linux-amd64.tar.gz | tar --strip-components=1 -xzf -
# Default command to build RPMs
CMD /app/resources/build.sh

View File

@ -0,0 +1,2 @@
#!/usr/bin/bash
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm

View File

@ -0,0 +1,37 @@
# nfpm.yaml
name: postgres_exporter
version: ${PACKAGE_VERSION}
release: ${PACKAGE_RELEASE}
arch: amd64
platform: linux
section: default
priority: extra
description: "A PostgreSQL metric exporter for Prometheus"
maintainer: Prometheus
homepage: https://github.com/prometheus-community/postgres_exporter
license: Apache-2.0 license
disable_globbing: false
replaces:
- postgres_exporter
provides:
- postgres_exporter
# Files to include in the package
contents:
- src: /app/postgres_exporter
dst: /usr/bin/postgres_exporter
file_info:
mode: 0755
owner: root
group: root
# Scripts to run during installation/removal (optional)
# scripts:
# preinstall: ./scripts/preinstall.sh
# postinstall: ./scripts/postinstall.sh
# preremove: ./scripts/preremove.sh
# postremove: ./scripts/postremove.sh