How to install Munin monitoring server for ubuntu 17.
Hi everyone :)
As you know, last version of ubuntu is 18 (iincluded ubuntu 18). But because nvidia-graphic device and other problems are issued, the reality is many server programers are reluctant to use that version. ( In real, I lost my server because of this problem ( https://askubuntu.com/questions/641642/machine-does-not-start )
So I will tell you how to make munin server for ubuntu 17 in this time.
Before that, let me tell you what the munin is.
1. what is munin?
Munin monitoring system is a tool to check status of servers in realtime. The difference of other tools is interface is a small rubbish (XD) and we can make our own plugins and already exists so that we can make special monitoring service for our servers.
For you to show real how to do this, I will delete my munin server. Munin is distinguished in munin master and munin node. Munin node send information to munin master. So you have to set node and master separately.
2. Let's install munin master
#install requirements
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install apache2 munin -y
Munin shows status of servers by using apache webserver. So yoou have to install apache2 and munin, if you plan to use just server for master, you don’t need to install munin-node.
And also other tutorials don’t consider lastest version of apache2. So in this post you have to notice about it.
#Change the setting file name munin.conf.
sudo /vim/etc/munin.conf #(vim 없을 경우 apt-get install vim)
#dbdir /var/lib/munin -> dbdir /var/lib/munin
#htmldir /var/cache/munin/www -> htmldir /var/www/munin
#logdir /var/log/munin -> logdir /var/log/munin
#rundir /var/run/munin -> rundir /var/run/munin
#tmpdir /etc/munin/templates -> tmpdir /etc/munin/templates
#[localhost.localdomain] -> [MasterMunin]
Set your setting like this.
And this.
Dbdir, htmldir, logdir, rundir is for how to manage RDD data in munin, where to install munin apache page, location of executing file. You just need to delete ‘#’.
※Notice. Htmldir location is changed
# change /munin/apache
sudo vi /etc/munin/apache.conf
Alias /munin /var/cache/munin/www --> Alias /munin /var/www/munin
<Directory /var/cache/munin/www> --> <Directory /var/munin/www>
Allow from localhost ... -> Allow from all
exit and command these.
# Generate munin html page and give privilege.
sudo mkdir /var/www/munin
sudo chown munin:munin /var/www/munin
As you can check, we changed default directory of munin page into /var/www/munin, I made that directory and gave privilege to munin.
So we did all! let’s access to munin’s webpage http://(your server address)/munin !
Access Denied! Most of tutorials may tell you just these ways to install munin server. But Apache is updated to 2.4 version, you have to set more extra settings.
3. Settings for Apache 2.4
sudo vi /etc/munin/apache24.conf
Alias /munin /var/cache/munin/www --> Alias /munin /var/www/munin
<Directory /var/cache/munin/www> --> <Directory /var/munin/www>
Require none --> Require all granted
vi /etc/apache2/apache2.conf
As you go down <Directory / > ~ comments is appeared.
Alias /munin /var/www/munin
<Directory /var/munin/www>
Require all granted
# Add these.
# install munin-node, and add localhost as a munin-node.
apt-get install munin-node -y
sudo vi /etc/munin/munin-node.conf
allow ^127.0.0.1$ --> #under this line,
allow ^x.y.z.k$ --> #add your server address like in this format.
# Add extra plugins and make symbolic link.
sudo apt-get install munin-plugins-extra
# regist CPU manager plugin
ln -s /usr/share/munin/plugins/cpu /etc/munin/plugins/
# Regist etehernet plugin
ln -s /usr/share/munin/plugins/if_ /etc/munin/plugins/if_eth0
# Restart munin-node
service munin-node restart
su - munin --shell=/bin/bash
munin-cron --debug # If you meet error msg, check it by using this command!
Ta-Da! As you can see, munin-systems are normally installed!
And also if you want to check munin’s status, You can check into these two commands.
4. Extra
munin-check
munin-cron-configure --suggest
And if you want to check CGI status in realtime,
hwclock --show
tail -f /var/log/munin/munin-update.log
You can check now time and update status by using these commands.
Munin updates interval 5 minutes, so you have to notice it.
Thanks!
If you have some errors, leave your error and status as a comment. And Vote will be great help for me. thanks!