Installation and configuration of Munin monitoring

Source: Internet
Author: User
Tags centos server

Installation and configuration of Munin monitoring

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

How Munin works

Munin runs in client-server mode. The processes running on the Munin server on the master server run from the local client daemon (Munin can monitor its own resources) or a remote client (Munin can monitor hundreds of machines) to collect data and display the data on its web Interface in graphics.
Configure Munin on the server

Install

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

  1. Install and configure the Munin server package 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 the munin server on Linux

InInstall the Munin server on Ubuntu/Debian:

apt-get install munin apache2

InInstall the Munin server on the Redhat/CentOS Server:
Before installing Munin on a Redhat-based machine, you must ensure that the EPEL software warehouse is enabled. Because the Redhat-based machine software Warehouse does not have 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, run the following command to install the EPEL package:

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

After the EPEL source is installed, run the yum command to check whether it is added to the source list:

# yum repolistLoaded plugins: fastestmirrorLoading mirror speeds from cached hostfile * base: mirrors.vonline.vn * epel: 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 shows that tens of thousands of software packages are provided, so EPEL has been installed to your CentOS, And the EPEL source configuration has been installed/Etc/yum. repos. d/epel. repo file.
Then you can directly install munin and run the following command:

yum install munin httpd

2. Configure the Munin server on Linux:

The following are the steps for starting Munini on the server:
Step 1: add the host details to be monitored in/etc/munin. conf.
InAdd host entries in the/etc/munin. conf file and move them to the end of the file to add the client to be monitored. 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.
InIn the/etc/apache2/conf. d directory, edit or create the file munin. conf to include configuration related to Munin and Apache. Note that other web-related Munin configurations are saved in/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 :: 1 AllowOverride NoneOptions ExecCGI FollowSymlinksAddHandler cgi-script. cgiDirectoryIndex. cgiAuthUserFile/etc/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.
Create a username and password to view the figure of munin:

htpasswd -c /etc/munin/munin-htpasswd munin

Note: For Redhat/Centos machines, to access your configuration file, replace "httpd" with "apache2" in each path ".
Step 4: restart the apache server.
Restart the Apache server to make the Munin configuration take effect.
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, you also need to install munin-node on the server.
Step 2: edit the munin-node.conf file configuration client.

Vi/etc/munin/munin-node.conf example: allow ^ 127 \. 0 \. 0 \. 1 $ allow ^ 10 \. 10 \. 20 \. 20 $ # host at the listening address * # And port 4949

Note: 10.10.20.20 is my Munin server. It connects to port 4949 of the client to obtain data.
Step 3: restart munin-node on the client:

service munin-node restart
Test connection

Check whether you can connect to port 4949 of the client from the server. If not, open the port in the firewall of the client machine.
Visit the Munin web page http://munin.linuxprobe.com/munin/index.html.
Note: before the test, the domain name has been defined as port 80 of the specified server.

Address: http://www.linuxprobe.com


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.