Auch verfügbar in: DE Deutsch

Pi-hole

Inhalt

DNS filter via REST API + API token. Multi-instance supported — manage as many Pi-holes as you like in parallel.

What the integration can do

  • DNS query statistics, block rate, top adlists per Pi-hole
  • Aggregated values across multiple Pi-holes when the widget has multiple integrationIds[]

Prerequisites

  • Pi-hole v5.0+ with API enabled
  • API token from /admin/settings.php → API (in the "API / Web Interface" tab)

Setup in Mesh

  1. Admin → Integrations → Pi-hole → "Add"
  2. Per instance:
    • label — e.g. "Pi-hole Primary"
    • baseUrl — e.g. http://192.168.1.4
    • apiToken — from Pi-hole settings
  3. Save → repeat for additional Pi-holes

Using the widget

Admin → Content → Widgets → "Pi-hole". Settings:

  • integrationIds[] — list of Pi-hole instance IDs (one or more)
  • With multiple: values are summed

Troubleshooting

  • API token invalid → regenerate in Pi-hole settings; old tokens are invalidated on reset
  • PHP errors in JSON response → check Pi-hole PHP log (/var/log/lighttpd/error.log); usually an old Pi-hole version
  • No data even though token is correct → API may be disabled via ?auth= (Settings → API → "Permit destructive actions")

API endpoints (for debugging)

Endpoint Purpose
GET /admin/api.php?summary&auth=<token> Stats aggregate
GET /admin/api.php?type=top_domains&auth=<token> Top adlists