MONITORING MULTI-SERVER WITH MUNIN

Installation: 

Node side:

Ubuntu:
# sudo apt-get install munin-node CentOS/RedHat:
# yum install munin-node

Server side:

Ubuntu machine (or any distribution that uses apt): 
# sudo apt-get install munin CentOS/RedHat (or any distribution that uses yum): first download and add new repository, then use yum to install
# yum install munin Use the following commands if you cannot install by yum in current repositories: # wget http://epel.mirror.net.in/epel/6/i386/epel-release-6-8.noarch.rpm
# rpm -Uvh epel-release-6-8.noarch.rpm


Configuration

Node side:

For each node, open the configuration file at /etc/munin/munin-node.conf # vi /etc/munin/munin-node.conf Set the server address: ...
allow ^127\.0\.0\.1$ #For specific
cidr_allow 192.168.1.0/24 #For range IP
...
Automatically install and make the symbolic link for plugins that suitable for your system by: # munin-node-configure --shell | sh -x Start the Munin-node service # service munin-node start

Server side

Open the configuration file at /etc/munin/munin.conf. # vi /etc/munin/munin.conf Uncomment the following fields: ...
dbdir /var/lib/munin
htmldir /var/www/html/munin
logdir /var/log/munin
rundir /var/run/munin
...
Add each node that you want to monitor. ...
[Domain]
address xxx.xxx.xxx.xxx
use_node_name yes
...
Set ownership to munin directory in the apache root document folder. # chown -R munin:munin /var/www/html/munin/ Edit file /etc/httpd/conf.d/munin.conf # vi /etc/httpd/conf.d/munin.conf Add the following code (if you want to restrict accessing to Munin monitor) <Directory /var/www/html/munin/>
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 192.168.1.0/24
</Directory>
Now we have to setup the munin administrative account: ...
AuthName "Munin" #Default is Munin, you can change if you want
...
Setup password for user Munin: # htpasswd -c /etc/munin/munin-htpasswd Munin You don’t have to use -c parameter if you want to add additional users. Finnal step is restart the services: # service httpd restart

Access Munin

You can access Munin from web browser via URL http://server's-address/munin
If Munin doesn't generate the graph, you can use the command below: # sudo -u munin /usr/bin/munin-cron You can use some commands to see if Munin work corretly or not: # tailf /var/log/munin/munin-update.log
# tailf /var/log/munin/munin-html.log
# tailf /var/log/munin/munin-graph.log
# tailf /var/log/munin/munin-limits.log


Preferences:
http://mt.gomiso.com/2011/01/04/easy-monitoring-of-varnish-with-munin/ http://www.unixmen.com/install-munin-monitoring-tool-centos-rhel-scientific-linux-6-56-46-3

Comments

Popular Posts