lost and found ( for me ? )

ubuntu 12.04 unbound : monitor DNS statistics with munin

Here is how to monitor unbound DNS stats via munin within one box.

install apache2, munin and munin-node within one box.
# tail -1 /etc/lsb-release ;uname -ri
3.5.0-41-generic x86_64

# apt-get install unbound munin munin-node apache2

[ Apache ]

configure Apache to view munin stats via an web browser
# cp /etc/munin/apache.conf /etc/apache2/sites-available/munin

edit /etc/apache2/sites-available/munin like this:
# egrep -v \# /etc/apache2/sites-available/munin
Alias /munin /var/cache/munin/www
<Directory /var/cache/munin/www>
       Order allow,deny
       Allow from all
       Options None

   <IfModule mod_expires.c>
       ExpiresActive On
       ExpiresDefault M310


# a2ensite munin

[ munin and unbound ]

download unbound source code to get munin plugin

download source code and copy munin ubnound plugin
# apt-get source unbound
# cp unbound-1.4.18/contrib/unbound_munin_ /usr/share/munin/plugins/
# chown root.root /usr/share/munin/plugins/unbound_munin_
# chmod 755 /usr/share/munin/plugins/unbound_munin_

# 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_flags
# 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_type
# ln -s /usr/share/munin/plugins/unbound_munin_ /etc/munin/plugins/unbound_munin_histogram
# 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_memory
# ln -s /usr/share/munin/plugins/unbound_munin_ /etc/munin/plugins/unbound_munin_queue

edit unbound.conf
# egrep -v ^# unbound.conf | grep -v ^$ | grep -v \#
       verbosity: 1
        statistics-interval: 0
        statistics-cumulative: no
        extended-statistics: yes
        do-ip6: no
        access-control: allow

        control-enable: yes

restart unbound, munin-node and apache
# service unbound restart
# service munin-node restart
# service apache2 restart

access to http:// IP address/munin

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.