-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
11 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/.build | ||
/.tarballs | ||
pgpool2_exporter | ||
pgpool2_exporter* | ||
*.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
FROM quay.io/prometheus/busybox:latest | ||
FROM --platform=$BUILDPLATFORM quay.io/prometheus/busybox:latest | ||
LABEL maintainer="Bo Peng <[email protected]>" | ||
|
||
ARG TARGETARCH | ||
|
||
ENV POSTGRES_USERNAME postgres | ||
ENV POSTGRES_PASSWORD postgres | ||
ENV POSTGRES_DATABASE postgres | ||
ENV PGPOOL_SERVICE localhost | ||
ENV PGPOOL_SERVICE_PORT 9999 | ||
ENV SSLMODE disable | ||
|
||
COPY pgpool2_exporter /bin/pgpool2_exporter | ||
COPY pgpool2_exporter-$TARGETARCH /bin/pgpool2_exporter | ||
|
||
CMD ["/bin/sh", "-c", "export DATA_SOURCE_USER=\"${POSTGRES_USERNAME}\" ; export DATA_SOURCE_PASS=\"${POSTGRES_PASSWORD}\" ; export DATA_SOURCE_URI=\"${PGPOOL_SERVICE}:${PGPOOL_SERVICE_PORT}/${POSTGRES_DATABASE}?sslmode=${SSLMODE}\" ; /bin/pgpool2_exporter"] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,6 @@ import ( | |
"fmt" | ||
"math" | ||
"net/url" | ||
"os" | ||
"regexp" | ||
"strconv" | ||
"sync" | ||
|