{"id":2389,"date":"2011-11-24T23:06:03","date_gmt":"2011-11-24T22:06:03","guid":{"rendered":"http:\/\/blog.beufa.net\/?p=31"},"modified":"2014-09-01T19:29:18","modified_gmt":"2014-09-01T18:29:18","slug":"bindgraph-surveiller-usage-de-votre-serveur-dns-bind","status":"publish","type":"post","link":"https:\/\/beufa.net\/fr\/blog\/bindgraph-surveiller-usage-de-votre-serveur-dns-bind\/","title":{"rendered":"[Bind] Bindgraph : surveiller l&#8217;usage de votre DNS"},"content":{"rendered":"<p>Utilisateur de Bind en tant que serveur local et de cache, j&#8217;ai d\u00e9couvert hier un outil assez sympa pour surveiller l&#8217;utilisation de Bind et les requ\u00eates faites sur mon r\u00e9seau local : <strong>BindGraph<\/strong>.<\/p>\n<p>Pour l&#8217;installer :<\/p>\n<pre class=\"brush:shell\">$ sudo apt-get install bindgraph<\/pre>\n<p>Bien \u00e9videmment, il vous faut un serveur Bind et Apache fonctionnels, avec librrd4 et perl correctement install\u00e9s !<\/p>\n<p>Une fois install\u00e9, il est n\u00e9cessaire de configurer un fichier de collecte pour le script Perl <em>bindgraph.pl<\/em> que l&#8217;on vient d&#8217;installer. Dans le fichier d&#8217;options de bind, dans la partie logging, cr\u00e9er le <em>channel<\/em> et la <em>category<\/em> suivants :<\/p>\n<pre class=\"brush:shell\">$ sudo vim \/etc\/bind\/named.conf.options\r\n\r\nlogging {\r\n        channel \"querylog\" {\r\n                file \"\/var\/log\/named\/query.log\";\r\n                print-time yes;\r\n        };\r\n        category queries { querylog; };\r\n};<\/pre>\n<p>Une fois cela r\u00e9alis\u00e9, une simple commande va permettre de lancer le script perl <em>bindgraph.pl<\/em> :<\/p>\n<pre class=\"brush:shell\">sudo nice -20 bindgraph.pl --daemon --logfile \/var\/log\/named\/query.log<\/pre>\n<p>Vous pourrez ensuite consulter l&#8217;usage<em> last hours<\/em>, quotidien, hebdomadaire, mensuel et annuel de votre serveur Bind, en vous rendant sur <em><a class=\"smarterwiki-linkify\" href=\"http:\/\/[server]\/\/cgi-bin\/bindgraph.cgi\">http:\/\/[server]\/\/cgi-bin\/bindgraph.cgi<\/a><\/em><\/p>\n<p><a href=\"https:\/\/beufa.net\/wp-content\/uploads\/2011\/11\/bindgraph.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-32 size-full\" title=\"bindgraph\" src=\"https:\/\/beufa.net\/wp-content\/uploads\/2011\/11\/bindgraph.png\" alt=\"bindgraph\" width=\"728\" height=\"583\" \/><\/a><\/p>\n<p>Vous pouvez chercher sur Google <a href=\"https:\/\/www.google.com\/search?q=inurl:bindgraph.cgi&amp;ie=utf-8&amp;oe=utf-8\" target=\"_blank\"><em>inurl:bindgraph.cgi<\/em><\/a> pour trouver des exemples de graph, comme celui-ci : <a href=\"https:\/\/dns.webhotel.net\/cgi-bin\/bindgraph.cgi\" target=\"_blank\">https:\/\/dns.webhotel.net\/cgi-bin\/bindgraph.cgi<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Utilisateur de Bind en tant que serveur local et de cache, j&#8217;ai d\u00e9couvert hier un outil assez sympa pour surveiller l&#8217;utilisation de Bind et les&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/beufa.net\/fr\/blog\/bindgraph-surveiller-usage-de-votre-serveur-dns-bind\/\">Continue reading<span class=\"screen-reader-text\">[Bind] Bindgraph : surveiller l&#8217;usage de votre DNS<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28,18,22],"tags":[],"class_list":["post-2389","post","type-post","status-publish","format-standard","hentry","category-bind","category-dns","category-perl-script","entry"],"_links":{"self":[{"href":"https:\/\/beufa.net\/fr\/wp-json\/wp\/v2\/posts\/2389","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/beufa.net\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/beufa.net\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/beufa.net\/fr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/beufa.net\/fr\/wp-json\/wp\/v2\/comments?post=2389"}],"version-history":[{"count":1,"href":"https:\/\/beufa.net\/fr\/wp-json\/wp\/v2\/posts\/2389\/revisions"}],"predecessor-version":[{"id":2484,"href":"https:\/\/beufa.net\/fr\/wp-json\/wp\/v2\/posts\/2389\/revisions\/2484"}],"wp:attachment":[{"href":"https:\/\/beufa.net\/fr\/wp-json\/wp\/v2\/media?parent=2389"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/beufa.net\/fr\/wp-json\/wp\/v2\/categories?post=2389"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/beufa.net\/fr\/wp-json\/wp\/v2\/tags?post=2389"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}