Rachid Groeneveld wrote:
I've been looking at PiHole and Firewalla and I like how those dashboards are pleasing to the eye and wanted to achieve the same within IPFire. I think it's quite possible and IPFire hosts way more functionality, so why not the fancy dashboard? With that in mind I looked for info on the themes in IPF, I found that someone - a few years ago - already created an admin dashboard, but I never received responses to my communication attempts. So I thought, what the heck, I'll just create the dashboard myself, but in order to actually - have a dashboard - I need metrics. PiHole has an FTL implementation which includes (parts of) Unbound and they're able to show quite a bit of interesting information (see attachment, apologies for the size I had to google it). Firewalla has the same, but is more tailored to SOHO and is managed through an app.
TLDR; I want the dashboard to show metrics you can work with, like PiHole does. The whole controlling DNS and traffic part is not yet part of the scope. I already queried the network info (I used parts of other cgi's), DNS is the next step and then firewall stats (blocked/dropped, maybe per country etc.)
Looking at what you are trying to do, I think you need at least 2 programs. The first would gather your time series data and save this to a file or an RRD or similar and would be updated from cron. This would allow root to run “unbound-control stats_noreset" but the data would be accessible to user nobody.
A second perl cgi program would then read the time series data and display it through the IPFire web interface.
For inspiration have a look at my adslmonitor addon for IPCop which does something similar.
https://sourceforge.net/projects/adslmonitor/
Rob