Heimdall-Apps: Pi-Hole Live-Stats broken after updating AdminLTE

After Update Pi-Hole admin web interface the live-stats gone missing.

In this Update Pihole added authentication to more endpoints.

https://pi-hole.net/blog/2022/11/17/upcoming-changes-authentication-for-more-api-endpoints-required/

It seems that the pi-hole part is just calling the api.php endpoint without any queries.

https://github.com/linuxserver/Heimdall-Apps/blob/master/Pihole/Pihole.php

To get it running again the endpoint should be called with the empty query summaryRaw and the api token in the query param auth. So the config-ui should also ask for the api key. In my setup I have following results:

HTTP 200 OK https://host/admin/api.php

[]

The correct endpoint should be.

https://host/admin/api.php?summaryRaw&auth=654065165cd1sa56d106c5115cd10as651d0652013rdc2dcas

HTTP 200 OK {"domains_being_blocked":50123,"dns_queries_today":100123,"ads_blocked_today":80123,"ads_percentage_today":38.890179,"unique_domains":2123,"queries_forwarded":20123,"queries_cached":10123,"clients_ever_seen":20,"unique_clients":12,"dns_queries_all_types":100123,"reply_UNKNOWN":555,"reply_NODATA":5555,"reply_NXDOMAIN":999,"reply_CNAME":10123,"reply_IP":12312,"reply_DOMAIN":123,"reply_RRNAME":0,"reply_SERVFAIL":15,"reply_REFUSED":0,"reply_NOTIMP":0,"reply_OTHER":0,"reply_DNSSEC":0,"reply_NONE":0,"reply_BLOB":775,"dns_queries_all_replies":158602,"privacy_level":0,"status":"enabled","gravity_last_updated":{"file_exists":true,"absolute":1671730768,"relative":{"days":1,"hours":3,"minutes":35}}}

I pseudomized the numbers 😃

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 17

Most upvoted comments

Finally managed to make it work by using http://pihole:80/admin/api.php. Note that “pihole” is the container name and thus the name on the internal docker network. Port 80 is the internal container port of the docker container, not the port exposed on the host.

I guess the new config UI needs to have a separate fields for the API token, so that Heimdall can correctly compose the URLs it needs (i.e. the URL field would still be the api.php base URL).