Artica Wiki

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

Use cases

Turn on the export

Prometheus export settings

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

The new access token, shown once

Configure Prometheus

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

Prometheus tab with the collection address and the job

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']

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

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