Provides an exporter for Prometheus, to collect DNSBL-informations of several DNSBL-providers.
Find a file
2022-05-19 23:27:50 +02:00
.gitignore Splitting Registry for action and process-statistics and clean up repositry. 2021-05-09 14:39:21 +02:00
config.ru config.ru does not depend on yaml anymore. comments for registry= 2021-05-09 20:38:37 +02:00
config.yml.example Splitting Registry for action and process-statistics and clean up repositry. 2021-05-09 14:39:21 +02:00
dnsbl_exporter.rb require yaml added 2022-05-19 23:27:50 +02:00
dnsbl_exporter.service.erb README and service-file-template added 2018-12-14 15:16:21 +01:00
Gemfile support for systemd-notify mode + nix dependencies build by bundix 2022-05-19 23:18:30 +02:00
gemset.nix support for systemd-notify mode + nix dependencies build by bundix 2022-05-19 23:18:30 +02:00
README.adoc README: new behaviour described. 2021-05-09 21:07:00 +02:00
shell.nix support for systemd-notify mode + nix dependencies build by bundix 2022-05-19 23:18:30 +02:00

= DNSBL exporter

Provides an exporter to scan known DNSBL-providers for listing of target-IP.

== Installation

1. You have to installed `ruby` and `bundler`:
+
[source,sh]
----
apt install ruby
gem install bundler
----

2. Clone the repository to the destination, you want to have installed dnsbl_exporter.

3. Copy `config.yml.example` to `config.yml` and change settings like resolver.

4. Start on boot:
+
[source,sh]
----
useradd prometheus
sudo -u prometheus bundle install
erb dnsbl_exporter.service.erb > /etc/systemd/system/dnsbl_exporter.service
systemctl daemon-reload
systemctl enable --now dnsbl_exporter.service
----

5. In prometheus, define the target-IP as `target`-param.
+
[source,yaml]
----
- job_name: dnsbl4
  static_configs:
  - targets:
    - '1.2.3.4'
    - '1234::abcd'
  relabel_configs:
  - source_labels: [__address__]
    target_label: __param_target
    replacement: '${1}'
  - source_labels: [__param_target]
    target_label: instance
  - target_label: __address__
    replacement: {{prometheus_jobs_dnsbl_target}}
----