{"id":21464284,"url":"https://github.com/shuque/bind9stats","last_synced_at":"2025-07-15T04:31:31.244Z","repository":{"id":7007928,"uuid":"8275646","full_name":"shuque/bind9stats","owner":"shuque","description":"Data collection tools for the BIND9 DNS server's statistics server","archived":false,"fork":false,"pushed_at":"2019-10-16T11:25:33.000Z","size":1846,"stargazers_count":37,"open_issues_count":3,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-08T21:07:07.339Z","etag":null,"topics":["bind9","dns","grafana","graphite","munin","server","statistics","xml"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shuque.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-18T19:39:58.000Z","updated_at":"2024-11-30T14:38:57.000Z","dependencies_parsed_at":"2022-09-16T22:50:50.876Z","dependency_job_id":null,"html_url":"https://github.com/shuque/bind9stats","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/shuque/bind9stats","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuque%2Fbind9stats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuque%2Fbind9stats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuque%2Fbind9stats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuque%2Fbind9stats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shuque","download_url":"https://codeload.github.com/shuque/bind9stats/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuque%2Fbind9stats/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265402833,"owners_count":23759237,"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":["bind9","dns","grafana","graphite","munin","server","statistics","xml"],"created_at":"2024-11-23T07:31:06.751Z","updated_at":"2025-07-15T04:31:30.962Z","avatar_url":"https://github.com/shuque.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bind9stats.py\n\nPrograms to obtain data from the statistics channel of a BIND9\nDNS server, and send it to some graphing and data visualization\ntools. The original program, bind9stats.py, was written to\nbe a plugin for Munin, and has recently been renamed to\nbind9stats-munin.py. There is also a newer version, called\nbind9stats-graphite.py, that works with Graphite and Grafana.\n\n\n## bind9stats-munin.py: Munin plugin\n\nversion 0.31\n\nA munin plugin to obtain data from a BIND9 statistics server, written\nin Python. Tested with BIND 9.10, 9.11, and 9.12's statistics server\nexporting version 3 of the statistics. In earlier versions of BIND 9.9,\nthe v3 schema of statistics can be specified using the 'newstats'\nconfiguration directive. The newstats option was introduced in BIND 9.9.3.\n\nIf you are using older versions of BIND 9.9 that only support version \n2  of the XML statistics, you'll need to use the 0.1x version of this \nprogram, which can be obtained from: \n\n   https://github.com/shuque/bind9stats/archive/v0.12.tar.gz\n\nSoftware needed to use this:\n* Python 2.7 or later, or Python 3.x.\n* BIND: BIND DNS server from isc.org. https://www.isc.org/software/bind\n* Munin: a resource monitoring tool that does pretty graphs.\n       See http://munin-monitoring.org/ for details.)\n\nSome notes:\n* BIND can be configured to provide per-zone query statistics also. This\n  plugin currently doesn't process that data, and only does the aggregate\n  statistics for the entire server.\n* Only the _default view is used. Servers configured to use multiple\n  views that want per view statistics will have to extend this program\n  a bit.\n\nInstructions for using this:\n- Have a DNS server running BIND9, with the statistics server enabled.\n\n  On my BIND servers, I usually have something like the following in the\n  configuration file:\n\n        statistics-channels {\n                inet 127.0.0.1 port 8053 allow { 127.0.0.1; };\n        };\n\n- Have a munin-node running on it, install bind9stats.py in its plugins\n  directory and restart the node.\n  You can also run the plugin on another machine, if the statistics\n  server allows queries remotely. Set the HOST and PORT environment\n  variables appropriately in that case before invoking bind9stats.py.\n\nSample munin graphs produced by this plugin:\n\n![Muning Graph 1](visual/munin/1opcodes.jpg)\n![Muning Graph 1](visual/munin/2queries-in.jpg)\n\n\n## bind9stats-graphite.py\n\nThis version of the program collects BIND9 statistics and sends them\nto a [Graphite](https://graphite.readthedocs.io/en/latest/) server,\nanother monitoring tool and time series data store. This runs as a long\nlived daemon, collects statistics at regular intervals (default is every\nminute), and then sends them to a Graphite server.\n\n```\nUsage: bind9stats-graphite.py [Options]\n\n    Options:\n    -h             Print this usage message\n    -d             Generate some diagnostic messages\n    -f             Stay in foreground (default: become daemon)\n    -m metrics     Comma separated metric types\n                   (default: auth,res,bind,zone,memory)\n                   (supported: auth,res,bind,zone,memory,socket)\n    -n name        Specify server name (default: 1st component of hostname)\n    -i interval    Polling interval in seconds (default: 60 sec)\n    -s server      Graphite server IP address (default: 127.0.0.1)\n    -p port        Graphite server port (default: 2003)\n    -r             Really send data to Graphite (default: don't)\n\n    -o options     Other comma separated options (default: none)\n                   (supported: derive)\n```\n\nInstallation:\n\n* Install the program into a suitable location on your system, e.g.\n    sudo cp bind9stats-graphite.py /usr/local/sbin/\n* Arrange for the program to be started up on system boot. A sample\n  [Systemd service file](systemd-service) and [Startup options file]\n  (sysconfig-options) is provided. The OPTIONS variable in the latter\n  specifies that command line options to start the program with, which\n  by default is set to: OPTIONS=\"-d -s 127.0.0.1 -r\"\n\nGraphite is commonly the default backend for\n[Grafana](https://grafana.com/), a popular data visualization tool\nand dashboard. The included sample [Grafana dashboard configuration file](Grafana-BIND.json)\nproduces output like the following:\n\n![Grafana Screenshot 1](visual/grafana/bind9-grafana1.png)\n![Grafana Screenshot 1](visual/grafana/bind9-grafana2.png)\n![Grafana Screenshot 1](visual/grafana/bind9-grafana3.png)\n\nAuthor: Shumon Huque\n\nCopyright (c) 2013-2015 - Shumon Huque. All rights reserved.  \nThis program is free software; you can redistribute it and/or modify \nit under the same terms as Python itself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuque%2Fbind9stats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshuque%2Fbind9stats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuque%2Fbind9stats/lists"}