Bastille Template: AdGuard Home Exporter

AdGuard Home Exporter presents your DNS metrics to Prometheus.

AdGuard Exporter Grafana Dashboard (ID: 13330).

Bastille is an open-source system for automating deployment and management containerized applications on FreeBSD.

Template: AdGuard Home Exporter

Bastille is more than just lightweight containers for FreeBSD. The template command allows you to automatically deploy a wide range of software!

We continue the series with a template that builds on last month’s example. This template will install and integrate a Prometheus exporter into the AdGuard Home service we installed last time.

If you missed “last time” you can find it here: Bastille Template: AdGuard Home.

Prometheus is my preferred way to capture metrics and monitor a home or corporate network. Exporting my DNS information to Prometheus is a great addition to my dashboards.

If you’d like to extend AdGuard Home with this Prometheus exporter follow these steps:


bastille bootstrap

Output Example

ishmael ~ # bastille bootstrap
Cloning into '/usr/local/bastille/templates/bastillebsd-templates/adguardhome-exporter'...
warning: redirecting to
remote: Enumerating objects: 24, done.
remote: Counting objects: 100% (24/24), done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 24 (delta 7), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (24/24), 6.05 KiB | 6.05 MiB/s, done.
Resolving deltas: 100% (7/7), done.
Detected Bastillefile hook.
PKG adguard-exporter
SYSRC adguard_exporter_enable=YES
SYSRC adguard_exporter_username=adguard
SYSRC adguard_exporter_password=BastilleBSD!
SYSRC adguard_exporter_hostname=${JAIL_IP}
SYSRC adguard_exporter_port=80
SYSRC adguard_exporter_protocol=http
SERVICE adguard_exporter restart

Template ready to use.


Apply the new template to your existing adguardhome container created from the previous guide.

bastille template adguardhome bastillebsd-templates/adguardhome-exporter

Output Example

Applying template: bastillebsd-templates/adguardhome-exporter...
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
	adguard-exporter: 1.14

Number of packages to be installed: 1

The process will require 6 MiB more space.
2 MiB to be downloaded.
[adguard] [1/1] Fetching adguard-exporter-1.14.pkg: 100%    2 MiB   2.0MB/s    00:01
Checking integrity... done (0 conflicting)
[adguard] [1/1] Installing adguard-exporter-1.14...
===> Creating groups.
Using existing group 'nobody'.
===> Creating users
Using existing user 'nobody'.
[adguard] [1/1] Extracting adguard-exporter-1.14: 100%

adguard_exporter_enable:  -> YES

adguard_exporter_username:  -> adguard

adguard_exporter_password:  -> BastilleBSD!

adguard_exporter_hostname:  ->

adguard_exporter_port:  -> 80

adguard_exporter_protocol:  -> http

Starting adguard_exporter.

Template applied: bastillebsd-templates/adguardhome-exporter


Now that the template is applied you can add the node to your Prometheus targets. The exporter presents metrics on port :9617.

You’ll probably want to import the AdGuard Exporter Grafana Dashboard too.

Christer Edwards
Creator of Bastille

FreeBSD die-hard, software developer, author, educator, man behind BastilleBSD. I build cool stuff.