What you need
- Multimeter for macOS 13 or later, $19.99 once.
- The direct download version of Multimeter from this site (the Script source isn’t in the Mac App Store version).
- Pi-hole v6 or later.
- An app password: in the Pi-hole web interface, Settings, Web interface / API, Configure app password. It works even with two-factor login on.
jqfor picking numbers out of JSON. It comes with macOS 15 and later; on macOS 13 or 14 runbrew install jq.
Set it up
- Save the app password in your login Keychain, so it never sits in the command or a file. Run this in Terminal; it asks for the value and hides what you type.Terminal (once)
security add-generic-password -U -a "$USER" -s pihole -w - Run the command in Terminal, replacing
http://pi.holewith your Pi-hole’s address if that name doesn’t resolve:CommandB=http://pi.hole; P=$(security find-generic-password -s pihole -w); SID=$(curl -s -m 3 -X POST $B/api/auth -d "{\"password\":\"$P\"}" | jq -r .session.sid); curl -s -m 3 -H "X-FTL-SID: $SID" $B/api/stats/summary | jq '.queries.percent_blocked * 10 | round / 10'; curl -s -m 3 -X DELETE -H "X-FTL-SID: $SID" $B/api/auth >/dev/null - Add a Script meter with it and refresh every minute.
- Set the range to 0 to 100 and the unit to
%. A sudden drop to 0 means blocking stopped; alerts on Low values at 5 catch that.
Multimeter settings
In Customize This Meter… (from the meter’s menu):
| Setting | Value |
|---|---|
| Source | Script |
| Command | the three-step curl line above |
| Refresh every | 1 minute |
| Range | 0 to 100 |
| Unit | % |
| Alerts | Low values: warning 5, critical 1 |
| Label | PIHOLE |
| Face | Pie, Ring or Level Bar |
Tested: Run on October 29, 2026 against Pi-hole v6.5 in Docker: printed 25 (percent blocked) in about a second.
Script meters need the direct download version of Multimeter from this site, which is the one on sale now. How commands run, the PATH they see and the 10 second limit are in the Script meters guide.
Limits
- Pi-hole allows a limited number of open sessions; the last
curlin the command closes the session each time, which matters at a 1 minute refresh.
Variations
Queries blocked today (count)
Change the jq filter to .queries.blocked.
Total queries today
Use .queries.total.
Domains on the blocklist
Use .gravity.domains_being_blocked.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| The script didn’t print a number | The command failed or printed an error message instead. | Run the exact command in Terminal. If it works there, check for tools that live outside the meter’s PATH and use their full path (which tool). |
| The script took longer than 10 seconds | A slow network call. Multimeter stops scripts after 10 seconds. | Keep the -m timeout on curl, and refresh less often. |
| Scripts need the version from multimeterapp.com | This copy of Multimeter came from the Mac App Store, which can’t run scripts. | Use the direct download version, or run the command from cron or launchd and point a File meter at its output. |
Prints null | The login failed, so there was no session. | Check the app password: run the first curl alone and look for "valid": true. |
| API seats exceeded | Earlier tries left sessions open. | They expire on their own after a few minutes. Keep the final logout curl in the command. |
Questions
Does it work with Pi-hole v5?
No, this recipe uses the v6 API. Pi-hole v6 is the current version; update first.
Is it safe to keep the token in the Keychain?
It is the safest place on a Mac for it: encrypted, unlocked with your login, and never written into the command, a dotfile or your shell history. The meter reads it with the security tool each time it runs.
Does this work in the Mac App Store version?
Script meters need the direct download version from multimeterapp.com, because the App Store sandbox doesn’t let apps run your commands. Web Address, File and Sent Value meters work in every version.