Maksud & Tujuan
1. Mengenal tentang Munin
2. Mengenal Monitoring
3. Mengetahui cara install Munin di server
Hal yang dibutuhkan:
1. PC Server
2. Server Linux
Langkah-langkah Installasi:
1. Pertama, Install depedency yang dibutuhkan untuk menginstall Munin. masukkan perintah berikut:
root@asnul:/home/sakti# apt-get -y install apache2 libcgi-fast-perl libapache2-mod-fcgid
2. Kemudian aktifkan modul fcgid dengan memasukkan perintah berikut:
root@asnul:/home/sakti# a2enmod fcgid
Module fcgid already enabled
root@asnul:/home/sakti#
3. Install munin.
root@asnul:/home/sakti# apt-get -y install munin munin-node munin-plugins-extra
4. Pindah ke folder plugins di direktori /etc/munin, lalu buat sebuah sortcut folder plugins dengan memasukkan perintah berikut.
root@asnul:/home/sakti# cd /etc/munin/plugins
root@asnul:/etc/munin/plugins# ln -s /usr/share/munin/plugins/mysql_ mysql_
root@asnul:/etc/munin/plugins# ln -s /usr/share/munin/plugins/mysql_bytes mysql_bytes
root@asnul:/etc/munin/plugins# ln -s /usr/share/munin/plugins/mysql_queries mysql_queries
root@asnul:/etc/munin/plugins# ln -s /usr/share/munin/plugins/mysql_slowqueries mysql_slowqueries
root@asnul:/etc/munin/plugins# ln -s /usr/share/munin/plugins/mysql_threads mysql_threads
root@asnul:/etc/munin/plugins#
5. Jika sudah selesai, masuk ke file munin.conf pada direktori /etc/munin/
# nano /etc/munin/munin.confUbah file menjadi seperti berikut:
# Example configuration file for Munin, generated by 'make build'NB: Perhatikan yang bertanda merah, itu merupakan baris yang diedit. Jika sudah, keluar dan simpan.
# The next three variables specifies where the location of the RRD
# databases, the HTML output, logs and the lock/pid files. They all
# must be writable by the user running munin-cron. They are all
# defaulted to the values you see here.
#
dbdir /var/lib/munin
htmldir /var/cache/munin/www
logdir /var/log/munin
rundir /var/run/munin
# Where to look for the HTML templates
#
tmpldir /etc/munin/templates
# Where to look for the static www files
#
[...]
# a simple host tree
[smksakti.edu]
address 10.20.123.2
use_node_name yes
[...]
6. Buat backup file apache24.conf pada direktori /etc/munin.
root@asnul:/etc/munin/plugins# mv /etc/munin/apache24.conf /etc/munin/apache24.conf_bak
7. Kemudian masuk ke file apache24.conf (file akan kosong!)
# nano /etc/munin/apache24.conf
Copy file berikut pada file apache24.conf
Alias /munin /var/cache/munin/www
<Directory /var/cache/munin/www>
# Require local
Require all granted
Options FollowSymLinks SymLinksIfOwnerMatch
Options None
</Directory>
ScriptAlias /munin-cgi/munin-cgi-graph /usr/lib/munin/cgi/munin-cgi-graph
<Location /munin-cgi/munin-cgi-graph>
# Require local
Require all granted
Options FollowSymLinks SymLinksIfOwnerMatch
<IfModule mod_fcgid.c>
SetHandler fcgid-script
</IfModule>
<IfModule !mod_fcgid.c>
SetHandler cgi-script
</IfModule>
</Location>
8. Restart modul apache2.
root@asnul:/etc/munin/plugins# service apache2 restart
root@asnul:/etc/munin/plugins#
9. Restart Munin
service munin-node restart
10. Buka browser dan masukkan ip server/munin pada url. Jika berhasil, akan muncul tampilan seperti dibawah ini:
Kesimpulan:
Monitoring membantu kita unntuk memantau keadaan server.
Sekian dari saya, terimakasih telah berkunjung.
0 Comments