Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Pi-hole Local Stats

local · browser-only · no server

A serverless, single-page dashboard for analyzing your Pi-hole query logs.

This tool computes per-client query breakdowns and per-blocklist block attribution entirely in your browser tab using WebAssembly SQLite (sql.js). Everything runs locally on your machine—no data is uploaded to any server.

Features

  • Per-Client Breakdowns: See total, blocked, and allowed queries, plus the overall block percentage for each client on your network.
  • Top Domains: View top blocked domains, top permitted domains, and top permitted root domains (calculated using a bundled public-suffix rule set).
  • Blocklist Attribution: If you load your gravity.db file, the tool maps blocked domains back to the specific lists that blocked them. It ranks your lists by total blocks and unique domains, and even flags "zero-hit" lists that aren't doing any work.
  • Optional Geolocation: An opt-in feature to look up the origin countries of your top blocked domains.
  • Date Filtering: Filter your data by the last 24 hours, 7 days, 30 days, or a custom date range.[cite: 1]

Compatibility

Built specifically for the pihole-FTL.db and gravity.db schema used in Pi-hole v6.[cite: 1]

How to Use

  1. Download the HTML file: Save pihole-local-stats.html to your computer and open it in any modern web browser.

  2. Back up your live Pi-hole databases: It's highly recommended to make a copy of your live databases rather than downloading them directly while in use. Run this on your local windows machine:[cite: 1]

    1. ssh pi@ "sudo sqlite3 /etc/pihole/pihole-FTL.db '.backup /tmp/pihole-FTL.db' && sudo chmod +r /tmp/pihole-FTL.db"
    2. scp pi@:/tmp/pihole-FTL.db C:\Users\user\Downloads\pihole-FTL.db
    3. scp pi@pi@:/etc/pihole/gravity.db C:\Users\user\Downloads\gravity.db
image

About

A serverless, browser-based analytics dashboard for Pi-hole. Computes local client and blocklist stats using WebAssembly SQLite

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages