Question about pihole extend

What is “CONFIGFILE=‘/etc/snmp/pi-hole.conf’” as referenced in the /etc/snmp/pi-hole script? Should I have this file?

The reason I ask, is because I don’t get anything from the pi-hole script, but zeros.
$ ./pi-hole

0
0
$
I seem to be missing something, but I have been over the configuration at least 20 times.
The snmp-extend page for pi-hole seems pretty simple to implement.

I’m pretty sure pi-hole.conf is just meant to contain overrides for the same variables that are in the script. These…

API_AUTH_KEY=""
API_URL="localhost/admin/api.php"
URL_READ_ONLY="?summaryRaw&auth="
URL_QUERY_TYPE="?getQueryTypes&auth="
PICONFIGFILE='/etc/pihole/setupVars.conf'
DHCPLEASEFILE='/etc/pihole/dhcp.leases'

If you don’t have pi-hole.conf, it just uses those as the default values. If you have it, it will override those with whatever is in pi-hole.conf. Most are probably fine as default, you might put API_AUTH_KEY in there.

Are you seeing actual values if you go to the pihole’s API manually? The script queries two different URLs.

http://[pihole IP]/admin/api.php?summaryRaw&auth=
http://[pihole IP]/admin/api.php?getQueryTypes&auth=

(if you have an API key put it after auth=)