วันจันทร์ที่ 29 กรกฎาคม พ.ศ. 2556

Install Munin Monitor Bind DNS on CentOS 6.4


Install Munin Monitor Bind DNS on CentOS 6.4

พอดีอยากได้ตัว Monitoring เจ้าตัว Bind ที่เป็น DNS ก็เลยหาตัวที่สามารถดูได้แสดงผลเป็นกราฟ ก็ไปเจอกับ Munin ที่ชื่อคล้ายตัวละคร น่าสนใจและมี Plugins อีกหลายตัวให้เลือกใช้ แต่เป็นตัว Monitoring ที่ต้องลงในเครื่องนั้น ไม่ค่อยเหมาะสมกับระบบที่มี Server หลายๆ เครื่องเท่าไหร่

เริ่มติดตั้งกันเลยดีกว่า


Install  Epel Repository
$cd /usr/src/
$rpm -ivh epel-release-6-8.noarch.rpm

Install  munin munin-node
$yum install -y munin munin-node
$yum install httpd
$chkconfig httpd on
$chkconfig munin on
$service httpd restart

Create User access web interface
$cd /var/www/html/munin/
$htpasswd -c .htpasswd Admin

$ nano -w /etc/httpd/conf.d/munin.conf

<directory /var/www/html/munin>



AuthUserFile /var/www/html/munin/.htpasswd

AuthName "Admin"

AuthType Basic

require valid-user

$service httpd restart

Configuration munin
$ln -s /usr/share/munin/plugins/bind9 /etc/munin/plugins/bind9
$ln -s /usr/share/munin/plugins/bind9_rndc /etc/munin/plugins/bind9_rndc

$nano -w /etc/munin/plugin-conf.d/munin-node
 log พวกนี้เราสามารถเปลี่ยนไปตาม Configuration ใน Bind ที่เรา Configure ไว้แล้วนะครับ
[bind9]

user root

env.logfile   /var/log/named/query.log



[bind9_rndc]

user root

env.querystats /var/named/data/named_stats

$/etc/init.d/munin-node restart
$rndc stats
$munin-run bind9
$munin-run bind9_rndc

เราสามารถ Debug ได้ด้วยคำสั่ง --debug น่ะครับ
$munin-run bind9 --debug
$munin-run bind9_rndc --debug

ทดสอบเข้าให้ Web Interface ดูมีผลลัพท์ ดังนี้แหละครับ และมันยังแสดงผล Process อื่นได้อีกหลายอันลองเอาไปใช้ดูน่ะครับ


ไม่มีความคิดเห็น:

แสดงความคิดเห็น