Installation and configuration of munin monitoring

Source: Internet
Author: User

Munin is an excellent system monitoring tool similar to the RRD tool that provides you with a wide range of systems performance information, such as disks, networks, processes, systems, and users.

How the Munin works

Munin runs in client-server mode, the Munin server process running on the master server will collect data from the client daemon running locally (Munin can monitor its own resources) or the remote client (Munin can monitor hundreds of machines) and then its web Displayed graphically on the interface.
Configuring Munin in the server

installation

To configure the server side and the client, we need to complete the following two steps.

    1. Install the Munin server package and configure it so that it can collect data from the client.
    2. Install the Munin client so that the server can connect to the client daemon for data collection.

1. Install Munin server on Linux

To install the Munin server on a Ubuntu/debian -based machine:

Apt-get Install Munin apache2

To install the Munin server on a redhat/centos -based machine:
Before installing Munin on a Redhat-based machine, you need to make sure that EPEL repositories are enabled because the Redhat-based machine's software warehouse is not Munin by default, download the EPEL RPM installation package (download the corresponding version):

wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

After the download is complete, install the Epel package by using the following command

RPM-IVH epel-release-6-8.noarch.rpm or Rpm-ivh epel-release*

After installing the Epel source, use the Yum command to check whether the source list is added:

 # yum repolistloaded plugins:fastestmirrorloading mirror speeds from cached Hostfile * base:mirrors.vonline.vn * EP                                              El:buaya.klas.or.id * extras:centos-hn.viettelidc.com.vn * Updates:mirrors.fibo.vnrepo ID repo name           Statusbase CentOS-6-Base 6,381epel                                          Extra Packages for Enterprise Linux 6-x86_64 10,023extras CentOS-6-Extras  13nginx nginx Repo 47updates CentOS-6 -Updates 1,555repolist:18,019 

Epel has been listed after repo, and the display provides tens of thousands of packages, so Epel has been installed to your CentOS, Epel source configuration installed to the /etc/yum.repos.d/epel.repo file.
Then you can install Munin directly and execute the command:

Yum Install Munin httpd

2. Configure the Munin server side on Linux:

Here are the steps we will take to start Munini on the server:
Step 1: Add the host details that need to be monitored in the/etc/munin/munin.conf.
Add the host entry in the /etc/munin/munin.conf file to the end of the file to add the client you want to monitor. In this example, I added the database server to be monitored and its IP address.

[Db.linuxprobe.com]address 192.168.1.25use_node_name Yes

Save the file and exit.
Step 2: Configure the Apache Web server to include the Munin configuration.
in  /etc/apache2/conf.d   directory munin.conf to include Munin and Apache-related configurations, and note that the default other and web-related munin configurations are saved in the   /var/www/munin   directory.

Vi/etc/apache2/conf.d/munin.conf content: Alias/munin/var/www/munin<directory/var/www/munin>order Allow, Denyallow from localhost 127.0.0.0/8:: 1AllowOverride noneoptions execcgi followsymlinksaddhandler cgi-script. Cgidirectoryindex index.cgiauthuserfile/etc/munin/munin.passwdauthtype basicauthname "Munin stats" require Valid-user<ifmodule mod_expires.c>expiresactive Onexpiresdefault m310</ifmodule></directory>

Save the file and exit.
Step 3: Create a user name and password for the Web interface.
Now create a user name and password for viewing the Munin diagram:

Htpasswd-c/etc/munin/munin-htpasswd Munin

Note: For Redhat/centos machines, to access your configuration file, you need to replace "apache2" with "httpd" in each path.
Step 4: Restart the Apache server.
Restart the Apache server to make the Munin configuration effective.
Based on Ubuntu/debian:

Service Apache2 Restart

Based on Centos/redhat:

Service httpd Restart

3. Install and configure the Munin client on Linux:

Step 1: Install the Munin client on Linux.

Apt-get Install Munin-node

Note: If you want to monitor your Munin server side, you also need to install Munin-node on the server side.
Step 2: Edit the munin-node.conf file to configure the client.

vi/etc/munin/munin-node.conf Example: Allow ^127\.0\.0\.1$allow ^10\.10\.20\.20$# to hear which address on host *# and which ports port 4949

Note: 10.10.20.20 is my Munin server, which connects to the client's 4949 port to get the data.
Step 3: Restart the Munin-node in the client machine:

Service Munin-node Restart
Test Connection

Check if you can connect from the server to the client's port 4949, and if not, you need to open the port on the firewall in the client machine.
You can access Munin Web page http://munin.linuxprobe.com/munin/index.html.
Note that the domain name has been defined before the test to 80 ports on the specified server side.

This article was reproduced from: http://www.linuxprobe.com/munin-monitor-installation-and-configuration/

Free to provide the latest Linux technology tutorials Books, for open-source technology enthusiasts to do more and better: http://www.linuxprobe.com

Installation and configuration of munin monitoring

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.