Monitoring Server Menggunakan Munin di Ubuntu 16.04 server


Munin adalah gratis dan open-source komputer sistem pemantauan , monitoring jaringan dan monitoring infrastruktur aplikasi perangkat lunak . Menawarkan pemantauan dan layanan mengingatkan untuk server, switch, aplikasi, layanan, dll alert pengguna bila ada sesuatu yang salah dan peringatan mereka untuk kedua kalinya ketika masalah telah diselesaikan.

sumber : wikipedia 

Langkah - langkah Install Munin :

1. Pertama, Install depedency yang dibutuhkan untuk menginstall Munin.  masukkan perintah berikut:
# apt-get -y install apache2 libcgi-fast-perl libapache2-mod-fcgid


2.  Kemudian aktifkan modul fcgid dengan memasukkan perintah berikut:
# a2enmod fcgid

3. Install Munin dengan perintah
# 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.
cd /etc/munin/plugins
ln -s /usr/share/munin/plugins/mysql_ mysql_
ln -s /usr/share/munin/plugins/mysql_bytes mysql_bytes
ln -s /usr/share/munin/plugins/mysql_queries mysql_queries
ln -s /usr/share/munin/plugins/mysql_slowqueries mysql_slowqueries
ln -s /usr/share/munin/plugins/mysql_threads mysql_threads

5. Jika sudah selesai, masuk ke file munin.conf pada direktori /etc/munin/
Ubah file menjadi seperti berikut:

# Example configuration file for Munin, generated by 'make build'

# 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
#
#staticdir /etc/munin/static

# temporary cgi files are here. note that it has to be writable by
# the cgi user (usually nobody or httpd).
#
# cgitmpdir /var/lib/munin/cgi-tmp

# (Exactly one) directory to include all files from.
includedir /etc/munin/munin-conf.d
[...]
# a simple host tree
[muhima.net]
 address 127.0.0.1
 use_node_name yes
[...]

 
NB: Perhatikan yang bertanda merah, itu merupakan baris yang diedit. Jika sudah, keluar dan simpan.

6. Buat backup file apache24.conf pada direktori /etc/munin.
# mv /etc/munin/apache24.conf /etc/munin/apache24.conf_bak

7. Kemudian masuk ke file apache24.conf (file akan kosong!)

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. Kemudian Restart modul apache2
# /etc/init.d/apache2 restart

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:



source : Howtoforge


"Semoga Bermanfaat"
Previous
Next Post »

Featured