Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install and configure performance Monitoring Software Munin in Linux system

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "how to install configuration performance monitoring software Munin in Linux system", in daily operation, I believe many people have doubts on how to install configuration performance monitoring software Munin in Linux system, Xiaobian consulted all kinds of information, sorted out simple and easy to use operation method, hope to answer "how to install configuration performance monitoring software Munin Linux system" doubts help! Next, please follow the small series to learn together!

Munin is a monitoring software for Linux systems (and for Windows systems). In addition to monitoring the system values, munin's biggest advantage is that you can write your own plug-ins to customize the values you need to monitor. The architecture of the whole system is simple and easy to operate. If you are using Debian or Ubuntu, the installation process is also very simple. In addition to monitoring results, munin can also set alarms. For my personal work on performance testing, it is a very good tool.

content

Munin will be a bit large when used as a whole, including display and custom plug-ins. This is divided into three parts to explain. This time only installation and configuration.

installation of munin master and munin-node;

Web services display results and dynamically view results;

Plug-ins writing and configuration (mysql plug-ins and custom plug-ins).

schematic architectural diagram

Munin's architecture is very simple. Contains a server munin and a client munin-node. Munin-node can be deployed on multiple machines, and munin is used to collect monitoring information from one or more machines at regular intervals. Munin collects data and generates static html files. In order to display the results of monitoring, a web server is required. Monitoring results can also be accessed anytime, anywhere with the web.

Configuring Munin in the server

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

Install the Munin server package and configure it to collect data from clients.

Install the Munin client so that the server can connect to the client daemon for data collection.

Installing munin Server on Linux

To install Munin Server on an Ubuntu/Debian based machine:

The code is as follows:

apt-get install munin apache2

To install Munin Server on Redhat/CentOS based machines:

Before installing Munin on Redhat-based machines, you need to make sure the EPEL software repository is enabled, since Redhat-based machines have no Munin by default.

The code is as follows:

yum install munin httpd

Configuring Munin Server on Linux

Here are the steps we need to take to start Munini on the server:

Add details of the hosts to be monitored to/etc/munin/munin.conf.

Configure apache web server to include munin configuration.

Create a username and password for the web interface

Restart Apache Server

Step 1

Add a host entry to the/etc/munin/munin.conf file. Go to the end of the file and add the client you want to monitor. In this example, I added the database server to monitor and its IP address.

Examples:

The code is as follows:

[db.linuxnix.com]

address 192.168.1.25

use_node_name yes

Save the file and exit.

Step 2

Edit or create the file munin.conf in the/etc/apache2/conf.d directory to include Munin and Apache related configurations. Note also that by default other web-related Munin configurations are stored in the/var/www/munin directory.

The code is as follows:

vi /etc/apache2/conf.d/munin.conf

Content:

The code is as follows:

Alias /munin /var/www/munin

Order allow,deny

Allow from localhost 127.0.0.0/8 ::1

AllowOverride None

Options ExecCGI FollowSymlinks

AddHandler cgi-script .cgi

DirectoryIndex index.cgi

AuthUserFile /etc/munin/munin.passwd

AuthType basic

AuthName "Munin stats"

require valid-user

ExpiresActive On

ExpiresDefault M310

Save the file and exit.

Step 3

Now create a username and password to view munin's diagram:

The code is as follows:

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

Note: For Redhat/Centos machines, to access your configuration files, replace "apache2" with "httpd" in each path.

Step 4

Restart the Apache server so that the Munin configuration takes effect.

Ubuntu/Debian:

The code is as follows:

service apache2 restart

Centos/Redhat:

The code is as follows:

service httpd restart

Installing and Configuring Munin Client on Linux

Step 1

Installing Munin Client on Linux

The code is as follows:

apt-get install munin-node

Note: If you want to monitor your Munin server side, you will also need to install munin-node on the server side.

Step 2

Edit the munin-node.conf file to configure the client.

The code is as follows:

vi /etc/munin/munin-node.conf

Examples:

The code is as follows:

allow ^127\.0\.0\.1$

allow ^10\.10\.20\.20$

#Which address to listen to

host *

#and which port

port 4949

Note: 10.10.20.20 is my Munin server, which connects to port 4949 of the client for data.

Step 3

Restart munin-node in client machine:

The code is as follows:

service munin-node restart

Test Connection

Check if you can connect to port 4949 on the client from the server, if not, you need to open port 4949 on the firewall on the client machine.

The code is as follows:

telnet db.linuxnix.com 4949

Visit Munin web page

http://munin.linuxnix.com/munin/index.html

Hopefully this will help you configure a basic Munin server.

At this point, the study of "how to install configuration performance monitoring software Munin Linux system" is over, hoping to solve everyone's doubts. Theory and practice can better match to help everyone learn, go and try it! If you want to continue learning more relevant knowledge, please continue to pay attention to the website, Xiaobian will continue to strive to bring more practical articles for everyone!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report