package
0.0.0-20250117094922-56e3cfebe041
Repository: https://github.com/eblocker/eblocker-coredns.git
Documentation: pkg.go.dev

# README

filterstats

Name

filterstats - collect domain filter statistics in Redis.

Description

The filterstats plugin counts queries that were blocked by the domainfilter plugin.

The following Redis counters are used:

KeyValue
PREFIX:blocked_queries:BLOCKLISTNumber of blocked queries for the specific timestamp, client IP and blocking list
PREFIX:queriesTotal number of queries for the specific timestamp and client IP
stats_total:dns:blocked_queries:BLOCKLISTTotal number of blocked queries for the specific blocking list
stats_total:dns:queriesTotal number of queries

Where PREFIX is a combination of the current minute of the day and the client's IP address:

dns_stats:YYYYMMDDhhmm:CLIENT_IP

Syntax

filterstats

Examples

Collect stats from the configured domainfilter:

. {
    filterstats
    domainfilter localhost:7777 deny
    metadata
}

Metadata

The plugin will read the following metadata, if the metadata and domainfilter plugins are also enabled:

  • domainfilter/blockedbylist: the domain in the query was blocked by the given list

See also

The relevant classes in the ICAP server are: