mirror of
https://github.com/luzifer-docker/personal-dns.git
synced 2024-12-20 12:41:18 +00:00
Add metrics
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
112c5d8270
commit
ba5295e923
2 changed files with 13 additions and 5 deletions
|
@ -10,6 +10,7 @@ RUN set -ex \
|
|||
git \
|
||||
make \
|
||||
&& go get -v \
|
||||
github.com/Luzifer/bind-log-metrics \
|
||||
github.com/Luzifer/named-blacklist \
|
||||
github.com/Luzifer/rootzone \
|
||||
&& rootzone >named.stubs \
|
||||
|
@ -30,6 +31,7 @@ RUN set -ex \
|
|||
bind-tools \
|
||||
&& /usr/local/bin/build.sh
|
||||
|
||||
COPY --from=builder /go/bin/bind-log-metrics /usr/local/bin/
|
||||
COPY --from=builder /src/named.stubs /etc/bind/
|
||||
COPY --from=builder /src/named.blacklist /etc/bind/
|
||||
COPY named.conf /etc/bind/
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
#!/usr/local/bin/dumb-init /bin/bash
|
||||
set -euxo pipefail
|
||||
|
||||
# No influx credentials present, don't use metrics sender
|
||||
[[ -n ${INFLUX_HOST:-} ]] ||
|
||||
exec named -c /etc/bind/named.conf -g
|
||||
|
||||
# Start bind
|
||||
exec named -c /etc/bind/named.conf -g
|
||||
bind-log-metrics <(
|
||||
named -c /etc/bind/named.conf -g 2>&1
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue