dnsbl_exporter

command module
v0.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

README

dnsbl-exporter

CircleCI Maintainability

This is a server which checks the configured hosts against various DNSBL (sometimes refered to as RBLs).

The idea is to scrape /metrics using Prometheus to create graphs, alerts, and so on.

This is an early release. We accept all kinds of feedback - bug reports, PRs, code, docs, ... :)

Using

Configuration

See rbls.ini and targets.ini files in this repository.

Otherwise:

$ dnsbl-exporter -h
...
--config.dns-resolver value  IP address of the resolver to use. (default: "127.0.0.1")
--config.rbls value          Configuration file which contains RBLs (default: "./rbls.ini")
--config.targets value       Configuration file which contains the targets to check. (default: "./targets.ini")
--web.listen-address value   Address to listen on for web interface and telemetry. (default: ":9211")
--web.telemetry-path value   Path under which to expose metrics. (default: "/metrics")
--log.debug                  Enable more output in the logs, otherwise INFO.
--log.output value           Destination of our logs: stdout, stderr (default: "stdout")
--help, -h                   show help
--version, -V                Print the version information.
Running
  1. Go to release and grab a release for your platform.
  2. Get rbls.ini and put it next to the binary.
  3. Get targets.ini, and customize. Or use the defaults.
  4. ./dnsbl-exporter

Go to http://127.0.0.1:9211/ in your browser.

Caveat

In order to use this, a proper DNS resolver is needed. Proper means: not Google, not Cloudflare, OpenDNS, etc.. Instead use a resolver like Unbound.

To test on OSX, follow these steps:

$ brew install unbound
...
$ sudo unbound -d -vvvv

(And leave the Terminal open — there will be ample queries and data for you to see and learn from.)

Verify Unbound is working and resolution is working:

 $ dig +short @127.0.0.1 spamhaus.org
192.42.118.104

Releasing

(This is for myself, since I tend to forget things.)

  1. Create a release on Github
  2. Assemble changelog based on PR merges, etc.
  3. Tag must be v1.0.0 (semantic versioning, prefixed by v)
  4. CircleCI will pick it up and build the binaries

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL