fix: gitignore
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline failed

This commit is contained in:
s3lph 2023-07-29 14:48:20 +02:00
parent 9904dd31af
commit 376cfaf885
8 changed files with 93 additions and 3 deletions

6
.gitignore vendored
View file

@ -1,3 +1,3 @@
prometheus-dnssec-exporter
config.yaml
.changes
/prometheus-dnssec-exporter
/config.yaml
/.changes

View file

@ -0,0 +1,2 @@
/etc/default/prometheus-dnssec-exporter
/etc/prometheus/dnssec-exporter/config.yaml

View file

@ -0,0 +1,8 @@
Package: prometheus-dnssec-exporter
Version: __VERSION__
Maintainer: s3lph <s3lph@kabelsalat.ch>
Section: web
Priority: optional
Architecture: amd64
Description: Prometheus exporter to check the DNSSEC state of DNSSEC zones
This is a Prometheus exporter to check the DNSSEC state of DNSSEC zones.

View file

@ -0,0 +1,23 @@
#!/bin/bash
set -e
if [[ "$1" == "configure" ]]; then
if ! getent group prometheus >/dev/null; then
groupadd --system prometheus
fi
if ! getent passwd prometheus >/dev/null; then
useradd --system --gid prometheus --home-dir /var/lib/prometheus --shell /usr/sbin/nologin prometheus
fi
chown root:prometheus /etc/prometheus/dnssec-exporter /etc/prometheus/dnssec-exporter/config.yaml
chmod 0755 /etc/prometheus/dnssec-exporter
cmmod 0640 /etc/prometheus/dnssec-exporter/config.yaml
deb-systemd-helper enable prometheus-dnssec-exporter.service
deb-systemd-invoke restart prometheus-dnssec-exporter.service
fi

View file

@ -0,0 +1,9 @@
#!/bin/bash
set -e
if [[ "$1" == "remove" ]]; then
deb-systemd-invoke stop prometheus-dnssec-exporter
fi

View file

@ -0,0 +1,13 @@
ARGS="--config=/etc/prometheus/dnssec-exporter/config.yaml --web.listen-address=:9142"
# GLOBAL OPTIONS:
# --web.listen-address=":9142"
# Address on which to expose metrics.
# --web.metrics-path="/metrics"
# Path under which to expose metrics.
# --web.config="" Path to web config yaml file.
# --config="" Path to config yaml file.
# --log.level=info Only log messages with the given severity or above. One of: [debug, info, warn, error]
# --log.format=logfmt Output format of log messages. One of: [logfmt, json]
# --version Show application version.

View file

@ -0,0 +1,22 @@
---
## dnssec exporter configuration
#
#dns:
# # The resolver to use. Must be DNSSEC validating, and
# # must not strip DNSSEC responses.
# resolver: 1.1.1.1:53
# # List of zones to resolve.
# zones:
# - example.org.
# - example.com.
## TLS and Basic Auth can be configured here as well, see for details:
## https://github.com/prometheus/exporter-toolkit/blob/master/web/tls_config.go#L36
#
#basic_auth_users:
# user1: pass1
# user2: pass2
#tls_server_config:
# cert_file: server.crt
# key_file: server.key

View file

@ -0,0 +1,13 @@
[Unit]
Description=Prometheus DNSSEC Exporter
Documentation=https://gitlab.com/s3lph/prometheus-dnssec-exporter
After=network.target
[Service]
Restart=on-failure
User=prometheus
EnvironmentFile=/etc/default/prometheus-dnssec-exporter
ExecStart=/usr/bin/prometheus-dnssec-exporter $ARGS
[Install]
WantedBy=multi-user.target