{"id":13584308,"url":"https://github.com/jianershi/unbound-config","last_synced_at":"2025-04-07T01:32:00.679Z","repository":{"id":145597918,"uuid":"344847746","full_name":"jianershi/unbound-config","owner":"jianershi","description":"run unbound dns with grafana dashboard on raspberry pi","archived":false,"fork":false,"pushed_at":"2022-11-03T02:48:54.000Z","size":2762,"stargazers_count":25,"open_issues_count":4,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-06T01:39:55.942Z","etag":null,"topics":["dashboard","dns","grafana","prometheus","raspbeerypi","raspberry-pi","stats","unbound","unbound-dns"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jianershi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-03-05T15:11:50.000Z","updated_at":"2024-10-02T17:38:02.000Z","dependencies_parsed_at":"2023-05-31T08:45:12.442Z","dependency_job_id":null,"html_url":"https://github.com/jianershi/unbound-config","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jianershi%2Funbound-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jianershi%2Funbound-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jianershi%2Funbound-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jianershi%2Funbound-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jianershi","download_url":"https://codeload.github.com/jianershi/unbound-config/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247578014,"owners_count":20961217,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dashboard","dns","grafana","prometheus","raspbeerypi","raspberry-pi","stats","unbound","unbound-dns"],"created_at":"2024-08-01T15:04:09.631Z","updated_at":"2025-04-07T01:31:55.661Z","avatar_url":"https://github.com/jianershi.png","language":null,"funding_links":[],"categories":["Others"],"sub_categories":[],"readme":"this repo is no longer maintained. \n\ncurrently I am using the docker version only.\n* https://github.com/jianershi/docker-unbound-grafana\n\n\n# Unbound Config\n\nconfig files for unbound recursive dns and a dashboard config based on grafana, runnable on pi\n\n![screenshot](screenshot.png)\n\n\n\n## Steps\n\nThe following steps have been tested to be working on [**Ubuntu** Server 20.04.2 LTS](https://ubuntu.com/download/raspberry-pi) for Raspberry Pi 2. Newer versions of hardware should work as well.\n\n1. install and config unbound, including setup new control certificate for the server (needed when exporting the stats with unbound_exporter)\n\n   ```\n   sudo apt-get install unbound\n   sudo curl -o /var/lib/unbound/root.hints https://www.internic.net/domain/named.cache\n   sudo cp unbound.conf /etc/unbound/unbound.conf.d/\n   sudo systemctl enable unbound\n   sudo service unbound restart\n   ```\n\n   * guide to configure unbound\n     * https://calomel.org/unbound_dns.html\n     * https://nlnetlabs.nl/documentation/unbound/unbound.conf/\n\n   * to generate self-signing certificate for unbound control interface if you don't have any under /etc/unbound\n\n     ````\n     sudo unbound-control-setup\n     ````\n     \n     this will generate `unbound_server.pem`, `unbound_server.key`, `unbound_control.pem`, `unbound_control.key`\n     \n   * to update `root.hint` automatically, edit `/etc/crontab`\n\n     ```\n     #unbound update root hint\n     55 4    * * *   root    curl -o /var/lib/unbound/root.hints https://www.internic.net/domain/named.cache\n     ```\n\n     to learn how to use crontab: [https://crontab guru](https://crontab.guru/#55_4_*_*_*)\n\n2. install Grafana\n\n   * https://grafana.com/docs/grafana/latest/installation/debian/\n\n3. install PROMETHEUS\n\n   `sudo apt-get install prometheus`\n\n4. compile and install [unbound_exporter](https://github.com/kumina/unbound_exporter), which uses unbound control interface to export stats to a webpage\n\n   ```\n   go get github.com/kumina/unbound_exporter\n   go install github.com/kumina/unbound_exporter\n   sudo cp go/bin/unbound_exporter /usr/bin\n   sudo cp go/bin/unbound_exporter /usr/sbin\n   sudo cp unbound-exporter.service /lib/systemd/system/\n   sudo systemctl enable unbound-exporter.service\n   sudo service unbound-exporter restart\n   ```\n\n5. config PROMETHEUS file to use unbound_exporter as a source\n\n   * `sudo cp prometheus.yml /etc/prometheus/`\n\n   * may/maynot need to enable unbound scrap service in prometheus control panel at `http://pi_address:9090/targets`\n\n6. in grafana(`http://pi_address:3000`): add data source -\u003e prometheus in grafana web panel\n\n   url: localhost:9090\n\n7. install unbound panel\n\n   1. manage panel-\u003eimport via panel json\n   2. copy contents in `grafana.json` over. This panel was modified from [unbound dashboard by svartalf](https://grafana.com/grafana/dashboards/11705)\n\n8. after installation, grafana should be accessed at `http://pi_address:3000`\n\n## Diagram\n\n![diagram](diagram.png)\n\n## Performance\n\nperformance over 400Mbps/?Mbps cable connecton\n\n![performance](performance.png)\n\n```\n Final benchmark results, sorted by nameserver performance:\n (average cached name retrieval speed, fastest to slowest)\n\n  192.168.  1.  2 |  Min  |  Avg  |  Max  |Std.Dev|Reliab%|\n  ----------------+-------+-------+-------+-------+-------+\n  + Cached Name   | 0.000 | 0.000 | 0.002 | 0.000 | 100.0 |\n  + Uncached Name | 0.016 | 0.067 | 0.279 | 0.065 | 100.0 |\n  + DotCom Lookup | 0.018 | 0.046 | 0.088 | 0.026 | 100.0 |\n  ---\u003cO-OO----\u003e---+-------+-------+-------+-------+-------+\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjianershi%2Funbound-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjianershi%2Funbound-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjianershi%2Funbound-config/lists"}