Prometheus export
Publish the DNS Firewall counters to Prometheus and Grafana with a dedicated read-only token.
Put your DNS traffic on the same dashboards as the rest of your network.
The DNS Firewall publishes its counters in the Prometheus format.
Graph them in Grafana and get alerted the moment something changes.
Benefits
- Queries, cache hits and misses, latency, blocked queries and upstream servers, in one place.
- Counters per listener, so you can see how many clients already use DNS-over-HTTPS or DNS-over-TLS.
- The collector has its own access token.
It never gets an administrator account, and it can only read counters. - An optional list of allowed addresses limits who can collect.
- Turning the export on or off does not restart the DNS service.
Use cases
- An operations team watches the query rate and latency of every DNS Firewall in Grafana.
- An alert fires when the share of answers served from the cache drops.
- A team plans the move to encrypted DNS by following the queries received on each listener.
- A service provider checks the health of the upstream servers of each customer appliance.
Turn on the export
- Open DNS in the left menu, then the Prometheus tab.
- Click Edit the export.
- Check Enable Prometheus Exporter.
- In Allowed collectors, type the addresses or networks of your Prometheus servers, separated by commas.
Leave the field empty to accept any address.
The token is still required. - Click Apply.

Artica creates the access token the first time and shows it once.
Copy it now: the console never shows it again.

Configure Prometheus
The tab gives the collection address and a job ready to paste into prometheus.yml.

The collection address uses the HTTPS port of the web console, 9000 by default:
https://<appliance>:9000/dnsfw/metrics/prometheus
- job_name: artica-dnsfw
scheme: https
metrics_path: /dnsfw/metrics/prometheus
authorization:
credentials: <token>
tls_config:
insecure_skip_verify: true
static_configs:
- targets: ['192.168.4.199:9000']
- Replace
<token>with the access token. - The
tls_configlines accept the self-signed certificate of the console.
Remove them when the console uses a certificate your Prometheus server trusts. - A collection interval of 15 to 60 seconds is enough.
Test from the Prometheus server:
curl -k -H "Authorization: Bearer <token>" https://192.168.4.199:9000/dnsfw/metrics/prometheus | head
Main metrics
| Metric | Meaning |
|---|---|
dnsdist_queries |
Queries received by the DNS Firewall. |
dnsdist_responses |
Answers received from the upstream servers. |
dnsdist_cache_hits / dnsdist_cache_misses |
Queries answered from the cache, or sent upstream. |
dnsdist_latency_avg1000 |
Average answer time over the last 1000 queries, in microseconds. |
dnsdist_rule_drop, dnsdist_rule_refused, dnsdist_rule_nxdomain |
Queries dropped, refused or answered NXDOMAIN by a rule. |
dnsdist_frontend_queries |
Queries per listener. The proto label tells UDP, TCP, DNS over TLS and DNS over HTTPS apart. |
dnsdist_server_queries, dnsdist_server_latency |
Queries and latency per upstream server. The latency is in milliseconds. |
dnsdist_dyn_blocked |
Queries refused by a dynamic block, such as the block of a DNS tunnel. |
A test appliance publishes about 500 series.
Renew the token
- Click Generate a new token in the Access token step.
- The old token stops working at once.
- Paste the new one in the Prometheus job.
When the collection fails
| Answer | Cause and fix |
|---|---|
| HTTP 404 | The export is turned off. Turn it on in Edit the export. |
| HTTP 403 | The address of the Prometheus server is not in Allowed collectors. |
| HTTP 401 | The token is missing or wrong. Paste the current token, or generate a new one. |
| HTTP 503 | The DNS service does not answer. Check the Status tab. |
Each refused collection is written in /var/log/articarest.log with the address of the collector, except when the export is off.
Artica Meta
The DNS Firewall policy carries Enable Prometheus Exporter and Allowed collectors.
The token is never sent by Meta.
Each node keeps its own token, and it can be renewed on the node even when Meta holds the other settings.
Reference
- Settings:
DNSDistPrometheus,DNSDistPrometheusAllow,DNSDistPrometheusToken - REST API of the appliance:
GET /dnsfw/prometheusandPOST /dnsfw/prometheus - The Artica AI assistant reads and changes these settings with the skills
dnsfw.prometheus.statusanddnsfw.prometheus.set, after confirmation