From 3ee88592cf75836a9132b4b793029384bd6800bf Mon Sep 17 00:00:00 2001 From: lpoujol Date: Fri, 8 Dec 2023 16:41:52 +0100 Subject: [PATCH] =?UTF-8?q?Compl=C3=A9ment=20pour=20munin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HowtoUnbound.md | 46 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/HowtoUnbound.md b/HowtoUnbound.md index f4a1bbd9..f0649260 100644 --- a/HowtoUnbound.md +++ b/HowtoUnbound.md @@ -142,6 +142,49 @@ On active Unbound dans `rc.conf.local` et on démarre le daemon : ## Monitoring +### Munin + +Il existe un plugin Munin pour Unbound. Il nécessite un réglage spécifique côté Unbound et Munin pour bien fonctionner. + +Côté Unbound dans `/etc/unbound/unbound.conf.d/evolinux.conf` : + +~~~ +server: + # Activation des statistiques + extended-statistics: yes + statistics-cumulative: no + statistics-interval: 0 +~~~ + +> **Remarque** : Il est nécessaire d'avoir la directive `control-enable: yes` dans la section `remote-control`. C'est déjà actif par défaut en Debian 12, ou si vous avez configuré Unbound pour que le rechargement de configuration marche. + +Côté Munin, dans `/etc/munin/plugins-conf.d/unbound` : + +~~~ +[unbound*] +user root +env.statefile /tmp/munin-unbound-state +env.unbound_conf /etc/unbound/unbound.conf +env.unbound_control /usr/sbin/unbound-control + +~~~ + +Puis activer les plugins : + +~~~ +# ln -s /usr/share/munin/plugins/unbound_munin_ /etc/munin/plugins/unbound_munin_hits +# ln -s /usr/share/munin/plugins/unbound_munin_ /etc/munin/plugins/unbound_munin_queue +# ln -s /usr/share/munin/plugins/unbound_munin_ /etc/munin/plugins/unbound_munin_memory +# ln -s /usr/share/munin/plugins/unbound_munin_ /etc/munin/plugins/unbound_munin_by_type +# ln -s /usr/share/munin/plugins/unbound_munin_ /etc/munin/plugins/unbound_munin_by_class +# ln -s /usr/share/munin/plugins/unbound_munin_ /etc/munin/plugins/unbound_munin_by_opcode +# ln -s /usr/share/munin/plugins/unbound_munin_ /etc/munin/plugins/unbound_munin_by_rcode +# ln -s /usr/share/munin/plugins/unbound_munin_ /etc/munin/plugins/unbound_munin_by_flags +# ln -s /usr/share/munin/plugins/unbound_munin_ /etc/munin/plugins/unbound_munin_histogram +~~~ + +Et ne pas oublier de redémarrer munin-node (`systemctl restart munin-node`) + ### Avoir des statistiques On peut accéder à des statistiques avec [unbound-control(8)](https://man.openbsd.org/unbound-control). @@ -151,8 +194,7 @@ Pour cela, le `remote-control` doit être activé : ~~~ remote-control: control-enable: yes - control-use-cert: no - control-interface: /var/run/unbound.sock + control-interface: /run/unbound.ctl ~~~ Sous Debian :