Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] pi-hole widget does not display data from API #1628

Closed
5 tasks done
saniac opened this issue Jun 27, 2024 · 3 comments
Closed
5 tasks done

[BUG] pi-hole widget does not display data from API #1628

saniac opened this issue Jun 27, 2024 · 3 comments
Assignees
Labels
🐛 Bug [ISSUE] Ticket describing something that isn't working 🕸️ Inactive 🛑 No Response [ISSUE] Response was requested, but has not been provided

Comments

@saniac
Copy link

saniac commented Jun 27, 2024

Environment

Self-Hosted (Bare Metal)

System

Firefox 126.0.2 and Chromium Version 126.0.6478.114

Version

3.1.1

Describe the problem

Dashy displays the widget correctly but unpopulated with data except for Active Clients field which shows "Undefined/Undefined".

image

Additional info

I set up the pi-hole-stats widget as follows:

- type: pi-hole-stats
    label: Pihole DNS
    options:
        hostname: http://dns
        apiKey: xxxxxxxxxxxxxxxxxxx 

I have created a proxy server for the pihole server which adds the header Access-Control-Allow-Origin: * and I can verify that this is set in the response:

HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Cache-Control: no-store, no-cache, must-revalidate
Content-Length: 756
Content-Security-Policy: default-src 'self' 'unsafe-inline';
Content-Type: application/json
Date: Thu, 27 Jun 2024 09:21:35 GMT
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Pragma: no-cache
Referrer-Policy: same-origin
Server: Caddy
Server: lighttpd/1.4.53
Set-Cookie: PHPSESSID=bg4fueo32aq6rr42cls3qb5lm3; path=/; HttpOnly; SameSite=Strict
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-Permitted-Cross-Domain-Policies: none
X-Pi-Hole: The Pi-hole Web interface is working!
X-Xss-Protection: 0

The pihole server returns this JSON:

{"domains_being_blocked":"161,604","dns_queries_today":"48,829","ads_blocked_today":"10,490","ads_percentage_today":"21.5","unique_domains":"4,020","queries_forwarded":"30,186","queries_cached":"7,323","clients_ever_seen":"16","unique_clients":"16","dns_queries_all_types":"48,829","reply_UNKNOWN":"965","reply_NODATA":"6,344","reply_NXDOMAIN":"815","reply_CNAME":"11,853","reply_IP":"26,375","reply_DOMAIN":"301","reply_RRNAME":"138","reply_SERVFAIL":"1,894","reply_REFUSED":"0","reply_NOTIMP":"0","reply_OTHER":"0","reply_DNSSEC":"6","reply_NONE":"0","reply_BLOB":"138","dns_queries_all_replies":"48,829","privacy_level":"0","status":"enabled","gravity_last_updated":{"file_exists":true,"absolute":1719476443,"relative":{"days":0,"hours":1,"minutes":0}}}

I do not see errors in the browser console.

Please tick the boxes

@saniac saniac added the 🐛 Bug [ISSUE] Ticket describing something that isn't working label Jun 27, 2024
@github-project-automation github-project-automation bot moved this to Awaiting Triage in Dashy V3 Jun 27, 2024
@saniac
Copy link
Author

saniac commented Jun 27, 2024

I forgot to add the pihole versions: Pi-hole v5.18.2 FTL v5.25.2 Web Interface v5.21

@liss-bot liss-bot added the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Jun 27, 2024
@CrazyWolf13
Copy link
Collaborator

Hi

For me it's still working for Pi-hole v5.18.3 FTL v5.25.2 Web Interface v5.21

Can you make sure the hostname is correct, and set up the api-key again?

You can also try to add the CORS Proxy:

Could you show the output of the browser console?

- type: pi-hole-stats
    label: Pihole DNS
    useProxy: true
    options:
        hostname: http://dns
        apiKey: xxxxxxxxxxxxxxxxxxx 

@liss-bot liss-bot removed the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Aug 8, 2024
@CrazyWolf13 CrazyWolf13 added 🚏 Awaiting User Response [ISSUE] Response from original author is pending 🛑 No Response [ISSUE] Response was requested, but has not been provided labels Aug 17, 2024
@liss-bot
Copy link
Collaborator

Issue closed due to no response from user.

@github-project-automation github-project-automation bot moved this from Awaiting Triage to Done in Dashy V3 Aug 21, 2024
@liss-bot liss-bot removed the 🚏 Awaiting User Response [ISSUE] Response from original author is pending label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug [ISSUE] Ticket describing something that isn't working 🕸️ Inactive 🛑 No Response [ISSUE] Response was requested, but has not been provided
Projects
Status: Done
Development

No branches or pull requests

4 participants