how the Install and configure Munin on Linux
Munin is a great 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. These are the contents of Munin default monitoring. Now, let's talk about munin!.
How does Munin work?
Munin runs in client-server mode. The Munin server process running on the primary 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 display it graphically on its web interface.
configuring in the server Munin
To configure the server side and the client, we need to complete the following two steps.
installation The Munin server package is configured so that it can collect data from the client.
installation The Munin client enables the server to connect to the client daemon for data collection.
Installing the munin server side on Linux
On the basis of Install the Munin server on the Ubuntu/debian machine:
Apt-get Install Munin apache2
On the basis of Install the Munin server on the Redhat/centos machine:
On the basis of Before installing Munin on a Redhat machine, you need to make sure that the EPEL repositories are enabled because the Redhat-based machine's software warehouse is not Munin by default.
Yum Install Munin httpd
Configuring the Munin server side on Linux
Here's what we're going to start on the server Steps taken by Munini:
Add the host details that need to be monitored in the/etc/munin/munin.conf.
Configure The Apache Web server to include the Munin configuration.
Create a user name and password for the web interface
Restart Apache server
Step 1
Add the host entry in the /etc/munin/munin.conf file. Add the client to be monitored at the end of the file. In this example, I added the database server to be monitored and its IP address.
Example:
[Db.linuxnix.com]
Address 192.168.1.25
Use_node_name Yes
Save the file and exit.
Step 2
Edit or create files in the/ETC/APACHE2/CONF.D directory munin.conf used to include Munin and Apache-related configurations. Also note that the default other Web-related Munin configuration is 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,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
<ifmodule mod_expires.c>
Expiresactive on
ExpiresDefault M310
</IfModule>
</Directory>
Save the file and exit.
Step 3
Now create a user name and password for viewing the Munin diagram:
Htpasswd-c/etc/munin/munin-htpasswd Munin
Note: for Redhat/centos machine, to access your configuration file, you need to replace "apache2" with "httpd" in each path.
Step 4
Restart Apache server, allowing the Munin configuration to take effect.
based on Ubuntu/debian:
Service Apache2 Restart
based on Centos/redhat:
Service httpd Restart
Installing and configuring the Munin client on Linux
Step 1
Installing 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$
# What address does the supervisor hear
Host *
# and which port
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.
Telnet db.linuxnix.com 4949
last visited Munin Web page
what you want to share can be configured with basic The Munin server is helpful.
[Brother Lian Technology sharing] How to install and configure Munin on Linux